Battle Frontier data structures (Generation III): Difference between revisions

no edit summary
No edit summary
Line 19: Line 19:
| 12 || Easy Chat structure[6] || Lose Quote - the quote given when you win against the opposing trainer.
| 12 || Easy Chat structure[6] || Lose Quote - the quote given when you win against the opposing trainer.
|-
|-
| 4 || uint16_t* || Pokemon Used - the pointer points to an 0xFFFF-terminated array  of indices in the list of opposing Pokemon.  Note that not all Pokemon in the list may be used in all Battle Frontier facilities.
| 4 || uint16_t* || Pokémon Used - the pointer points to an 0xFFFF-terminated array  of indices in the list of opposing Pokémon.  Note that not all Pokémon in the list may be used in all Battle Frontier facilities.
|}
|}


Line 32: Line 32:
! Size !! Type !! Description
! Size !! Type !! Description
|-
|-
| 2 || uint16_t || Species ID - see [[List of Pokémon by index number (Generation III)]].
| 2 || uint16_t || Species ID - see [[List of Pokémon by index number (Generation III)]] for the list of values and their associated Pokémon.
|-
|-
| 8 || uint16_t[4] || Moves - see [[List of moves]].
| 8 || uint16_t[4] || Moves - see [[List of moves]] for the list of values and their associated move.
|-
|-
| 1 || uint8_t || Held Item - these are '''not''' item indices, rather indices to a separate list of item indices
| 1 || uint8_t || Held Item - these are '''not''' item indices, rather indices to a separate list of item indices, see below
|-
|-
| 1 || uint8_t || EV spread - bitfield, see below
| 1 || uint8_t || EV spread - bitfield, see below
Line 79: Line 79:
  --1----- Special Defense
  --1----- Special Defense


The 510 EVs will be divided evenly among all stats whose bit are set.
The 510 EVs will be divided evenly among all stats whose bit are set. (Since 510 is not divisible by 4, a Pokémon whose EVs are spread across 4 stats will only have 508 EVs.)


== Mind Ratings ==
== Mind Ratings ==
In the [[Battle Arena]], each move is given a Mind rating.  Over the course of the battle, each move used will contribute its Mind rating to the trainer's mind score; the player with the higher rating wins the 2 points in overall judgement.  Mind ratings are stored as an array of 355 signed 8-bit integers at memory location 0x08611DC0; normally, these range from -1 to 1.
In the [[Battle Arena]], each move is given a Mind rating.  Over the course of the battle, each move used will contribute its Mind rating to the trainer's mind score; the player with the higher rating wins the 2 points in overall judgement.  Mind ratings are stored as an array of 355 (the number of move IDs in the game) signed 8-bit integers at memory location 0x08611DC0; normally, these range from -1 to 1.


To access the Mind rating for any particular move, take the corresponding index in this array.
To access the Mind rating for any particular move, take the corresponding index in this array.
222

edits