Editing Player Profiles

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Incidentally the original Cricket2004 editing player profiles thread has been restored and is pinned in the Cricket2004 forum if anyone wants some ideas about how to go about this.
 

Prakash

Executive member
Joined
Mar 13, 2003
Location
India
Online Cricket Games Owned
The player stats are stored in "C" short integer format(finally!), so you have to multiply the 2nd byte with 256 and then add with the 1st byte.
For example if you take tendulkar's runs scored bytes, the values are 191 & 052
(52*256) + 191 = 13503
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Ok. I've cracked how the abilities are stored for Cricket2005. Thanks to Ajit for cracking them for C2k4 (simular system) and to Ste for restoring the C2k4 editing thread so I could work out what to do:

Bytes 116-119 control discipline, accuracy, seam, and bouncer as follows.

30 0C C3 30 is the default string. This is 818.089.008 in decimal.
Next we divide the decimal number by 64 and take the remainders. They are: 0, 48, 48, 48, 48. 48 in base 64 is 75.
In the above sequence the first remainder is always 0, the second is the discipline value, the third accuracy, the fourth seam, the fifth bouncer.
Thus for the string 00 0C 87 30, the remainders are 0, 48, 48, 33, 48 so we know that all the values are 48 (75) apart from seam which is 33 (50).
It should be very simple from here to crack the rest of the attributes.

100-103 - batting: concentration, defence, attack, offside, legside
104-107 - batting: straight, front foot, back foot
112-115 - blank ?catching
116-119 - bowling: discipline, accuracy, seam, bouncer
120-123 - bowling: slower ball, spin, arm ball, googly, flipper
124-127 - bowling/fielding: inswing, outswing, arm strength, fielding accuracy, agility
128 - stamina
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
I've also cracked the 4 bytes Sid was wondering about at the end of the player stats. They relate to maidens bowled and matches played:

bytes 36-39
2A 41 = 298 maidens
(42) + (1*256) = 298
I don't know what the 4 does

example 2
4A 00 = 74
(74)

The following 2 bytes are matches played:
00 03 = 12
40 0B = 45
80 14 = 82
C0 1E = 123

The first half of the first byte sets the rule as follows:
0 = x4
4 = x4 + 1
8 = x4 +2
C = x4 +3

00 03 = 12 (3*4 = 12)
40 0B = 45 (11*4 + 1 = 45)
80 14 = 82 (20*4 + 2 = 82)
C0 1E = 123 (30*4 + 3 = 123)

The second half of the first bytes seems sometimes to be 1 but I've got no idea why and can't find out what it effects.

edit: cracked - see post 199
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
First post updated. The roster is completely cracked up to byte 131. I will check through what has been done before and work on the rest later. Incidentally I've switched back to using 00 as the player code first byte not 01! Apologies to Sid...

Code:
00,01 - Player code
02,03 - Commentary code
04-18? - Player Name
20,21 - innings (test)
22,23 - not outs (test)
24,25 - overs bowled (test)
26,27 - wickets (test)
28,29 - runs conceded (test)
30,31 - runs scored (test)
32 - 50's (test)
33 - 100's (test)
34,35 - catches (test)
36,37 - maidens (test)
38,39 - matches and 5-fors (test)
40,41 - innings (ODI)
42,43 - not outs (ODI)
44,45 - overs bowled (ODI)
46,47 - wickets (ODI)
48,49 - runs conceded (ODI)
50,51 - runs scored (ODI)
52 - 50's (ODI)
53 - 100's (ODI)
54,55 - catches (ODI)
56,57 - maidens (ODI)
58,59 - matches and 5-fors (ODI)
60,61 - innings (FC)
62,63 - not outs (FC)
64,65 - overs bowled (FC)
66,67 - wickets (FC)
68,69 - runs conceded (FC)
70,71 - runs scored (FC)
72 - 50's (FC)
73 - 100's (FC)
74,75 - catches (FC)
76,77 - maidens (FC)
78,79 - matches and 5-fors (FC)
80,81 - innings (OD)
82,83 - not outs (OD)
84,85 - overs bowled (OD)
86,87 - wickets (OD)
88,89 - runs conceded (OD)
90,91 - runs scored (OD)
92 - 50's (OD)
93 - 100's (OD)
94,95 - catches (OD)
96,97 - maidens (OD)
98,99 - matches and 5-fors (OD)
100-103 - batting: concentration, defence, attack, offside, legside
104-107 - batting: straight, front foot, back foot (and two hidden attributes in positions 4 and 5)
108-111 - batting: skill (position 2), resilience (position 4) and two hidden attributes (positions 1 and 3)
112-115 - blank ?catching
116-119 - bowling: discipline, accuracy, seam, bouncer
120-123 - bowling: slower ball, spin, arm ball, googly, flipper
124-127 - bowling/fielding: inswing, outswing, arm strength, fielding accuracy, agility
128,129 - stamina
130,131 - Batting position and aggression
132 - Bowling style and aggression
133,134 - hands used and fielding positions
134,135 - player speed
136 - catching
137-139 - F0 7D DF for all players
142,143 - High Score (test)
145,146 - High Score (ODI)
148,149 - High Score (FC)
150,151 - High Score (OD)
153,154 - BBI runs (test)
156,157 - BBI runs (ODI)
158,159 - BBI runs (FC)
161,162 - BBI runs (OD)
204 - Batting weaknesses
208,209 - Batting strengths
212,213 - Special skills
221 - player height
223 - bat
228,229,230 - nationality
360 - age
361 - player type
362 - bowling deliveries available
364,365 - face

Interestingly there are definitely 4 hidden attributes for batting and possibly some more after stamina for bowling/fielding.
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Onward with the cracking.
Bytes 130,131 and 132
Batting position and aggression
Bowling style and aggression

Code:
Bytes 130,131 - Batting position and aggression

0_ 80 - OB Agg
0_ 81 - TE Agg
0_ 88 - OB Mod
0_ 89 - TE Mod
0_ 90 - OB Def
0_ 91 - TE Def
8_ 80 - MO Agg
8_ 81 - LO Agg
8_ 88 - MO Mod
8_ 89 - LO Mod
8_ 90 - MO Def
8_ 91 - LO Def

The second half of the first byte is unknown but apart from that this is pretty simple. It seems to be 0 for created players and 2 or 3 for ingame players. No noticeable effect.

Code:
Byte 132 - Bowling style and aggression
_9 - RF
_8 - LF
_7 - RFM
_6 - LFM
_5 - RM
_4 - LM
_3 - SLA
_2 - OS
_1 - LAC
_0 - LS
0_ - Agg
1_ - Mod
2_ - Def
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Having been close to suicide several times in the last 5 hours I've now cracked bytes 133 and 134. They control batting hand, primary fielding position, secondary fielding position and fielding hand.

Code:
Bytes 133 and 134 - Hands and fielding positions
NB Only the second half of byte 134. The first half controls player speed

General, General: 05 _0
General, Slip: 05 _1
General, Outfielder: 05 _2
General, Closefielder: 05 _3
General, Wicketkeeper: 85 _0
General, Cover: 85 _1
General, Gully: 85 _2
General, Square Leg: 85 _3
Each first attribute has two possible bytes with four secondary after each
WK: for 0D gen/slip/out/close have values _0-_3
for 8D wk/cover/gully/sq leg have values _0-_3
Slip: 15 _0-_3; 95 _0-_3
Cover: 1D _0-_3; 9D _0-_3
Outfield: 25 _0-_3; A5 _0-_3
Gully: 2D _0-_3; AD _0-_3
Close in: 35 _0-_3; B5 _0-_3
Square Leg: 3D _0-_3; BD _0-_3

This is all for RH bat and Fielding hand right.
Do the following to the first byte for RH:
For RHB and RHF subtract 5 (will end 0 or 8)
For LHB and RHF subtract 4 (will end 1 or 9)
For RHB and LHF subtract 1 (will end 4 or C)
For LHB and LHF leave (will end 5 or D)

e.g. M.Vaughan 10 _0 = RHB, slip, general, RHF
R.Ponting 18 _1 = RHB, cover, slip, RHF
M.Trescothick 91 _2 = LHB, slip, cover, RHF

Right the first half of byte 134 and all of bytes 135 and 136: player speed and catching

Code:
Bytes 134,135,136 - Player speed and catching
134,135 - Speed
1_ 02 = 021 hex2dec = 33 = scaled 50
0 _03 = 030 hex2dec = 48 = scaled 75
Convert these into values by scaling them on Ajit's base-64 scale [url=http://www.planetcricket.org/forums/showpost.php?p=269686&postcount=75]here[/url] (exactly the same as all the other attributes) and they now read 50 and 75).

136 - Catching
21, hex2dec = 33 = scaled 50
3E, hex2dec = 62 = scaled 100

e.g M.Vaughan - D_ 01 37 = 29, 55 = 44 (speed), 88 (catching)
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Final post for the day but another big one. High scores.
Controlled by 2 bytes; 2 of which are signifiers.

Code:
Bytes 142 and 143 - High Score (test)
14 C3 breaks down as follows:
C tells us that the score is not an 'out'.
4 tells us to add 1 to the number we get
1_ _ 3 tells us to multiply 3*64 and add it to 1*4
Therefore (1*4) + (3*64) +1 = 197
ab cd = (c*64) + (a*4) + converted b (c will be C)

Conversely 'Not Out' high scores work backwards
C0 D9
D tells us the score is a 'Not Out'
0 tells us to add 0 to the final number
9 tells us to multiply (16-9)*64
C tells us to subtract (C*4) from (16-9)*4
(16-9)*64 - (12*4) - 0 = 400 not out

e.g. Ponting 04 C4 = (0*4) + (4*64) + 1 = 257
Butcher 4C DD = (16-13)*64 - (4*4) -3 = 173*

Attempted simplified formula
AB CD
(D*64) + (A*4) + (B/4) =
If C = C then leave
If C = D then subtract number from 1024
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Rest of the High Score bytes

Code:
Bytes 145, 146 - High Score (ODI)
The first half of the second byte tells us whether the high score is Not Out or not:
The even bytes (2,4,6,8,A,C,E) are 'out' and the odd bytes (1,2,5,7,B,D,F) are 'Not Out'.
For 'out'
EC 61
The second half of the first byte is the signifier:
0 = add 0; 4 = add 1; 8 = add 2; C = add 3
The 1 in the second half of the second byte is multiplied by 64
The E in the first half of the first byte is multiplied by 4
Therefore (14*4) + (1*64) + 3 = 123
For 'Not Out'
18 BD
The second half of the first byte is the signifier:
0 = subtract 0; 4 = subtract 1; 8 = subtract 2; C = subtract 3
The D is subtracted from 16 and multiplied by 16
The 1 is multiplied by 4
Therefore ((16-13)*64) - (4*1) - 2 = 186*

Code:
Bytes 148, 149 - High Score (FC)
The first half of the second byte seems to be immaterial
The second half signifies a formula as follows: (where bytes are ab cd)
0 and 8: (a*16) + b 'out'
1 and 9: 256 + ((a*16) + b) 'out'
6 and E: 512 - ((a*16) + b) 'Not Out'
F: 256 - ((a*16) + b) 'Not Out'
(there may be another signifier paired with F)

Therefore:
B9 18 = (11*16) + 9 = 185
C5 D9 = 256 + ((12*16) + 5) = 453
C5 EE = 512 - ((12*16) + 5) = 315*
21 6F = 256 - ((2*16) + 1) = 223*

Code:
Bytes 150, 151 - High Score (OD)
Operates using a base 8 system. The second half of the first byte seems to be immaterial.
For 'out' the whole of the second byte is converted into decimal and multiplied by 8. We then add as follows depending on the first half of the first byte:
0,1 = add 0
2,3 = add 1
4,5 = add 2
6,7 = add 3
8,9 = add 4
A,B = add 5
C,D = add 6
E,F = add 7
E1 0F therefore is hex0F = dec 15 = (15*8) + 7 = 127
For 'Not Out' the system is reversed again and the added numbers subtracted.
20 ED
(256 - hexED)*8 - 1 = (256-237)*8 - 1 = 151*
for ab cd = (256 - hexcd)*8 - a
Logically this will diverge at around 512 for both. I guess the assumption is that no-one will ever score over 512 in an OD game!


Worth just mentioning that if you add together the not out and out score for any method they will come to 1024. I might be able to simplify the formula with this information.
 

sid_19840

International Coach
Joined
Jun 28, 2005
Location
Kolkata,India
Online Cricket Games Owned
Looking good.Im not trying to understand the details of the bytes ure posting(as I'll forget everything Ive read for tommorow's exam :p),but I can see that you are doing a fine job,something which I would certainly have taken ages to find :p,hats off.

btw anything else uve found in this time,I havent looked at all the threads.
 

duffarama

Chairman of Selectors
Joined
Dec 4, 2003
Location
Ste's Trenchcoat
Online Cricket Games Owned
As Austin Powers would say, "You are doing a 'smashing' job, Colin."
Good work, keep it up. All this information will prove useful no doubt mate.
 

Octavius

Club Cricketer
Joined
Apr 21, 2004
Location
Hamilton, New Zealan
Online Cricket Games Owned
wow you are doing great Colin! i assume that once you have broken the codes you can make a player editor, or doi have to learn hoe to adjust bytes :P imsuch a PC noob. I have downloaded the hex workshop, could someone post a link to a full tutorial for adjusting bytes for an individual player? i created my own players and opened the roster in hex and couldnt find any of the names of any of the players i created.

i am worried that all this seems so simple to most of you that instructions are for advanced users who have some clue about this stuff.
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
Octavius said:
wow you are doing great Colin! i assume that once you have broken the codes you can make a player editor, or doi have to learn hoe to adjust bytes :P imsuch a PC noob. I have downloaded the hex workshop, could someone post a link to a full tutorial for adjusting bytes for an individual player? i created my own players and opened the roster in hex and couldnt find any of the names of any of the players i created.

i am worried that all this seems so simple to most of you that instructions are for advanced users who have some clue about this stuff.

Don't worry about it. We all start somewhere. There is a tutorial around on how to hex edit and just read through this thread and try to follow.

A little bonus for those of you who've made it this far. Open up Kevin Pietersen in your hex editor and enter the following string at offset 345986:

Code:
78 C2 00 D0 61 00 02 6F 70 12

He should now have updated high scores of test 158, ODI 116, FC 254*, OD 147. :)
 

Attachments

  • kp.jpg
    kp.jpg
    26.3 KB · Views: 52

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
BBI runs conceded

Code:
Bytes 153,154 - BBI runs conceded (test)
ab cd
a*4 + b/4 + d*64
1C C1 = (1*4) + (12/4) + (1*64) = 71

Code:
Bytes 156,157 - BBI runs conceded (ODI)
ab cd
a*16 + b (just a simple decimal conversion of the first byte: c and d don't seem to be used)
16 58 = (1*16) + 6 = 22

Code:
Bytes 158,159 - BBI runs conceded (FC)
ab cd
d*8 + a/2 + c*128
60 09 = (9*8) + (6/2) + (0*128) = 75

Code:
Bytes 161,162 - BBI runs conceded (OD)
ab cd
a*4 + b/4 + d*64
58 01 = (5*4) + (8/4) + (1*64) = 86
 

Users who are viewing this thread

Top