Edit the game
Every change to the Breath of Fire III disc follows one cycle: find the entry, extract its payload, change the bytes, rebuild the archive, put the file back and test. Seven guides apply it to text, items, characters, sound, maps, graphics and saves. They link to the pages that own the layouts.
In place means the guide lists the fields to edit. Partly means some data is editable only as raw bytes.
| Task | Write path | Not yet known |
|---|---|---|
| Edit text and dialogue | in place (strings) | glyph-less bytes, window layout, a map from a text id to its string |
| Edit items, skills and shops | partly | the shop and master-skill fields, some unnamed bytes, ability flag bits |
| Edit characters and enemies | in place | the unnamed spans of the character and enemy records |
| Edit sound and music | partly | the area-to-music map, the SPU memory budget, an encoder for XA audio |
| Edit maps and scripts | partly | script opcodes, the meaning of cell values |
| Edit graphics and textures | partly | depth and palette of 391 of 593 textures, the pixel format of sprites |
| Edit saves | partly | the unnamed payload bytes |
The editing cycle
Section titled “The editing cycle”- Find the entry. Disc and files lists the files, and
asset kinds says what each entry holds. An entry is written
ARCHIVE.EMI#n(notation). - Extract the payload. A type-1 entry is LZ77 data: decode it, edit the decoded bytes and encode them again. Every other entry type is stored raw.
- Change the bytes. Edit a field in place when the guide gives its layout. A field keeps its size and offset.
- Rebuild the archive. Keep the archive version and the type and load argument of every entry, because the game cannot recover them from the payload. A rebuild with no edit tests your tool (rebuilding an archive).
- Put the file back on the disc. A replacement file keeps its original sectors. It can shrink but cannot grow past its last sector. A file that moves or grows needs new directory and file-table records (file table). Every Form 1 sector needs a new EDC and parity (sector sealing).
- Test in the game. Start the rebuilt disc image in an emulator or on a console and reach the data through the check that the guide gives.
Limits and pitfalls
Section titled “Limits and pitfalls”- Fixed windows. An entry loads at the address in its table-of-contents row, and each address belongs to a window that one entry at a time fills (memory map). An entry that is larger than its window overwrites the next range.
- Copies. Some data ships twice, and the game does not say which copy a screen reads. Change both
copies together:
START.EMI#8andSTATUS.EMI#0: the character records, 117,986 bytes each and identical.FIRST.EMI#11andAFLDKWA.EMI#0: a text resource table, 16,872 bytes each and identical.FIRST.EMI#3andENDKANJI.EMI#0: the font sheet, 32,768 bytes each and identical.
- Fixed row counts. Tables hold a fixed number of rows of a fixed size. No layout stores a count, so edit rows in place. Adding a row has no documented reader.
- Code changes. The wiki documents data. A code change, such as a constant, edits an instruction in an overlay or
SLUS_004.22and keeps the file size. - Unknown fields. A field marked
[unknown]has no known effect. Leave it as it is.
Related
Section titled “Related”- Disc and files: the files and sectors that every edit ends in.
- EMI container: the archive layout that the rebuild step keeps.
- Converting game data: how archives, banks and sectors convert and rebuild.
- Memory map: the windows that bound every entry.
- Notation and conventions: how numbers, offsets and entries are written.