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

m
no edit summary
mNo edit summary
Line 4: Line 4:


==Opposing Trainers==
==Opposing Trainers==
The Battle Frontier contains a master list of 300 opposing [[Pokémon Trainer]]s that may be chosen as an opponent in battle; these are generally sorted in increasing order of difficulty. Similarly, each of the Battle Tents has a smaller list of Trainers: 70 for the Slateport Battle Tent and 30 for the Verdanturf and Fallarbor Battle Tents. Trainer data is stored as a 52-byte structure, outlined as follows:
The {{gdis|Battle Frontier|III}} contains a master list of 300 opposing [[Pokémon Trainer]]s that may be chosen as an opponent in battle; these are generally sorted in increasing order of difficulty. Similarly, each of the Battle Tents has a smaller list of Trainers: 70 for the Slateport Battle Tent and 30 for the Verdanturf and Fallarbor Battle Tents. Trainer data is stored as a 52-byte structure, outlined as follows:


{| class="wikitable"
{| class="wikitable"
Line 27: Line 27:


==Opposing Pokémon==
==Opposing Pokémon==
The Battle Frontier contains a master list of 882 opposing Pokémon, again in general order of increasing difficulty. The list of opposing Pokémon is only 70 for the Slateport Battle Tent and 45 for the Verdanturf and Fallarbor Battle Tents. Pokémon data is stored as a 13-byte data structure (aligned on 4-byte boundaries, for a total of 16 bytes), outlined as follows:
The {{gdis|Battle Frontier|III}} contains a master list of 882 opposing Pokémon, again in general order of increasing difficulty. The list of opposing Pokémon is only 70 for the Slateport Battle Tent and 45 for the Verdanturf and Fallarbor Battle Tents. Pokémon data is stored as a 13-byte data structure (aligned on 4-byte boundaries, for a total of 16 bytes), outlined as follows:


{| class="wikitable"
{| class="wikitable"
Line 101: Line 101:


==Battle style moves==
==Battle style moves==
In determining a Trainer's battle style in the {{OBP|Battle Factory|Generation III}} and [[Battle Dome]], seven lists of moves are kept by the game, and from these, one of nine battle styles is determined. The Trainer's Pokémon's moves are matched up against these seven lists, and a list is considered "satisfied" if the Trainer has enough moves from that list. The number of moves that are needed for a list to be satisfied is stored in memory location 0x08611FC0 as a list of 7 unsigned 8-bit integers; by default this is three moves for the first three lasts and two for the last four. The game then determines the battle style based on how many of the lists are satisfied (either none, 1-2, or at least 3; the middle one of which will also state the last list that was satisfied, for a total of 9 styles).
In determining a Trainer's battle style in the {{gdis|Battle Factory|III}} and [[Battle Dome]], seven lists of moves are kept by the game, and from these, one of nine battle styles is determined. The Trainer's Pokémon's moves are matched up against these seven lists, and a list is considered "satisfied" if the Trainer has enough moves from that list. The number of moves that are needed for a list to be satisfied is stored in memory location 0x08611FC0 as a list of 7 unsigned 8-bit integers; by default this is three moves for the first three lasts and two for the last four. The game then determines the battle style based on how many of the lists are satisfied (either none, 1-2, or at least 3; the middle one of which will also state the last list that was satisfied, for a total of 9 styles).


The master list of moves used in determining battle style is stored as an array of 7 pointers to lists of 16-bit unsigned integers, referring to the corresponding indices in the master move list (see [[List of moves]]). All seven lists have no fixed length, and are terminated with 0x0000.
The master list of moves used in determining battle style is stored as an array of 7 pointers to lists of 16-bit unsigned integers, referring to the corresponding indices in the master move list (see [[List of moves]]). All seven lists have no fixed length, and are terminated with 0x0000.