SpeedReflect / Binary

Tool for editing Need for Speed binary files (.BIN, .BUN, .LZC).
GNU General Public License v3.0
103 stars 12 forks source link

DBModelParts corruption (Undercover) #17

Open NI240SX opened 8 months ago

NI240SX commented 8 months ago

After adding several more or less customized DBModelParts to Undercover, the later added ones start to get corrupted with parts either losing all of their attributes and becoming REAL_CAR_PART or getting renamed to something completely unrelated such as KIT02_SEAT, KITW01_SPOILER, etc. Obviously this has an effect on the game (which will simply not find the affected parts).

At first everything shows fine in Binary until saving, then upon reloading the corruption will appear, I suspect this is a sort of compression issue. Attributes, and by extension parts, which are already exactly the same on other cars will generally be fine, new ones that don't exist on any other car are the ones which tend to break down the most (this also includes BODY parts with renamed CV attributes to fit to the car's XNAME, new kits, new part names, etc). This issue could be due to a sort of array of an arbitrary size that gets completely filled at export so there's no space for new attributes anymore, that's just a wild guess though.

Tested with versions : Binary : 2.8.3 Game : 1.0 steamless 10MB exe (doesn't really matter as the issue appears on saving files and can be seen from within Binary)

How to replicate : Install Undercover Exposed with every option left to default, or use the attached GlobalB from the same mod, then check in Modder mode that the very last DBMP (MIT_ECL_GT_06) gets slightly corrupted with some parts becoming REAL_CAR_PART while the source DB in DATA\CARS\MIT_ECL_GT_06\dbmp.bin is fine. Additionally, you can boot the game and check that some car parts are missing. Alternatively, I have attached multiple DBModelParts that cause this issue which you can import in the GlobalB from Undercover Exposed, see that they import just fine, and get corrupted after you save files and reload them.

Attached files : GlobalBs and DBModelParts

Videos : https://github.com/SpeedReflect/Binary/assets/80956231/7e524f44-6a79-41a0-b579-08d58b7b568e https://github.com/SpeedReflect/Binary/assets/80956231/1cef4ee6-7a8e-411f-ab37-4707b9213ff8

Screenshots : In game image image image

In Binary (Most of these issues were caused by adding new DBModelParts at the end of the list, they have been temporarily fixed with trial and error by changing parts, attributes, or rebasing the DB on another one. This cannot fix everything though, and remains a long process of trying until you get something that sort of works) image1 image3 image4 image6 image7 image8 image9 Corruption happening even in VECTORVINYL (which we edit as we add vinyls, but PRIMITIVE29 has never been touched) image5