Editing competition files

More
14 years 7 months ago #72401 by Marin Parushev
I am posting this topic to show you what I achieved with some HEX editing of one competition file. The type of the file does not matter. I believe it works for all .PRE , .DIY and .CAR files.

On the picture below you can see the strange condition of George Weah. He scored 255 goals but now he seems to be injured or punished and he can t play.
Here is the explanation. In competition files SWOS keeps information about the players that participate in the competition. Some of the information is:
1) Number of goals scored
2) Injury/Ban status
For each one of those two the space allocated is 1 Byte which means that you can have 256 different values for goals scored (from 0 to 255 inclusive) and 256 values for Injury/Ban status.
In fact there are not that many Injury/Ban statuses. All statuses are:

1) Player is OK (no ban, no injury)
2) Player has a bandage
3) 1 game injury
4) 2 games injury
5) 3 games injury
6) 4 games injury
7) Question mark injury
8) Black cross injury
9) Yellow card
10) Ban for 1 game (accumulation of yellow cards, or 1 game left from a bigger ban)
11) Ban for 2 games (Red card received or 2 games left from a bigger ban)
12) Ban for 3 games (Usually occurs when you accumulate yellow cards and still make a foul for a red card so you get 1+2 = 3 games off)

For each of those 12 conditions SWOS keeps a special code. In case you change that code consequences can be unpredictable. That s how the gray ellipse appeared there.

Later I would like to write a complete report related to that issue and more specifically HEX editing of competition files. Unfortunately my work is still in progress.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #75323 by Playaveli
Hm, maybe George Weah has depressions... :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.196 seconds
Powered by Kunena Forum