Hex Editing: Rosters - Socks Location

Patchmaking tutorials for NBA 2K12.

Hex Editing: Rosters - Socks Location

Postby JaoSming on Wed Oct 05, 2011 2:24 pm

This is hopefully going to be a good resource for Hex Editing the Rosters before the REDitor comes out.

Remember to edit the checksums after hex editing a roster. Look at the first reply for a tutorial.



"Bank of Names"


It's at the bottom of the roster, just look for the readable text split up by periods like
Code: Select all
C.e.l.t.i.c.s

Replace the letters however you want, just make sure you dont add or delete anything

In this area you can change stadiums, logos, uniforms and other callouts.



Player Data


Credits to Pdub for, everything, lol.
Player data starts at offset 9E50 with Jrue Holiday. The data for each player is exactly 1D0 bytes big.
Code: Select all
6D24 1D00 7924 1D00 0000 0000 3D0A 4143
0000 3443 1D9B 0C00 0000 0000 4706 C667
8C60 917D 7902 0E00 099B 0C00 01E7 1600
0000 0000 00A8 4E80 0000 4706 0000 0000
0000 0000 FFFF 7B0A 7A0A FFFF FFFF FFFF
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
FFFF FFFF 00C2 4810 0000 0000 0000 0000
2828 28FF 8787 87FF D7D7 D7FF D7D7 D7FF
8787 87FF 2828 28FF 0120 1004 0000 0004
0000 0000 4001 040C 0320 4095 7E15 0005
71C0 2A00 0000 0000 0000 001A 459F 0200
0009 3818 9423 0E41 2539 0000 0000 0000
0000 0000 5001 0000 0000 0040 051C 4960
486C A40A A2B2 0323 A60A 8000 9B23 1D00
C890 1A00 38D1 2800 0000 0000 0000 0000

The first part of this code "6D24 1D00 7924 1D00" tells us where the first and last name is for the player. To find the player's name you must first reverse the byte order. The last name is the first 8 bytes "6D24 1D00" and the first name is "7924 1D00". So reverse the byte order and you get this 001D 246D for the last name and 001D 246D for the first name. To find these names you put your cursor in front of the bytes (so infront of 6D for the last name and 79 for the first name) then use your "jump" command. For Hex Workshop it is ctrl+G. Then you type in your reversed byte order to find the name. The cursor will jump to the "Bank of Names" where the name is located.

Next lets look at this part of the code
0000 0000 00A8 4E80 0000 4706 0000 0000
0000 0000 FFFF 7B0A 7A0A FFFF FFFF FFFF

The 2 bytes underlined is the CFID. To find the CFID you can load up your "Base Converter" in Hex Workshop and choose the "Intel" Byte Order and "short" Data Type. "4706" in hex = 1607 in decimal short which is Jrue Holiday's CFID.

The only other specific thing I know is right here
FFFF FFFF 00C2 4810 0000 0000 0000 0000
2828 28FF 8787 87FF D7D7 D7FF D7D7 D7FF
8787 87FF 2828 28FF 0120 1004 0000 0004
0000 0000 4001 040C 0320 4095 7E15 0005

If you change that byte to "48", the player will wear a T-Shirt.

The easiest way to figure out what each byte does is to load a save file in game, make a few changes, then doing a comparison between the original hex and the modified one.



Floor IDs


Starting at offset D2400 is where the floor stuff begins.
Search for 01F8, 02F8, 05F8 etc etc. The 01/02/05 is what controls the floorID and can be seen through the signed or unsigned byte value. There is the F8 that works with this that allows us to get over the 255 limitation of that one byte, but this should be good enough for right now.
If you want to use FloorIDs higher than 255, the two bytes that make up the floorID are calculated using a "mod 1024" equation. Directly from Vlad-
Vl@d Zola Jr. wrote:Well, last year it was "mod 1024", if i remember correctly. As the file looks pretty the same, i would suggest
05F8 = (248 * 256 + 05) mod 1024 = 05 (where 248 is F8 in decimal).
Well, i don't know if "mod" is programming specific or everyone knows what it is, so you can look up the following article for the description:
http://en.wikipedia.org/wiki/Modulo_operation
So, basically for pattern "AA BB" (in the previous example AA = 05, BB = F8) the formula is:
FloorID = (BB * 256 + AA) mod 1024




Random Offsets


CAT Generic Jerseys ~ 16B300
Team Data ~ 70150
Player Data = 9E50
1st Round Rookies = A1CE0 - Doug Martin = Kyrie Irving
2nd Round Rookies = A5340
First CAP Slot = 814B0


Uniform Stuff


Image

Search for FFFFxx00 with the xx being substituted for this
Code: Select all
00 – 76ers
1F – Bobcats
01 – Bucks
03 – Bulls
04 – Cavs
05 – Celtics
06 – Clippers
08 – Grizzlies
09 – Hawks
0A – Heat
0B – Hornets
0C – Jazz
0D – Kings
0E – Knicks
0F – Lakers
10 – Magic
11 – Mavericks
12 – Nets
13 – Nuggets
14 – Pacers
15 – Pistons
16 – Raptors
17 – Rockets
19 – Spurs
1A – Suns
18 – Thunder
1B – T-Wolves
1C – Blazers
1D – Warriors
02 – Wizards


As you can see, there are accessory colors right there, but I dont know where the other uniforms are located in the hex or what all the values mean.
You can find colors with this. http://www.operationsports.com/hokupguy ... -hex-code/
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby JaoSming on Tue Oct 18, 2011 9:58 am

Editing Checksums

If you have attempted hex editing a roster and found that after editing the roster crashes, you need to learn how to manually update the checksum at the beginning of the file. This only applies to the PC version and I want to credit Pdub for teaching me this.

First you need this program, I just leave it in my saves folder, just in case I want to hex edit a save.
http://nba-live.com/jaosming/Tutorial/H ... _Crc32.rar

For an example, I am going to hex edit the Summer Circuit arena so that instead of the small gym, the games take place in the Generic CAT/D-League arena. Remember when hex editing rosters that you cannot change the file size and expect the game to not crash.


Alright, first off this is the checksum that we are focusing on.
Image

First thing I like to do is delete it, since I know that I will be making some hex changes.
Image

Now that it's gone I can find the reference to s735 (the Summer Circuit Arena) and make the edit I want.
Image
Image

Then you must save your roster file. Since we already deleted the checksum you should be all set, but you gotta make sure you delete it before this next step.

Start crc32
Image

Open your file, then change the drop down menu to "Dynamic Assembly"
Image

Then hit the CRC32 button and this should pop up.
Image

That is our new checksum in reverse byte order.

We need to reverse the bytes in order for this work. Remember that a byte is formed by two characters. So this is how the result looks with spaces between the bytes.
Code: Select all
3D FC F6 A3


But we need to reverse the byte order before we put that back into the file, so it should be ordered like this.
Code: Select all
A3 F6 FC 3D

See how the order swaps, but the characters in each byte don't?

The last step is to simply put the reversed result back into the file, before the 0100
Image

Then save and you are all set!



This is not exactly easy stuff, and hex editing can be a pain in the arse. But if you are forced to hex edit a roster, association, playoff, my player, any save file on the PC, you need to know how to do this.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby JaoSming on Tue Oct 18, 2011 10:26 am

first post updated with new information
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby vincemeister55 on Sat Oct 22, 2011 7:16 pm

is itpossible to change sock colors using hex edit?
User avatar
vincemeister55
 
Posts: 423
Joined: Sun Jul 11, 2010 6:44 pm
Location: Cebu City, Philippines

Re: Hex Editing: Rosters

Postby JaoSming on Sat Oct 22, 2011 8:20 pm

its possible, but since you can't change it in-game, it would be very difficult to find
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby anastasis16 on Thu Oct 27, 2011 3:10 pm

damn, this whole hex editing stuff really makes me dizzy :giveup:
Image
User avatar
anastasis16
 
Posts: 603
Joined: Wed Nov 17, 2010 11:28 pm
Location: Soerabaja, Indonesia

Re: Hex Editing: Rosters

Postby RR on Fri Nov 04, 2011 8:27 am

[quote="JaoSming"]its possible, but since you can't change it in-game, it would be very difficult to find[/quote]

A guy previously asked about change color socks but for Headband is it the same case, "possible but difficult to find"?
User avatar
RR
 
Posts: 369
Joined: Sun Feb 24, 2008 1:02 pm

Re: Hex Editing: Rosters

Postby JaoSming on Fri Nov 04, 2011 10:07 am

that would be a bit easier. You would reference the hex colors for the team in question in 2k11's REDitor, then simply do a find command in the 2k12 roster finding all the instances of that particular color. Then it's just a matter of finding out which one affects accessory colors.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby RR on Fri Nov 04, 2011 11:14 am

thanks! Being more specific:

Turn Knicks away headband Black / Retro away Orange

Do I have to follow this same steps for 2K12? http://forums.nba-live.com/viewtopic.php?f=138&t=81860

And Do I have to get only Vlad's REDitor II v. 2.3 to do it?

Thanks again man and sorry for botherin'
User avatar
RR
 
Posts: 369
Joined: Sun Feb 24, 2008 1:02 pm

Re: Hex Editing: Rosters

Postby JaoSming on Fri Nov 04, 2011 11:21 am

that link was for cloth movement, nothing to do with colors.

any REDitor should do it, you just need to look at the uniforms tab (not edit it) and get the hex colors for the appropriate team

this will help too if you dont want to do the REDitor route
http://www.operationsports.com/hokupguy ... -hex-code/
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby RR on Sat Nov 05, 2011 1:17 am

I'm trying so hard on that!

To change Knicks Headband away to black, Is there a beginners guide to edit on Hex Workshop?

for example, Do I have to base Offset column for Team value? Knowing Knicks ID is "14" where can I found on Hex Workshop?

As I'm searching/getting informations fragmented, I dont' know how to work it well.
User avatar
RR
 
Posts: 369
Joined: Sun Feb 24, 2008 1:02 pm

Re: Hex Editing: Rosters

Postby JaoSming on Sat Nov 05, 2011 6:53 am

not really, your best bet is just searching for the knick's orange and then finding the "black" value near it in the uniforms section.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby RR on Sat Nov 05, 2011 8:34 am

That's the thing JaoSming, which uniform/jersey section if I can't open 2K12 Roster on REDitor?

I mean, I must edit on Hex Workshop, the only tool I can edit/save, right? If so, how can I find team ID/color on that? Do I have consider Offset or Hex values?

After that, do I have to follow those "Editing Checksums" or for headbands is not necessary?
User avatar
RR
 
Posts: 369
Joined: Sun Feb 24, 2008 1:02 pm

Re: Hex Editing: Rosters

Postby JaoSming on Sat Nov 05, 2011 8:59 am

yes after any edits you have to do the checksums thing

i dont know where the values are in the file. if I did I'd tell you, but that's why I'm saying search for the knicks orange in hex aka one of these colors (check in paint)
14 F37021 00539F
14 00539F F37021
then check the hex colors next to those values. it's all uncharted waters unfortunately, you'd be the first person other than Vlad who knows where that data is.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby RR on Sat Nov 05, 2011 10:03 am

Just after you sent me those team color in hex code, I found the Knicks values (the F37021 00539F sequence) on Hex Workshop but don't get yet what should I do next.

1) Before overwrite them, should I have to do the first "checksum" thing, deleting first hex numbers line? Until which column?

2) Taking your "Summer Circuit Arena" example with "s735" reference, do I have to edit the "text string" side? Or my reference will be the new values that appears?
User avatar
RR
 
Posts: 369
Joined: Sun Feb 24, 2008 1:02 pm

Re: Hex Editing: Rosters

Postby JaoSming on Sat Nov 05, 2011 10:38 am

1) its the first 8 bytes, I dont think I could make that checksum tutorial any clearer, sorry

2) you dont need to touch the text fields, you are only looking for and editing hex colors.
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby JaoSming on Tue Nov 08, 2011 11:43 am

Attempting to find uniform stuff based on some of the hex tutorials over at OS.

Image

Search for FFFFxx00 with the xx being substituted for this
Code: Select all
00 – 76ers
1F – Bobcats
01 – Bucks
03 – Bulls
04 – Cavs
05 – Celtics
06 – Clippers
08 – Grizzlies
09 – Hawks
0A – Heat
0B – Hornets
0C – Jazz
0D – Kings
0E – Knicks
0F – Lakers
10 – Magic
11 – Mavericks
12 – Nets
13 – Nuggets
14 – Pacers
15 – Pistons
16 – Raptors
17 – Rockets
19 – Spurs
1A – Suns
18 – Thunder
1B – T-Wolves
1C – Blazers
1D – Warriors
02 – Wizards


As you can see, there are accessory colors right there, but I dont know where the other uniforms are located in the hex.
You can find colors with this. http://www.operationsports.com/hokupguy ... -hex-code/
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters

Postby flitzpiepe on Thu Jan 19, 2012 6:53 am

Socks Colour
I've got a small contribution to make, too.
The story is that slimm44 on operationsports forged a great roster for us PC gamers to use, but unfortunately he based it on the initial roster of the game. This meant that he still had the horrible black Blazers home socks in use and I really wanted to get rid of these.

I also want to thank Vl@d for REditorII v3.0 (the free demo) because it helped me to find the necessary information more quickly in the roster file.
So what you need to replicate my changes are probably REditorII v3.0 demo, some hex editor and as JaoSming has already posted it the crc32 programm to compute a new checksum for your changed roster file.

The socks colour is saved within the jersey section of a roster file. I'll show it based on my Blazers example using their jersey-ID of 28 (= 0x1C).
Opening the roster in REditor and there looking at the jerseys tab reveals the following information:
Image
the marked line has texture 'uh028', where the 'h' means home and 028 is the Blazers' id here. In the column 'SocksCol' you see socks colour equals 1 which means black. What I am going to use from this whole line is the way that the team colours to the very right are organized.
One thing you need to be aware of is that every number in the roster file will be in reverse byte order, that means that the colour in the marked line 'E0 39 3E' will be found as '3E 39 E0' in the roster file.

Now open up some hex editor and load the roster file into it. You will need to search for the following string in this case:
141414ff3e39e0ffd7d7d7ff3e39e0
As you can see that is just the concatenation of those four team colour values seperated from each other by an 'ff' byte(and applied reverse byte ordering to each one of those four colour values).
You will get two search results on this (I assume one is for the ux028 texture, which I assume is the eXtra jersey type - but I didn't care and changed the socks colour on both results :)).

Here is the search result in the hex editor:
Image
Marked red is the byte I changed to '00'.
(EDIT: here in the old value of '40' the 4 stands for the socks colour and the 0 for the jersey type. I read on OS about additional information in the roster file [it was for the xbox and the roster file format is not identical there] that the second digit means collar type. '0' is standard round collar type I guess. For jerseys of the Heat or Kings with their v-neck jerseys you will find an '8' in that place. So instead of '40', for the Kings there would be a '48'. In that case you must only edit the first digit of the value, i.e. make it '08' to not affect the collar type of the jersey. This information is regarded as 'JModel' column in REditor.)
Green is just the Blazers' ID.
As I said I did the same replacement for the second search result on this string.
To make sure your change is working you only need to save the roster file in the hex editor and reopen it in REditor, looking at the jersey tab again to confirm that the socks colour got changed. So no need to run the full game for testing this time.

Now, in order to not make the game crash with your changes, you only need to update the Crc32 checksum at the beginning of the roster file. Do this - as JaoSming described in his post above - by deleting the first four bytes of the file, then saving it, using the program he mentioned to compute a new checksum for your changed file and insert this checksum in reverse byte order into the very beginning of the roster file, then saving it again.
Done.

EDIT: The same procedure can be applied to Association savegames as well. So no need to start a new save with a fixed roster, just fix you current savegame. I would think that it works fine for MyPlayer saves too, but I didn't check that. Only did it for a plain roster file and an Association save.

Thanks to everybody putting time into working on this to make the job easier for others.
flitzpiepe
 
Posts: 39
Joined: Thu Mar 01, 2007 5:25 am

Re: Hex Editing: Rosters - Socks Location

Postby gamez on Sun Jan 22, 2012 1:15 am

Great tutorial flitzpiepe, very useful (Y)

It would be great if someone with the full version of REDitor help us to hex edit basic fields that can´t be edited in the free version of REDitor (like Team Type).
User avatar
gamez
 
Posts: 91
Joined: Thu Feb 26, 2009 1:18 am

Re: Hex Editing: Rosters - Socks Location

Postby fumanchu on Mon Jan 23, 2012 3:08 pm

question on the color number.....if 4 is black, based on the blazers u edited, 0 is white...where can i find this color list? thanks
:twisted:
User avatar
fumanchu
D' Energizer
 
Posts: 1430
Joined: Fri Mar 28, 2008 7:49 pm
Location: Manila, Philippines

Re: Hex Editing: Rosters - Socks Location

Postby JaoSming on Mon Jan 23, 2012 10:31 pm

socks can only be 1 or 0, socks with custom colors are decided through player accessories
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters - Socks Location

Postby fumanchu on Tue Jan 24, 2012 12:31 am

1. sorry im too slow but is trying very hard to understand hex editing...from what i understand, we can hex edit everything in the roster like having a paid reditor..right?

2. i dont fully understand this line ----- "socks with custom colors are decided through player accessories"
:twisted:
User avatar
fumanchu
D' Energizer
 
Posts: 1430
Joined: Fri Mar 28, 2008 7:49 pm
Location: Manila, Philippines

Re: Hex Editing: Rosters - Socks Location

Postby JaoSming on Tue Jan 24, 2012 1:32 am

theoretically yes, we can edit as much as the REDitor can through hex editing but we dont know how yet

sock colors other than white and black are controlled by the player accessories, not the team's uniform
Opinions are my own.

JaoSming
2KTV Producer
NBA 2K Developer
 
Posts: 29904
Joined: Tue Sep 13, 2005 12:45 am
Location: 2K

Re: Hex Editing: Rosters - Socks Location

Postby gamez on Tue Jan 24, 2012 2:23 am

JaoSming wrote:theoretically yes, we can edit as much as the REDitor can through hex editing but we dont know how yet



Well, in order to know, you can change something in REDitor and then compare the change in the roster file...
User avatar
gamez
 
Posts: 91
Joined: Thu Feb 26, 2009 1:18 am

Re: Hex Editing: Rosters - Socks Location

Postby flitzpiepe on Wed Jan 25, 2012 5:45 am

But you cannot edit everything in in the free version of REditor.
So far I didn't care about anything else than the team socks color. This was one issue that was always really bugging me and since my favorite roster wasn't including a fix for it I took the time to figure out how to change it myself.

Is there anything specific that you would like to change ? Maybe I find something more out.

JaoSming wrote:sock colors other than white and black are controlled by the player accessories, not the team's uniform


Is there a setting in the player section that allows you to overwrite the team's socks color ? I'm trying to remember right now whether I've yet seen a player in the game with a custom socks color.
flitzpiepe
 
Posts: 39
Joined: Thu Mar 01, 2007 5:25 am

Next

Return to NBA 2K12 Tutorials & FAQs

Who is online

Users browsing this forum: No registered users and 1 guest