Advertisement
Doesnt

trainer format

May 24th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. Trainer table starts at x23EAF0 in FR. Entries are 40 (x28) bytes long.
  2.  
  3. 0x0 - Byte. Controls how much Pokemon data there is- 0 for default movesets, 1 for custom movesets, 2 for custom items, 3 for both.
  4. 0x1 - Byte. Determines trainer's title. Note that in FR there are many duplicate titles that are holdovers from RSE.
  5. 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?)
  6. 0x3 - Byte. Determines trainer's sprite.
  7. 0x4 - Twelve bytes, Trainer's name. Limited to nine chars + terminator IIRC. Not sure what last two are for.
  8. 0x10 - Half-word. Trainer's first usable item.
  9. 0x12 - Ditto, second item
  10. 0x14 - third item
  11. 0x16 - fourth item
  12. 0x18 - Word. Indicates if double battle.
  13. 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.
  14. 0x20 - Word. Indicates number of Pokemon a trainer has.
  15. 0x24 - Word. Pointer to the actual Pokemon data.
  16.  
  17. The actual pokemon data, for trainers who have custom movesets+items:
  18.  
  19. 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.
  20. *If using the EV hack, this is where you select the spread used.
  21. 0x2 - Half-word, level.
  22. 0x4 - Half-word, species.
  23. 0x6 - Hold item, 0x0 for nothing.
  24. 0x8 - Half-word, first attack.
  25. 0xA - Half-word, second attack.
  26. 0xC - ditto third
  27. 0xE - ditto fourth
  28.  
  29. Other trainer types (determined by first byte) have the data structured differently.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement