New addition:
sr2_chunk_replace_gmodels.py
This is very crude and a lot of information is lost in the process, but here's how to try it:
1: Unpack chunkfiles, you need both chunk and g_chunk:
2: Run
extract_gmodels and
extract_materials
3: Do your changes here
(but I recommend checking that it works as is first!)
4: Now run
replace_gmodels
5: Put them back in.
In g_chunks, there aren't many things left to figure out, but the last ones always takes the longest.
So please don't expect this to be
actually usable in a while.
Some notes:
* Do not change the number of models in the folder (.obj files, anything else is ignored).
* Do not change the number of materials in a model.
* Materials can be changed by renaming them (like
mat69 to
mat420)
* Material names only work in format
matN where
N is a number.
* In blender you can easily end up with names like
mat0.001. This will break the script. Actually I could filter those out, but for now avoid them.
* You can rename models to something more descriptive, like
g_mdl_123.obj to
g_mdl_123_house.obj. Just keep the alphanumeric order the same.
Do tell if you come across a chunk that doesn't load or crashes the game.