Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trainer table starts at x23EAF0 in FR. Entries are 40 (x28) bytes long.
- 0x0 - Byte. Controls how much Pokemon data there is- 0 for default movesets, 1 for custom movesets, 2 for custom items, 3 for both.
- 0x1 - Byte. Determines trainer's title. Note that in FR there are many duplicate titles that are holdovers from RSE.
- 0x2 - Byte. If highest bit is set, the trainer's pokemon will be female if their gender ratio is 50%. Other bits influence intro music (and something else?)
- 0x3 - Byte. Determines trainer's sprite.
- 0x4 - Twelve bytes, Trainer's name. Limited to nine chars + terminator IIRC. Not sure what last two are for.
- 0x10 - Half-word. Trainer's first usable item.
- 0x12 - Ditto, second item
- 0x14 - third item
- 0x16 - fourth item
- 0x18 - Word. Indicates if double battle.
- 0x1C - Word. Actual AI strength- marked as Unknown in A-Trainer. Zero appears to be mostly random, 1 is better but makes mistakes often, 7 plays as well as the AI is capable of. Some trainers in Emerald (Winona) have oddball values that need looked at. The per-Pokemon values marked as AI control IVs.
- 0x20 - Word. Indicates number of Pokemon a trainer has.
- 0x24 - Word. Pointer to the actual Pokemon data.
- The actual pokemon data, for trainers who have custom movesets+items:
- 0x0 - Half-word. IVs, misidentified by A-Trainer as "AI Value". floor((Value+1)/8) is given to all stats, I think. Only one byte is used.
- *If using the EV hack, this is where you select the spread used.
- 0x2 - Half-word, level.
- 0x4 - Half-word, species.
- 0x6 - Hold item, 0x0 for nothing.
- 0x8 - Half-word, first attack.
- 0xA - Half-word, second attack.
- 0xC - ditto third
- 0xE - ditto fourth
- Other trainer types (determined by first byte) have the data structured differently.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement