This article describes the player's party.
- The Pokémon that are easiest to edit the properties of are those in the party.
- Most ways of manipulating Pokémon involve those in the party.
- The party screen can be accessed from the Pause menu, amongst other ways.
The player can carry around up to 6 Pokémon at any one time, to battle with. This set of Pokémon is the player's party.
The player's party is stored as an array called
$Trainer.party. It can contain up to 6 Pokémon/eggs.
$Trainer.partyis the player's lead Pokémon/egg.
$Trainer.partyis the Pokémon/egg in the fifth position of the party (or nil if the party isn't that full).
$Trainer.party[$Trainer.party.length-1]is always the Pokémon/egg at the end of the party. Useful for locating newly added Pokémon.
$Trainer.party.lengthis the number of Pokémon/eggs in the party.
$Trainer.pokemonCountis the number of Pokémon in the party (fainted and unfainted).
$Trainer.ablePokemonCountis the number of unfainted Pokémon in the party.
$Trainer.party.speciesis the species of the player's lead Pokémon/egg.
$Trainer.party.level=42sets the level of the player's second Pokémon/egg to 42.
Variants of the party
$Trainer.party is the entire player's party, including eggs and fainted Pokémon. However, sometimes eggs and/or fainted Pokémon will need to be ignored when manipulating the contents of the party. For this reason, there are two variants of the
$Trainer.party array which can be used instead, both of which derive from it:
$Trainer.pokemonPartyis the same as
$Trainer.party, except it ignores any eggs in the party.
$Trainer.ablePokemonPartyis the same as
$Trainer.party, except it ignores any eggs and fainted Pokémon in the party.
They can be used in the same way as
$Trainer.party. For example:
$Trainer.pokemonParty.lengthis the number of Pokémon (excluding eggs) in the party.
$Trainer.ablePokemonPartyis the first Pokémon in the party that can battle, i.e. it is the Pokémon that will be sent out first in battles.
$Trainer.pokemonParty.level=42sets the level of the player's second Pokémon to 42.
The party screen is displayed by the scripts in the script section PokemonParty. It can be accessed via the Pause menu, when choosing to use/give an item to a Pokémon from the Bag, when choosing a Pokémon, and through the battle screen.
Each Pokémon in the party has its own panel in the party screen, which displays various bits of information about it (including an icon, its name/nickname, level, HP, whether it has a held item, and so on). The contents of this panel are displayed in the class
PokeSelectionSprite, in the def
refresh (although various coordinates for those displayed things are set near the start of that class).
The graphics used in the party screen are all in the folder "Graphics/Pictures", except for the Pokémon icons which are in the folder "Graphics/Icons".
A Pokémon in the party can be selected, at which point a menu will appear containing a list of options. These options can vary depending on the situation, but tend to include "Summary", "Switch" and a list of moves that Pokémon knows that can be used outside battle.
In Debug mode, this menu contains an additional option called "Debug", which allows the user to easily view/edit the properties of the selected Pokémon.