- For how to define the information shown in the Town Map, see Region map.
- For the places the player walks around in, see Maps.
This page describes how to separate a game into several distinct regions, and how to create a Regional/National Pokédex.
A region is an area that contains a number of distinct locations. The Town Map shows the region and all the locations within it. Two regions are therefore distinctly separate from each other, although maps belonging to each region can connect to each other to allow movement from one region to the other.
Different regions may contain different wild Pokémon, and consequently have their own Regional Pokédex list.
To set up a new region in a game, the following should be done:
- Create a region map picture (shown in the Town Map) and fill it with information points.
- Assign maps to that region.
- Create a Regional Pokédex.
Defining a region
- Main article: Region map
The PBS file "townmap.txt" defines the region map for each region, as well as filling in the squares of that map with information (such as the location's name as seen in the Town Map). Each region has its own section, beginning with a number in square brackets (the region's ID number). For example:
 Name=Kanto Filename=kantomap.png Point=10,5,Pallet Town,,17,9,8, Point=6,4,Route 1,,,,, Point=6,5,Viridian Forest,,,,,  Name=Johto Filename=johtomap.png Point=11,5,New Bark Town,,42,9,8, Point=10,4,Route 29,,,,, Point=7,5,Dark Cave,,,,,
The numbering of regions should start at 0 and count upwards, without skipping numbers. There is no (practical) limit to the number of regions a game can have, although it would be very unusual to have many of them.
Adding game maps to a region
- Main article: Metadata
When considering multiple regions, the "MapPosition" metadata is the important one. It contains three numbers: a region ID number, followed by the X and Y coordinates of that map's position in the Town Map. There are no other differences between maps in different regions.
Note that all maps must be assigned to a region, including building interiors. This is because when the Town Map item is used, the region map shown depends on the "MapPosition" metadata of the map the player is currently on, and if there is none set, there can be an error.
There are two basic types of Pokédex list: the National Dex and the Regional Dex. The National Dex contains all Pokémon in the game, in the order they are numbered in the PBS file "pokemon.txt". Regional Dexes are different.
This example means that the species is number 25 in the first Regional Dex, 137 in the second Regional Dex, and doesn't appear in the third Regional Dex.
Every copy of this line for every species should have the same number of numbers (e.g. the above example has 3 numbers - all other "RegionalNumbers" lines for other species should also have 3 regional numbers). You can have species which do not appear in any Regional Dex; in which case, simply don't have a "RegionalNumbers" line for it (or set all the numbers to 0).
It is important to note that these Regional Dexes do not automatically correspond in any way to the regions defined above - making them do so requires playing with various settings.
Regional Dex settings
In the script section Settings is the following information:
DEXDEPENDSONLOCATION = true def pbDexNames; return [ [_INTL("Kanto Pokédex"),0], [_INTL("Johto Pokédex"),1], [_INTL("Hoenn Pokédex"),2], _INTL("National Pokédex") ]; end ALWAYSSHOWALLFORMS = false DEXINDEXOFFSETS = 
The first setting is a TRUE/FALSE setting. What this setting means is described below.
If you want to include the National Dex in your game, it must appear in the array in
def pbDexNames and must be the last one listed. It may or may not have a number next to it.
The third setting is a TRUE/FALSE setting that determines which forms of a Pokémon species are shown in its Pokédex entry. If TRUE, it will always show every form (including gender differences) for that species even if the player hasn't seen them - all that matters is that the player has seen the species at all. If FALSE, the Pokédex will only show the forms and genders of that species which the player has seen.
The fourth setting is an array of numbers. Each number represents a Regional Dex in the array in
pbDexNames (0 is the first listed Dex, 1 is the second listed Dex, etc.). If a Regional Dex is mentioned in this array, all Pokémon species in that Regional Dex will have their index number lowered by 1. This allows for that Regional Dex to have a "species 0" (e.g. Victini). Victini would be numbered species 1 in that Regional Dex (and Snivy species 2, etc.) in the PBS file "pokemon.txt", but in-game it will be species 0 (and Snivy species 1, etc.).
Dexes depend on location
DEXDEPENDSONLOCATION = true
The Regional Dex shown when the Pokédex is opened will correspond exactly to the region the player is in (e.g. the first Regional Dex for the first region, the second for the second, etc.).
If there is no Regional Dex corresponding to the current region (e.g. the player is in the fourth region, but only three Regional Dexes have been defined), then the National Dex will be shown instead. If the map the player is currently in is not associated with a region (i.e. its "MapPosition" metadata is not set), then the National Dex will be shown.
Usually the National Dex will never be shown. There will never be an option to choose which Dex list to view.
The array of Dex names is ignored.
Dexes don't depend on location
DEXDEPENDSONLOCATION = false
The player manually chooses which Dex list to view. However, they can only choose from the Dex lists that have been unlocked and are not empty. If there is only one such Dex list, that one is shown automatically when the Pokédex is opened.
There are two arrays that are important here. The first is the array of Dex list names, shown above. There is also an array called
$PokemonGlobal.pokedexUnlocked, which records which Dex lists have been unlocked. Both of these list all the Regional Dexes first, followed by the National Dex.
Each entry in the Dex names array can either be a name (e.g. the National Dex above), or an array itself containing the name and a number (e.g. the Kanto Dex above). If it is just a name, then when viewing that Dex list and looking at a species' area map, the current region's map will be shown. If it is a name and a number, then the number is which region's map to show for the area map (or the current region's map if that is invalid).
The first Regional Dex is automatically unlocked at the start of the game, but the rest are locked and will need to be unlocked manually later on. To unlock a Dex, use the following method:
pbUnlockDex(0) pbUnlockDex(1) pbUnlockDex
The number is the number of the Dex list to unlock (0 is the first Regional Dex, 1 is the second Regional Dex, etc.). If no number is given, then this will unlock the National Dex instead.
Similarly, you can lock a Dex as follows:
pbLockDex(0) pbLockDex(1) pbLockDex
The only way in which a Regional Dex corresponds to an actual region, when
DEXDEPENDSONLOCATION is FALSE, is when the numbers in the Dex names array determine the region map to show when looking at a species' area map.
Regional Pokémon storage
Essentials contains scripts for regional Pokémon storage, which is a way of separating Pokémon caught in different regions so that a Pokémon caught in one region cannot be used in another region.
However, this is not currently enabled and is not documented here.
- You can use the multiple regions feature in a number of ways, e.g.
- Have one Dex list per region. This is the typical use.
- Johto "Old" and "New" styles (i.e. just rearrange the National Dex) - a Regional Dex doesn't need to contain fewer Pokémon than the National Dex.
- Characteristic-based Dex lists (e.g. "common"/"legendary", habitats, type-ordered). Having one Dex list per characteristic may lead to having lots of Dex lists.
- You don't need to have the National Dex in your game at all. Even if it appears in the Dex names array (which it doesn't have to), you may simply never use/unlock it.
- To easily remove Regional Dexes, you can use the Editor's "Edit Regional Dexes" function to delete the Regional Dexes you want. Remember to start a new game afterwards rather than loading a saved game.