Tooling built to recover editable source for six 'Mech chassis that exist
in the parallel FS_Build_V4H build but not in this repo. Reverse-engineers
every compiled record type in the .mw4 package format back to the .data /
.instance / .subsystems / .damage / .contents / .torso / .engine /
.armature sources the content pipeline consumes.
Nothing here is wired into the game build. It is a standalone analysis
harness run from Linux.
Package format
--------------
"#VBD" container. Directory records are [len][name][FILETIME][origSize]
[storedSize][offset], payload base at dword 0x0C. A record is stored raw
when storedSize == origSize, otherwise LZW (9->12-bit LSB-first codes,
256=clear, 257=EOF, dict from 258), per Database.cpp:451.
GameModel records are flat /Zp4 structs following the C++ inheritance
chain Entity(0) -> Mover(28) -> MWObject(80) -> Vehicle(664) -> Mech(756),
1636 bytes total. CreateMessage records follow Replicator -> Entity ->
Mover -> MWMover -> MWObject -> Vehicle -> Mech from start=16 (the
undeclared Connection__Message header), ending at 341 and padded to 344.
tools/decompile/
----------------
datamap.py header-driven layout engine; CHAIN + ANCHORS
{Vehicle:664, Mech:756} assert the struct offsets
mw4msg.py CreateMessage reader/walker
data.py .data constants.py define/table symbol resolution
damage.py .damage contents.py .contents
smallmodel.py .torso + .engine instance.py .instance
armature.py / armature_parts.py .armature + armaturedata/armaturevideo
assembly.py joint hierarchy renderer
make_generic_doll.py builds generic MFD/Radar damage dolls
verify_*.py per-type round-trip verifiers
Verified round-trip across all 64 shared chassis:
.armature 2938/2976 pages .subsystems 7579/7585 keys
.data map 6071/6071 values .data trip 8291/8306 keys
.damage 6605/6605 keys .contents 7480/7480 keys
.torso+.engine 1280/1280 keys .instance 896/896 keys, 64/64 pages
armature_parts 1202/1202 .data, 1149/1202 .video
Layout-discovery lessons (documented in DECOMPILING.md)
-------------------------------------------------------
- Never let a field map be discovered by the values that verify it. A
value-matching pass reported 4288/4288 while mis-assigning 34 keys. The
map was rebuilt from header declaration order, anchored on uniquely
resolved fields.
- Read the factory, not the data. 12 .data fields and 5 Torso fields are
declared plain Stuff::Scalar but multiplied by Radians_Per_Degree in
Mech_Tool.cpp:889 / Torso_Tool.cpp.
- Strip typedefs before walking a header. A stray `typedef int AttributeID;`
masked a missing ClassID - two 4-byte errors cancelling out, caught only
by the ANCHORS assertion.
- A verifier that silently narrows its own input reports success. Braced
blocks must be hidden before splitting pages, replacing both CR and LF,
because a `Shadow={...}` block contains a line reading `[shadow]` and
splitlines() also splits on bare CR.
- NSWIZZLE is undefined, so the #else branch is live and orders members
differently. bool is 1 byte; char x[MaxStringLength] is 256.
- V4H carries stale Mech IDs (their Atlas is 5, ours 6), so 64 of 65 shared
chassis are off by one; --retarget-ids emits $(M_<Chassis>)/$(IDS_<Chassis>).
reports/ holds generated diffs. The two ~5 MB manifest-*.tsv intermediates
are gitignored; regenerate everything with run-comparison.sh.
Co-authored-by: Claude Opus 5 (Anthropic) <noreply@anthropic.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
82 lines
4.5 KiB
Plaintext
82 lines
4.5 KiB
Plaintext
# variant packages: 797 (files on disk: 797)
|
|
# chassis defined in V4H core.mw4 : 71
|
|
# chassis defined in OUR core.mw4 : 65
|
|
# chassis only V4H defines : ['champion', 'dasher', 'griffin', 'jenner_2c', 'marauder', 'thunderbolt']
|
|
|
|
chassis count status
|
|
warhammer 36 loadable in OUR build today
|
|
rifleman 30 loadable in OUR build today
|
|
nova 24 loadable in OUR build today
|
|
atlas 23 loadable in OUR build today
|
|
madcat 23 loadable in OUR build today
|
|
thunderbolt 22 needs the new chassis ported
|
|
archer 21 loadable in OUR build today
|
|
battlemaster 21 loadable in OUR build today
|
|
hunchback 21 loadable in OUR build today
|
|
thor 20 loadable in OUR build today
|
|
vulture 19 loadable in OUR build today
|
|
zeus 19 loadable in OUR build today
|
|
ryoken 18 loadable in OUR build today
|
|
shadowcat 18 loadable in OUR build today
|
|
catapult 17 loadable in OUR build today
|
|
dragon 17 loadable in OUR build today
|
|
griffin 15 needs the new chassis ported
|
|
loki 15 loadable in OUR build today
|
|
marauder 15 needs the new chassis ported
|
|
commando 13 loadable in OUR build today
|
|
highlander 13 loadable in OUR build today
|
|
templar 13 loadable in OUR build today
|
|
wolfhound 13 loadable in OUR build today
|
|
avatar 12 loadable in OUR build today
|
|
awesome 12 loadable in OUR build today
|
|
battlemaster2c 12 loadable in OUR build today
|
|
victor 12 loadable in OUR build today
|
|
annihilator 11 loadable in OUR build today
|
|
daishi 11 loadable in OUR build today
|
|
gladiator 11 loadable in OUR build today
|
|
puma 11 loadable in OUR build today
|
|
raven 11 loadable in OUR build today
|
|
sunder 11 loadable in OUR build today
|
|
uller 11 loadable in OUR build today
|
|
dasher 10 needs the new chassis ported
|
|
owens 10 loadable in OUR build today
|
|
blacklanner 9 loadable in OUR build today
|
|
cougar 9 loadable in OUR build today
|
|
kodiak 9 loadable in OUR build today
|
|
masakari 9 loadable in OUR build today
|
|
urbanmech 9 loadable in OUR build today
|
|
arcticwolf 8 loadable in OUR build today
|
|
blacknight 8 loadable in OUR build today
|
|
cauldronborn 8 loadable in OUR build today
|
|
hellhound 8 loadable in OUR build today
|
|
hollander 8 loadable in OUR build today
|
|
longbow 8 loadable in OUR build today
|
|
novacat 8 loadable in OUR build today
|
|
assassin2 7 loadable in OUR build today
|
|
cyclops 7 loadable in OUR build today
|
|
flea 7 loadable in OUR build today
|
|
hauptmann 7 loadable in OUR build today
|
|
mauler 7 loadable in OUR build today
|
|
behemoth2 6 loadable in OUR build today
|
|
brigand 6 loadable in OUR build today
|
|
bushwacker 6 loadable in OUR build today
|
|
champion 5 needs the new chassis ported
|
|
deimos 5 loadable in OUR build today
|
|
hellspawn 5 loadable in OUR build today
|
|
madcat_mkii 5 loadable in OUR build today
|
|
thanatos 5 loadable in OUR build today
|
|
uziel 5 loadable in OUR build today
|
|
argus 4 loadable in OUR build today
|
|
fafnir 4 loadable in OUR build today
|
|
jenner_iic1 3 BROKEN - chassis missing from V4H too
|
|
osiris 3 loadable in OUR build today
|
|
behemoth 2 loadable in OUR build today
|
|
chimera 2 loadable in OUR build today
|
|
grizzly 2 loadable in OUR build today
|
|
solitaire 2 loadable in OUR build today
|
|
|
|
loadable in our build today : 727
|
|
blocked on new chassis : 67
|
|
broken / orphaned : 3
|
|
orphan chassis 'jenner_iic1': Variants/Jenner2c 1.mw4, Variants/Jenner2c 4.mw4, Variants/Jenner2c Pharaoh.mw4
|