Closed ctrpetersen closed 2 years ago
Thanks for going to all the trouble of extracting those GUIDS! I had a similar issue with going through the asset files trying to find display names to go with the GUIDs, I would agree that there is likely a trick to finding them, but such a trick escapes me at the moment.
Unfortunately I don't have a ton of time to put into this aside from bugfixes. I also am not sure how to directly unlock cosmetic items, so I'm not sure I can incorporate these changes at the moment. I use Qt Designer v5.11.1 to design the interface, so if you want to put in a pull request, I'd be happy to review it and would definitely add your name (and a link to your github) to the readme. But to be clear, I don't have any plans to add new functionality in the next few months.
I had another look at it. It seems they're simply stored in an array of unlocked vanity item GUIDS for each class. Replacing it is easy enough, one can even unlock everything manually, it just takes some time. Just find a vanity item you know the id of, make sure it's unequipped (just unlocked), then replace it in the 4 instances it occurs. Surprisingly I had no issues with this - the game even lets you buy the old one again, letting you repeat it forever until you have all the vanity unlocks.
Automating it however seems much harder. Each class has an array called UnLockedVanityItemIDs
(sic), where the 2nd, 4th, 6th and 8th instances will be the actual arrays. The last two looks to be some sort of descriptor? This is the 5th class, the internal testing class.
Regardless, adding anything to it (not replacing) will cause the game to hang on load. It seems this is more related to changing the size of the file (checksums?), rather than adding to the array. To proceed, one would most likely need to deserialize the entire file and repack it.
This is unfortunately way out of my skill level. I'm putting what I found for clarity anyhow -- maybe someone else will have a look. I might give it another look in the next weeks, see if I can find the differences between the files on a vanity item unlock.
Like described, unlocking everything is possible, just kinda cumbersome to do so. If I find anything more, or a solution (having display names working as well would be perfect), I'll post or do a PR if I get anything working.
I think the reason it's hanging on load is because those arrays you saw have a value just before the listing that defines the length of the array, so you're creating a mismatch between how long the game is told the array is and how long the array actually is.
Here, the length is 134, meaning there are 134 GUIDs in the array. If you update that value as well, it should load just fine.
If you do manage to find out some pairings of GUID and display name, The best way to provide that data (even if incomplete) would be to copy the format seen in "guids.json". Then I would just have to create a new area of the GUI for managing that and much of the weapon overclock code could be reused. Thanks for poking around, you seem to be discovering the same thing I did, that you're gonna spend WAY too much time staring at a hex editor for this :P
Wow, thank you! I'll have a go at it later today.
In the meantime, I tried my hand at parsing the display names again. It's janky as hell but it does work in most cases. vanity_items_temp.txt This is definitely not the best way. I'm probably gonna end up writing some quick and dirty CLI tool that just prints all alphanumeric strings to the console, and manually selecting which one is the correct one. Still a bit tedious, but much better than having to open each one in HxD.
Thank you for the size information, I'll experiment with this later today. This is my first time working with hexadecimal (and binary data), so all of this is new to me. I'll probably put up a PR sometime in the next days if all goes well.
@ctrpetersen It might be a long shot, but did you make any progress on this?
For the record, I have no plans to add cosmetics support.
Hi, wonderful program! Support for the limited time cosmetics would be a fantastic addition. I'm not sure how they're stored in the save files, as I've only done replacements, not addition.
I wrote a small python script to parse out the IDs of each respective vanity item. The only issue I'm having is getting the display name that doesn't include having to open each item in HxD. The display name is stored in the VAN_*.uexp file, but they're at different offsets with different patterns before them. Maybe there's a trick to getting these, I don't know.
Regardless, I've included the limited time cosmetics should they be of interest. The full vanity items list is also included, but with internal names and not display names. vanity_items.txt
Scale Brigade Armor:
Seasonal