tomwearsglasses Posted October 15, 2017 Posted October 15, 2017 (edited) Hey Everyone, I spent all day trying to figure out how to add renders. Didn't make any hard progress, but learned a lot and collected all this info to serve as a knowledge base. I wanted to make another go at trying to figure out how to add (as opposed to replace) renders in the game. I know most people are looking toward next week's 2K18 release, but since I suspect that the modding restrictions will be as bad or worse than 2K17 - I want to try and crack this code in a less restrictive environment first, and then build up from there. For the purpose of this test I'm using 2K16 main because it doesn't introduce the complications of the new shdc files. If we can figure it out in that game, it should make it much easier to do so in 2K17 and then 2K18. I'd like to leave this here since the 2K16 forums were moved off the main page area and I don't think many people will see this in there. Plus the goal is for this to ultimately be applicable in all games. So what I'd like to do here is pull together what everyone has discovered individually about how the game finds and loads renders, see where the gaps are, and try to figure them out. ____________________________________________ Goal The goal here is to determine exactly when and how the game pulls the information and determines which render image to display. At this point, it shouldn't be difficult to add new renders to the existing pacs, or add new pacs that the game would read. We just need to get the game to recognize new entries. This might be hard coded into the program, and impossible to change with modding. But most of the game's assets seem to be pulled by the game from specific locations as needed. Since we can add character models, movies, new pofo entries, DLC, etc. to the game - I'm still optimistic that there's a way to do this. ____________________________________________ General Info There are three render types associated with a character. Type A: Match Load Screen Type B: Character Select Screen Type C: Health Bar I'm focusing only on Type B for now, because it's the quickest to access and easiest to test. Perfectplex posted a fantastic render table with pictures and reference info here: ____________________________________________ Files Here's how things look on the file side of the equation. All of the type b renders are stored in these pac files:pac/menu/assets/_wwe16singleread/ssface/typeb/ltag_typeb.pac pac/menu/assets/_wwe16singleread/ssface/typeb_dlc20/ltag_typeb_dlc20.pac pac/menu/assets/_wwe16singleread/ssface/typeb_dlc30/ltag_typeb_dlc30.pac pac/menu/assets/_wwe16singleread/ssface/typeb_dlc40/ltag_typeb_dlc40.pac Each .pac file contains a set of .pach files, one for each render. Each of those pach files contains exactly two .bpe compressed files. The 0000 file, when uncompressed, contains the string filename of the render image (which the game seems to reference when loading the render). The 0001 file, when uncompressed, contains the actual .dds render image file (DX10 format). Mr. Perfect Example: In ltag_typeb_dlc20.pac, you'll find A5388406.pach. In A5388406.pach, you'll find two .bpe compressed files - 0000 and 0001. 0000 - when uncompressed, contains the file name: 0193_mrperfect.dds, followed by one more hex entry of 0A. I'm not sure if that value is relevant in any way. 0001 - when uncompressed, contains the actual .dds render image. That's basically it. As far as I can tell, we have a good understanding of the file structure. The only unexplored area I can think of is the question - are there any other .pac files that contain information the game reads - that somehow links the renders to the character IDs? ____________________________________________ Game Here's where the big knowledge gap exists, what the game memory seems to be doing, and how it actually looks in game. What You See When you go load the game and go to a character select screen, you see a dummy render for each selectable superstar. As you scroll through the character selection lists, the render image changes to match the highlighted character name. Mods show the dummy render image. When you switch between characters, the previous render disappears momentarily, then the newly highlighted render appears. This could mean that the game is unloading the previous render, then loading the next at this point. When and Where Does Render Info Load? I'm using Cheat Engine scans and memory view to get this info, and still using the Mr. Perfect example. Note the addresses will change each time, but the new address location can always be found by searching for these values. When loading the game, a memory scan for "A5388406" (as a string, not hex), or "0193_mrperfect" (the filename from the pach), turns up nothing. Still nothing when the character screen loads. Still nothing when scrolling through other wrestler renders. However, as soon as you scroll over his name and the render displays, they both show entries. I seem to get 6 value hits for the 0193_mrperfect string and 2 value hits for the A5388406 string. Interestingly, if I continue scrolling, one of the A5388406 values continues to change, but the other doesn't. And 4 of the 0193_mrperfect addresses stay consistent with the characters, the 5th does sometimes (other times it shows something weird), and the 6th entry consistently holds Mr. Perfect's 0193_mrperfect value. Also of note is that only some of the entries change when selecting a manager or opponent. Locking or changing these values does not have any affect on the game's displayed render. My guess is that these values are being written after the game picks the render. But it also could be misleading - as sometimes Cheat Engine changes need to be refreshed before they take effect. But the only way to refresh those values is to switch to a different render, which overwrites it. Searching the Memory Regions (Break It Down) So lets look at the memory region around those addresses that are holding values that appear to be related to the Mr. Perfect render. A memory viewer look at our 1st A5388406 value address shows that it's actually referencing the ltsa path: /LTSA/A5388406 It's followed nearby with five entries for /LTSA/0D096CEE, which is the hex for the Dummy Type B render. After that is one of the 0193_mrperfect value addresses, which we'll get back to. The 2nd A5388406 value address is also interesting. It also references the ltsa path: /LTSA/A5388406 And shortly below it also references the full game file path to the .pac file which contains it: pac/menu/assets/_wwe16singleread/ssface/typeb_dlc20/ltag_typeb_dlc20.pac Further down you'll see info that reads ltag, some more hex, then eb_d. Scrolling up and down in the memory section, you'll continue to find entries for the other renders that the game has loaded during this session, in the same format. So what about the 0194_mrperfect value references? So address 1 and address 2 are pretty close together, as you can see in the screenshot. Not much easily discernable data around it. Except for one standout value between the two: _mrp This value changes along with some of the others whenever you cycle through the renders. It's MOSTLY related to the character but with interesting exceptions. One of them is that all three distinct Undertaker ch ID's all share the _und value. Ric Flair, Rick Rude, and Ricky Steamboat all share _ric. But each Sting has a unique value (_sti, _blo, _cro). Arn Anderson, Arnold 1, and Arnold 2 all use _ar, and those are the only ones that don't have three letters after the underscore. 2K17 Sidebar: This address entry seems to exist in 2K17 as well. In the 2K17 HOF DLC pack, everyone's value is _sm1. But in the other DLC packs, they have individually named ones. Characters with two attires usually have the same value for both attires. But the different attires always have a different file name. Moving along to 0193_mrperfect address 3, it's not far below address 2. Nothing immediately recognizeable between the two. Address 4 is the one that was below the set of /LTSA/ references. Address 5 is in a different location. The thing I found interesting here was the e.dds text a few lines below it. Address 6 actually changed its value from 0193_mrperfect to something totally unrecognizable by the time I got to this memory search. This was the value that stayed with Perfect's entry when the others were changing based on the selected render. I don't know if that makes it more or less worthy of exploring. ____________________________________________What Values Do Mod Slots Reference? Unfortunately, none of these addresses indicate looking for something else before loading the dummy render image. The hex reference loads 0D096CEE, and the string references all load 9999_dummy. So obviously at some point before these memory value references, the game is deciding which render image to load. I'm still banging my head against the wall trying to figure out where that point is. ____________________________________________Avenues to Explore Since most things in the game search predetermined locations for values, then load them - perhaps there's either another place where we can add entries for the game to reference. This could be in the form of a link within the game memory between the ch ID's and the render hex values and file names. Or it could be another .pac file. There might also be unexplored startup files with render references. My first big question is: does anyone have info they can add to this? I know a lot of people that understand the game better than me have looked into this before. @Perfectplex @pozzum @tekken57 @TheVisitorX @Cave Waverider @4 Life Any ideas, corrections, stuff that didn't work, etc. would be extremely helpful and appreciated. Other things to further investigate: Figure out how to replace CAW renders, and see what we can learn from that. We know it's possible because someone already made a trainer that can do it. Further exploration of initial game load files (meaning any files that the game might be scraping for this data). 10/30/17 Update - I basically went folder by folder and removed pac files to see which affected the renders or character select screen. While I couldn't find anything that specifically removed the renders, these are the files that crash or freeze the game (on or before the character select screen): pac/misc01_start.pac pac/menu/ltst_lt_wwe16.pac pac/menu/projects/ltpj_common.pac pac/menu/projects/ltpj_exhibition.pac pac/menu/projects/ltpj_loading_general.pac pac/menu/projects/ltpj_preload.pac pac/menu/projects/ltpj_wwe16_ss_select.pac Therefore IF the game is pulling the render references from a pac file, it's likely one of these. So far I couldn't find anything in any of these files that I thought was related to the renders though. If someone with more Cheat Engine experience can re-test this, they might get further. See if renaming the .dds filename in one of the Type B pach files, or conversely renaming the pach but leaving the filename, does anything in-game. Where else could there be a connection between the ch ID and the render ID? Can we trace the source that these memory addresses are pulling the data from? From Tekken57: With regards to how the game recognizes which render to assign to the wrestler, I am assuming that the id of the render is associated to the slot. I've tried to decipher this value but it seems to use some kind of string hash which I couldn't figure out. to make matters worse, the string hash value changes between games. I.e the rocks render has a different value for 2k16 and 2k15. Either there is a file containing a list of values cross referenced with the slots or the game itself contains a function which hashes the values. I haven't been able to find either. Things we have ruled out: Are there any pofo/moveset bytes that haven't been defined yet Further analysis of the chetc files. Info from TheVisitorX and Perfectplex: In an old post Perfectplex mentioned the chetc.pac files being the only files he could find that had an effect on the menu. Looking at the chetc_dlc20.pac file, it includes two pach files - DAT and PRO. Our example case, Mr. Perfect, is 0003. The DAT files are pofo files, and the PRO files are moveset files. Edited October 31, 2017 by tomwearsglasses 1 1 Quote
TheVisitorX Posted October 15, 2017 Posted October 15, 2017 (edited) Very interesting topic... Unfortunately, this is one of the areas which have not yet been discovered.. All I can tell you is that *.pro and *.dat files in chetc are pofo (dat) and moveset (pro) files. That's how they call it. I'm really sure that @Perfectplex can tell you more about that. But if I remember correctly, he told me that there is no relation between that files and the render images. And it can't be something in the pofo file because, if that would the case, a modded superstar with the same pofo should have the same image. I think there is another file for the relation between slots and renders, maybe another database file. The dummy file is always showing when a slot don't have a render assigned to it. I've tried a lot to find the matching file but without a success.. Edited October 15, 2017 by TheVisitorX Quote
MatMania Posted October 15, 2017 Posted October 15, 2017 Have you considered asking the 2K14 modding guys? I only mention it as I believe someone, maybe Red Rooster?, created an additional render pac for that game. Maybe they can point you in the right direction? Quote
jakeypearce Posted October 15, 2017 Posted October 15, 2017 The issue is, ever since 2K15 on the PC, the way the slots are labelled is with a unique ID that also varies in length. In 2K14, each render ID was that of the CH pac file. For instance, the render for Rock was 100, Austin was 101, Triple H was 102, Brock Lesnar was 343, etc. The Rock's type B in 2K15 is 1B95EBA4, which changed in 2K16 and 2K17, and will also likely be different in 2K18. The ID could be XORed with a different value that only the developers know. Quote
tekken57 Posted October 15, 2017 Posted October 15, 2017 (edited) The game loads the render into the LTSA directory for 2k17 as well, even though PAC file is hspc and doesn't list the LTSA prefix. You may by able to add additional PAC files in the old format to 2k17 as the game does recognize these. With regards to how the game recognizes which render to assign to the wrestler, I am assuming that the id of the render is associated to the slot. I've tried to decipher this value but it seems to use some kind of string hash which I couldn't figure out. to make matters worse, the string hash value changes between games. I.e the rocks render has a different value for 2k16 and 2k15. Either there is a file containing a list of values cross referenced with the slots or the game itself contains a function which hashes the values. I haven't been able to find either. Edited October 15, 2017 by tekken57 Quote
Perfectplex Posted October 16, 2017 Posted October 16, 2017 (edited) I don't want to get hopes up and don't want to say too much but I've been hard at work digging around again, I have a bad memory so approached things from a fresh install. Bannockburn showed me how to do memory dumps with task manager which opened up a whole new level of exploration for me (cheat engine and I dont get along) which lead me to making some interesting headway on certain things I don't really want to go into detail here as to not give false hopes or promises and to allow room for error in my findings. One of those things I was looking at again was the renders, Bannock pointed me to this thread and I must say I am really happy to see this level of intense experimentation and file surgery, the more people tearing at the files the better chance we have of finding new little tricks. I am just about to spend a few hours now solely looking at renders and I will gladly relay anything remotely helpful for you in this thread. Its been too long, nobody wants to look at them generic shaded character renders anymore, we need a whole cluster of mugshots, I know it doesn't make any difference per-se to the game but there's something a bit comforting to see all characters represented by a render, just feels better somehow. Great work Tom, if I don't find anything I will let you know before I take a break to play some 2k18, which is why im scrabbling around now last minute, unfinished business. Edited October 16, 2017 by Perfectplex 1 Quote
tomwearsglasses Posted October 16, 2017 Author Posted October 16, 2017 Thanks everyone! I just updated the main post with the info you've shared, and crossed off the possibilities that have been ruled out. Sidebar: The chetc files holding the pofos and movesets is very interesting. I just tried editing one to see if it registers in the game, and it didn't do anything. Not gonna think about it now because that'll take me off track, but I wonder if the game uses this at all. Quote
Perfectplex Posted October 16, 2017 Posted October 16, 2017 nah, the chetc files are for the preset default dat and pros (portfolios and movesets) assignments and how I create 498 character slots. There is one file in the first chetc file which I couldnt work out exactly what it was doing which is 90627ABD9968908.shdc (charwaza.wcm) the game reads the renders at the title screen and assigns them to a 4 byte (I think) id which is then controlled by other files, you would be closer looking in the misc start files. Quote
tomwearsglasses Posted October 16, 2017 Author Posted October 16, 2017 Thanks - I agree with the chetc and putting my interest in it aside for another time. For this testing, I've actually been going back to 2K16 - since I think the shdc adds another layer of confusion that I'm not ready to deal with yet. Quote
Perfectplex Posted October 16, 2017 Posted October 16, 2017 (edited) OK so what I did was create just 3 renders which I knew the original load order of. Keeping in mind im using 2K17 but it should be the same process in 2K16. Then using just these three renders I changed the names of the pac files and tried multiple dump tests. The dump report reads them in pac name order to read the shdc ID's into memory then once its finished reading them it moves on to reading files for other things. The first render will always assign to 78 BE 02 00 2C A2 04 00 FF FF FF FF The second 84 BE 02 00 38 A2 04 00 FF FF FF FF The third 90 BE 02 00 44 A2 04 00 FF FF FF FF Ignore this part ^, the bytes following the 8 byte SHDC I'd's are dynamically created as a stream so if there is an earlier file that is removed or added it throws these offsets completely off. So here's just two test results of changing the pac names so they are in different alphabetical order. 4A 12 DE 96 E6 2D 66 D6 78 BE 02 00 2C A2 04 00 FF FF FF FF 2A 88 A2 73 66 75 65 89 84 BE 02 00 38 A2 04 00 FF FF FF FF C4 E5 6F B1 D0 61 BB 9A 90 BE 02 00 44 A2 04 00 FF FF FF FF 2A 88 A2 73 66 75 65 89 78 BE 02 00 2C A2 04 00 FF FF FF FF C4 E5 6F B1 D0 61 BB 9A 84 BE 02 00 38 A2 04 00 FF FF FF FF 4A 12 DE 96 E6 2D 66 D6 90 BE 02 00 44 A2 04 00 FF FF FF FF No matter what they don't change their usage type no matter how they load in (order) or what you name the pac files. I have already cracked how to do pach ID's to SHDC ID conversion but to do the same we would need to know the pach ID style string for a render, as we know however even back in 2K15 the renders have always used an SHDC style 8 byte seemingly random ID hex string. I was wondering if older games for the ps3/xbox360 had specific labels for the renders, I have never looked at the files for those games. If the game can load in renders if they use pach ID's like EMD 00034302 then I can convert them and find the hsdc ID to add more renders. Until there is a way to do this then I am out of ideas as the game specifically only looks for recognisable files to load into memory. Not saying there definitely isn't another way, just saying this is the end result of what I can achieve personally. Edited October 16, 2017 by Perfectplex Quote
tomwearsglasses Posted October 16, 2017 Author Posted October 16, 2017 Thanks for this! My hope for this thread is to collect all available info and exhaust all possible options - so every little bit helps. Given that I have no idea how the ID conversion might take place, and my data analysis skills are pretty weak, I'm gonna explore some different avenues first. Like combing through pac files trying to find an information link. Work fries my brain all week nowadays, so I'll probably get around to doing my next set of tests over the weekend. But anytime someone has an idea or tries something - please post it here. Quote
tomwearsglasses Posted October 31, 2017 Author Posted October 31, 2017 10/30/17 Update - I basically went folder by folder and removed pac files to see which affected the renders or character select screen. While I couldn't find anything that specifically removed the renders, these are the files that crash or freeze the game (on or before the character select screen): pac/misc01_start.pac pac/menu/ltst_lt_wwe16.pac pac/menu/projects/ltpj_common.pac pac/menu/projects/ltpj_exhibition.pac pac/menu/projects/ltpj_loading_general.pac pac/menu/projects/ltpj_preload.pac pac/menu/projects/ltpj_wwe16_ss_select.pac Therefore IF the game is pulling the render references from a pac file, it's likely one of these. So far I couldn't find anything in any of these files that I thought was related to the renders though. ___________________________________ I've also been playing with Cheat Engine, freezing all of the memory addresses that look to be related to the character/render - but I've yet to change any values that actually affect the displayed render image. Still not giving up on this as a project - but I think I'm gonna take a break from actively looking at it until I can think of a new approach, or until I feel like watching some more Cheat Engine tutorials. Quote
LordJustice17 Posted November 9, 2017 Posted November 9, 2017 I would suggest digging into the misc01. There seems to be a lot of stuff defined in that file. From what I've seen of the project files they seem more to create the templates of what stuff looks like (ex: this matchup screen should use these renders, and this text, and this background, arranged like this). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.