Talk about NBA 2K14 here.
Sun Nov 10, 2013 4:18 am
Since it is not possible to load player ratings from a given roster file into an existing Association savegame, I imagine there could be a tool that does this automagically.
The input files would be a file in .ROS format and an association save in .FXG format.
What's needed is the knowledge of how to safely locate players by their respective IDs within both files and how the rating and tendency values are ordered in both formats (I assume the same ordering at least?). Then there could be a byte-wise diffing/copying been done to copy the values over from the roster file into the association save.
To give more control over it, an ID-range could be specified which players are to be treated.
Then only the checksum needs to be computed, this could just be coupled within a batch script with the win32chksum tool.
I think it should be doable, shouldn't it ? And it would certainly be cool to be able to start an Association game and inject some roster values later on, when somebody shared a set of ratings within a roster file.
Sun Nov 10, 2013 12:34 pm
You might want to bring that idea up in the RED MC thread, since it's the tool that will be working with the appropriate files.
Fri Nov 22, 2013 3:47 am
I toyed around with the idea a little bit. Changed some things in a roster file and looked at the differences in the resulting saved roster. I know the block that contains all player ratings and tendencies.
In short, I managed to copy all ratings and tendency values from a roster file into an Association savegame. I did this for a single player but now want to have the tool do it for all players defined in a .ROS file. I am not 100% if I have the correct byte sequence which identifies a player within such a file, but it works for a specific player (Earl Watson

).
I will certainly use this for myself, because I want to be able to copy newer/more rosters into my running association savegame. If there is interest, I could do a little write-up about my approach or just release the tool for others to use. It is just a commandline thing write now, programmed in C++, not the most user friendly maybe.
Fri Nov 22, 2013 3:55 am
Anything that can help others is always good. If you've already figured out where that information is, Leftos' 2K13 Roster Editor is open source (it is C# though) and could provide the framework for a tool if you wanted to go that far into it.
https://github.com/leftos/nba-2k13-roster-editorStill, barebones commandline or not, any tool could prove to be useful.
Mon Nov 25, 2013 3:53 pm
I analyzed the roster files and association savegames for a bit and came up with a few good points, but there are still problems left.
- player data: I found out that the player data is contained in sections which are separated by a delimiter of a bunch of FF bytes and that there is always an upper and a lower half to each section, each separated by a delimiter again. One section is 911 bytes in size and each other delimiter ends in a shifted byte. That is, the first byte after a delimiter should be 0xc0 but every other time the sequence is "ff fc 0. .." instead.
One problem I think I solved, is how to uniquely identify a section of player data within the roster file and the association save. At offset 338 (decimal, relative to the section start) and with a length of 4 bytes I found a value that is unique for each section and corresponds to the values in the FXG file:
first column is the id, second the number of bytes in the section, third the starting offset of the section and last the byte-difference between two section starts, i.e. its length including the last delimiter.

- ratings:I found out, that the ratings and tendencies are stored in two successive blocks of bytes. Ratings are probably shifted again, or two ratings share some bits, I'm not sure. E.g. I set Earl Watsons ratings to 83 each and his tendencies to 78 each. His ratings show up as a block of (shifted) 0xAE bytes while his tendencies are listed as 0x4E bytes. The latter directly translates into 78 decimal, which is good, but the former is weird. But I didn't investigate too much as my tool shall only copy those values.
- ratings location:The problem now only is, that I am not sure about the ratings location within a section. I currently have two examples which seem to contradict each other.
Watson's ratings start at the relative offset 693 (dec.). But when I did the same procedure for L.Aldridge, his ratings where located differently, at offset 238, that is even in the section's upper half...
The section starts look o.k., all sections before theirs have been parsed with 911 bytes length (so I didn't miss half a section before or something). I will quickly post some screenshots of the sections before I have to go but will post more findings/progress later:
their sections in the list: it's the ones ending in ...176 and ...17c respectively

watson's section, player ratings + tendencies in the lower section half

aldridge's section (I didn't set all ratings and tendencies for this one, only enough to locate them, 0xc3 are his ratings (set to 90 each), 0x46 are his tendencies (set to 70 each = fits)

Mon Nov 25, 2013 11:07 pm
I apologize
flitzpiepe, I had some information that may have made that a bit easier for you
- Code:
ratings x/3+25 = y
3y-75 = x
x = rating in roster (0-255)
y = real rating (25-99 {110 Theoretical})
For navigating the shifted files, I use
Find That Hex by Leftos. It can either find shifted hex giving byte and bit offsets, or shift an entire file by a certain bit offset.
Tut -
http://www.youtube.com/watch?v=WFL6pzyhJwUFor roster.iff editing (I don't know if this will be helpful for you or not), which is the file that generates ROS save files and does not have any bit shifting, thread here -
viewtopic.php?f=153&t=92732- Code:
1e4 each player
starts at 5098 - dec 20632
|Decimal Offsets Now|
-==========-
int16 values
28 - ASA
58 - port
298 - CF
324 - Audio
-=========-
First Player
20668
Each player
484
port
28
cf
30
asa
252
audio
20
1665 players on 105 teams, and 102 arenas on the file
Undershirt
163 in
10 = tshirt 16
2a = undershirt 42
00 = none 0
BF = long 191
Undershirt Color
168 in
00 = white 0
55 = black 85 85 21
3f = TC2 63 63 31 11
1a = TC1 26 26
155 in genericF 00 or 40 = no A1=yes
~229 animations
926832 - teams
each team = 760 long
36 after first go = GID
1556132 - jerseys
68 for each entry
ID 2 bytes in
go codes 8 bytes in
celtics home
1563686
clips sleeved
1564156
Tue Nov 26, 2013 5:48 am
Thanks a lot, Jaosming.
I also read about the shifted bits in the file and I included an according shifting function (in case my tool would need it internally).
It was nice to have the names section readable again. But not all data needs shifting, does it ? The ratings and tendencies look ok as they are in a .ROS or .FXG file.
What puzzles me the most right now is why sometimes the ratings section seems to be in the upper half of a player section and sometimes in the lower half. But for the examples I have seen there seems to be a constant 237 byte offset from the beginning of the section half to the beginning of the player ratings. I will look at more examples to see if the beginning of a section gives a clue about this.
Also, the ratings and tendencies are sometimes byte-aligned and sometimes shifted by 4 bits. In the aldridge section, the C3 ratings and 46 tendency bytes are what I expected but in the watson section the values are shifted by half a byte.
I looked into the source code of Leftos' RosterEditor and he seems to be using a constant offset of 477 bytes (+5bits) for the start of the ratings section, but this doesn't seem to apply here.
Tue Nov 26, 2013 6:06 am
iirc, from my very brief look into updating Leftos' tool, each player is xxxxbytes+4 bits, which is why some players can be bit aligned and others arent.
The issue is with official updates, since when/if 2K adds players it can affect the bit alignment of all the information in the roster file.
I would recommend taking a look into operationsports' NBA 2K rosters forum for the hex editing thread. Even though they are doing 360/PS3 editing, it is pretty much the same stuff.
Tue Nov 26, 2013 6:24 am
Yes, but my problem is not with alignment but with a totally different offset for the ratings values. One time it is 693 bytes relative to the playersection start and the other time it is 239. Maybe it is something they are doing only since 2k14 ?
Tue Nov 26, 2013 6:31 am
If you mean between the different filetypes (FXG and ROS) that is due to the extra stuff that needs to be saved for associations.
Tue Nov 26, 2013 7:21 am
I meant within the same .ROS file
As far as I know, the section for a player has the same length in a roster file and a savegame file.
Thu Nov 28, 2013 3:56 am
The half-section thing was not an issue with the savegames/rosters afterall. But it's corrected now.
I am now able to read the complete roster file and copy all ratings and tendencies from there into an association savegame.
I updated the checksum manually and the association save was loaded by the game successfully.
The part that doesn't work is the correct identification of players. I used a string which is unique for each player section (starting at offset 0x338) and is 4 bytes long, but it doesn't seem to be an id that is used for that player in both fileformats. Maybe an identification by name would be the correct way to do that ? But I currently don't know how to make that mapping.
Anyway, the ratings and tendencies I transferred where put used for the wrong players in the .FXG file.
I prepared a few players with easy-to-identify ratings but it was not the correct players who received those ratings.
Thu Nov 28, 2013 4:40 am
the first 8 bytes of each player's entry are "jump"? codes for their names in the bank of names. So 8a8b9d04 = 49d8b8a in hex to that player's name in the bank of names at the bottom of the file.
The easier way to identify players is through their Cyberface ID, which is what Leftos' tool used instead of using those jump codes to find the actual name. Using this list -
viewtopic.php?f=154&t=92751 - you can read the CFID of each player and have the tool recognize them through that.
Better format of the CFID list here -
viewtopic.php?f=153&t=93692
Thu Nov 28, 2013 5:13 am
thanks, I was just exploring the thread at operationsports about hex editing, found the player's cfid list and found out the offset for reading them from the roster (it's 0x400 relative to a section start).
I will use this and realign my tool to use the cfid instead.
I will use the player name to verify that this is the correct mapping, as the portrait id might be changed for custom rosters.
Thu Nov 28, 2013 5:19 am
That's awesome man, thank you for putting work into this
Thu Nov 28, 2013 7:34 am
thanks.
it worked partially using your tip. Aldridge got copied successfully for example, as was w.Matthews. My initial example Earl Watson wasn't, though.I saw that his section is not byte-aligned, the other two are. This is why his cfid wasn't detected by the tool.
So tomorrow I will test it with using the alignment as well.
Sat Nov 30, 2013 9:29 am
There shouldn't be much left until it's working. I figured out that I had the section layout wrong afterall. Now using the CFIDs to map sections.
I have to exclude sections so far which are of different byte alignment in both files. Outside of those exceptions, I am able to copy the majority of a roster file into an association savegame (only ratings and tendencies, still).
Sat Nov 30, 2013 7:40 pm
Ok, it works for all tendencies & ratings of a complete roster.
I figured out that some sections are of different alignment in each file, due to the (possible) different ordering of players in the roster file and in the savegame.
I generalized the extraction of the block of ratings and realign them to match the alignment of the target section in the output file.
Later today, I will create a little commandline interface for more convenient usage and then put it up for review (in case anybody besides me finds this useful

).
I can then put the sources on github and make a little write-up about the details I discovered in the roster file.
Copying other things like sigskills can come later.
But much more shouldn't be useful. The initial idea was to start an association now and copying in better ratings+tendencies later, when they become available. We'll see
Sat Nov 30, 2013 11:13 pm
like I said, I'm sure others may find this useful since keeping Associations updated with ratings and such is important
I think signature animations and gear would probably be the two to focus on beyond ratings and tendencies, at least those are the two I see requested often
Sat Nov 30, 2013 11:46 pm
I am envisioning a simple gui interface, where you can select two input files, possibly a list of cfids to copy and then copy ratings, tendencies, sigskills and gear as seperate options.
Also missing is an automatic computation of the crc checksum. Since I used C++, I can maybe use a boost library for this.
Powered by phpBB © phpBB Group.
phpBB Mobile / SEO by Artodia.