Attribsys_tools
Some simple tools serving as informative examples for parsing and reconstructing AttribSys vaults housed inside of VPAKs, specifically as it pertains for Need For Speed games such as Most Wanted (PC).
How to use
The AttribSys "vault" format is a convoluted mess of dependencies and cannot realistically be parsed in a "modular" fashion. It's all or nothing: you have to parse the "whole game"'s data.
The export_mw.py script is an all-in-one python script to export any amount of data you want from Need For Speed: Most Wanted. Most Wanted is somewhat special and this exporter will absolutely not work on any other game, even though the file format is nearly identical.
Simply run:
python3 export_mw.py out.json attributes.bin gameplay.bin FE_ATTRIB.bin
to export all the relevant game data from Most Wanted. Provide the
correct paths to each of the files, and the order matters:
attributes.bin
MUST come first to provide the classes necessary to
parse the other files. You don't have to provide all the files,
leave out any you think you don't need. You can also add additional
files, it is an arbitrary list after the json file.
About
I've tried tirelessly to not have to parse the entire game, but SO MUCH of the
data is stashed away in blobs that have no rhyme or reason without
the context of the classes from other files that I've given up. I
think that realistically, the only way to parse these attribsys
files is to include all the context necessary from the game.
This usually entails parsing three or more files: an
attributes.bin
file first, then a gameplay.bin
and
optionally an FE_ATTRIB.bin
, at least for Most Wanted. Other games
have different requirements, but the Need For Speed games largely
require parsing attributes.bin
first to have the classes necessary
to parse the data-only gameplay.bin
and others.
Note that some files are "compressed" with a proprietary compression JDLZ; this program does not decompress those.
Obsolete folder
There's a bunch of previous attempts at creating tooling in the obsolete folder. Feel free to look through it if you need more information; particularly attrivault should give you a good feeling for the data types stored in vaults and AttribSys etc.
Acknowledgements
I would not have been able to document this without referencing the work of several individuals:
- https://github.com/LeoCodes21 for making Attribulator and VaultLib, which was the bulk of my reference
- https://burnout.wiki/wiki/AttribSys_Vault for documenting most of the VLT/BIN format, and for the invaluable diagram https://static.wikitide.net/burnoutwiki/b/bb/PUSMC01_AttribSys_Breakdown.svg
- The encouragement and help from https://nfs-modding-wiki.neocities.org/wiki-data/main/, especially with testing the code in-game.