description: "Use when working on FF7 binary format parsers, serializers, resource managers, LGP/LZS archives, the data installer, or the script decompiler. Covers the File/Serializer/Manager triplet pattern and known installer gotchas."
Most formats in src/formats/ follow this structure — mirror it when adding formats:
XFile — plain data container for the parsed format.XFileSerializer — reads/writes the binary layout (derives from Serializer (src/formats/Serializer.h)).XFileManager — Ogre ResourceManager integration (singleton + Resource).Format documentation lives in the FF7 wiki at wiki.ffrtt.ru and in the header comments of the parsers. Check there and at existing similar parsers (e.g. src/formats/worldmap/TxzFile*) before writing a new one.
HRCFile::GetMeshFileName() (i.e. NameLookup::model(splitBase(hrc_name)) + ".mesh"). Do NOT use a friendly-name table for the mesh names: it can diverge from the actual Ogre mesh resource name and triggers FileNotFoundException (e.g. barrier.mesh).WorldInstaller::ExportMesh() expects a directory prefix, not a full filename prefix.src/installer/decompiler/) emits Lua — keep output close to doc/STYLE-LUA.md, but it is exempt from strict conformance.