Edit characters and enemies
A playable character is one record of 164 bytes, and an enemy is one record of 136 bytes. Both sit in fixed tables. Growth comes from a level table and master records. Field layouts: game records.
Where the data is
Section titled “Where the data is”| What | Where |
|---|---|
| Starting stats of 8 characters | 8 records of 164 bytes at payload 0x1A914 of START.EMI#8, and the identical copy in STATUS.EMI#0 |
| Level growth | 693 rows of 8 bytes in GAME.EMI#0: one block of 99 rows for each of characters 0 to 6 (level growth) |
| Masters | 17 skill rows and 17 stat rows in SISYOU.EMI#0; 17 names in AFLDKWA.EMI#0 (masters) |
| Enemies and encounters | the 1,160-byte entry that loads at 0x800E4000 in each of the 200 area archives: 8 encounters of 9 bytes and 8 enemy records of 136 bytes (enemy record) |
| Enemy drops | fields of the enemy record (drops) |
What to change
Section titled “What to change”- A character. Edit the fields of the record in place, in both copies. Names use the text encoding, and the name is the first five bytes of the record.
- Growth. Row
character * 99 + level - 1belongs to a level. Edit its experience, HP, AP and the two packed stat bytes (high nibble and low nibble). The level-up routine combines the row with the base stats and the master’s modifier (level growth). - A master. Edit the stat row (six signed bytes) or the skill row (six pairs of level and ability) of the master (masters).
- An enemy. Edit the enemy record in its area archive. An encounter lists up to eight enemy indexes into the same block,
0xFFfor an empty slot, and an appearance rate. Only slots 0 to 6 occur on the disc. - Put the entry back and follow the editing cycle.
Limits and pitfalls
Section titled “Limits and pitfalls”- Counts and sizes are fixed. 8 character records, 693 level rows, 17 rows per master table, and exactly 1,160 bytes per area block.
- Two copies. Change
START.EMI#8andSTATUS.EMI#0together. Which copy a screen reads is[unknown]. - New games only. The game copies the starting table into its live state when a new game starts. A save holds its own copy of the characters, so an edit to the table does not change an existing save (saves).
- Signed fields. The master bonuses and the level-up modifiers are signed bytes, so write a negative value as its two’s-complement byte (masters).
- Drop rates. A drop rate is an index 0 to 7 into a chance table, not a percentage (drops).
- Enemy graphics. The
BENEMYarchives hold enemy audio only, and the enemy sprites are not located, so an enemy keeps its look (character sprites). - Unnamed bytes. The unnamed spans of the character and enemy records are
[unknown].
Check in the game
Section titled “Check in the game”Start a new game and open the status screen to read the starting stats, then gain levels to check the growth rows. Fight an enemy of the edited area to check its stats and drops. A master’s effect shows when a character takes the master and gains levels.
Related
Section titled “Related”- Game records: the character, enemy, master and drop layouts.
- Edit saves: the live copy of the characters inside a save.
- Edit items, skills and shops: the tables that share
GAME.EMI#0with level growth. - Edit graphics and textures: palettes of character sprites.
- Edit the game: the editing cycle and the limits that apply to every edit.