- For how to give a Pokémon species a Pokédex number, see Defining a species.
- For creating multiple Regional Pokédexes, see Multiple regions.
This page describes the Pokédex.
The Pokédex is an electronic encyclopaedia that the player may be given during their journey. It displays various information about Pokémon species, including elemental types, typical sizes and locations they can be found in the wild.
To give the player the Pokédex, use the following script:
Once gained, an option called "Pokédex" will appear in the Pause menu (but only if there is at least 1 seen species in the Dex list).
There are two arrays associated with the Pokédex:
Both arrays have a length equal to the number of species defined in the PBS file "pokemon.txt", and each entry is either TRUE if the species with that National Dex number has been seen/owned, or FALSE if it hasn't.
The table below contains various functions that relate to the Pokédex:
|Function||What it does|
| ||Returns TRUE if the player has seen the given species, and FALSE if they haven't.|
| ||Returns TRUE if the player has owned the given species, and FALSE if they haven't.|
| ||Records that the player has seen the given species.|
| ||Records that the player has owned the given species.|
| ||Returns how many forms of the Pokémon species with the given National Dex number have been seen. This includes the base form, but does not include gender differences, only different form numbers.|
| || Returns the total number of Pokémon species that the player has seen in the Regional Dex with the given index number (or in the National Dex if the number is blank or |
| || Returns the total number of Pokémon species that the player has owned in the Regional Dex with the given index number (or in the National Dex if the number is blank or |
| ||Completely erases all information about seen and owned Pokémon, as well as seem forms of Pokémon.|
Regional Dex list screen
This screen shows the available Regional/National Dexes that the player can view. This screen is only accessible if there is more than one available Dex list to choose from.
The icons next to the seen/owned numbers are white if there are any unseen/unowned Pokémon species in that Dex, and gold if the Dex is complete in that respect.
The list screen, pictured above, displays a list of Pokémon species for a given Dex. Next to each of them is an icon which shows whether that species has been seen or owned. If a species has not been seen, then its entry will simply be a line of dashes.
The Seen and Owned numbers relate to the Dex list currently being viewed, and also to any search that may be being carried out.
The name of the Dex currently being viewed is displayed at the top of the screen (default: "Pokédex"). If there is a search being carried out, this name will be amended to indicate this.
It is possible to perform a number of searches and filters on the Dex currently being viewed. Searches are temporary and are ended by pressing the X key - this returns to the regular list mode.
The kinds of searches and sorts available are self-explanatory.
There are three entry pages for each species: Info, Area, and Forms. The code for these can be found in the script section PScreen_PokedexEntry.
You can only view the entry pages for Pokémon species you have seen.
The info page displays various pieces of information about a Pokémon species. Some information is only displayed if the player has owned that species.
The height and weight are shown in metres and kilograms respectively by default. However, if the game detects that the player is in the United States of America, these values will be converted to feet/inches and stones/pounds respectively.
When a Pokémon has been captured and its information added to the Pokédex, this page will be shown. There is only one difference here: the page can only be cancelled (i.e. "Back"), and the other two pages are inaccessible. The navigation bar at the top also has a different appearance to reflect this.
The area page shows where a Pokémon species can be found in the wild (i.e. their nests).
The map shown in this screen can depend on which Dex is being viewed, if there are multiple Dexes defined. If not, then the map is simply that of the region the player is currently in.
The forms page shows all the forms of a species. This includes both gender differences and proper alternate forms. It does not show shiny versions of the sprites.
By pressing the "Use" key and then Up/Down, it is possible to change the form being displayed.
- "Male" and "Female" versions of the first (default) form are always available (excepting inappropriate ones such as "Female" for a male-only species). If the species is genderless, then there will just be a "Genderless" option instead.
- The alternate forms are only listed once each, unless one of those forms also has gender differences, in which case both genders of that form will be available separately.
By default, this page will only allow the player to view forms that they have seen. However, in the script section Settings there is the value
ALWAYSSHOWALLFORMS, which if TRUE will always show all the forms of a species in this page regardless of which ones the player has actually seen.
Recording seen forms
When a Pokémon is encountered in a battle, evolves, hatches, changes its form or is obtained in some way, its combination of species, gender and form are recorded as having been seen by the player. It is recorded by using either of the following two methods:
In the first method, "
pkmn" is a Pokémon (e.g.
$Trainer.party is the first Pokémon in the party). In the second method, the three parameters are the species, gender (0/1 for male/female) and form respectively. For genderless species, use a gender number of 0.
You can use this method on its own. You should use it whenever you manually add a new species as seen to the Pokédex, as at least one form of a seen species must also be seen in order for it to work properly.
The ways in which a Pokémon can be obtained are listed in the page Manipulating Pokémon. These methods have a parameter which decides whether to automatically record the newly-generated Pokémon's form as being seen (default is TRUE). If you want to change a Pokémon's gender or form immediately after giving it to the player (and you didn't make those changes beforehand), you will need to make sure that parameter is FALSE when giving it, then make the changes, then use
pbSeenForm as described above to make sure only the intended form is recorded as seen.