This article describes how the multiple forms that some Pokémon can have are handled. This includes proper alternate forms, and also gender differences.
See also Edit
- Mega Evolutions are a kind of multiple forms.
- For how all other aspects of a Pokémon species are defined.
- Shiny Pokémon are not alternate forms of regular Pokémon, but do appear different to them.
Multiple forms Edit
Several Pokémon in the game have multiple forms. These include:
- Cherrim (sprite difference only)
- Pichu (sprite difference only)
- Any species which can Mega Evolve.
Each of these species have a base form, which is the one defined in the PBS file "pokemon.txt". Each alternate form is a variation of this base form, and such variations can include the Pokémon's type, ability and moveset.
The script section PokemonMultipleForms contains scripts that are used to define the differences between each form.
Each form is given a number. 0 is the default number, and all generated Pokémon will have a form of 0 if there is nothing to say otherwise. There is no particular order that forms should go in.
A Pokémon's form is the value of
pokemon.form. If this value does not correspond to a defined alternate form, then the Pokémon will appear as the base form - it will technically still be an alternate form, but just one that doesn't differ from the original in any way.
Form names Edit
The Pokédex has a page which lists all the forms and gender differences of a species. Most alternate forms have special names. The base form can also have its own name, if "Male"/"Female" or "One form" (for genderless species) isn't suitable for it.
The form names are defined in the PBS file "pokemon.txt" as the property "FormNames". The number of names determines how many forms the Pokédex shows that species to have. It will always show the base form even if it hasn't been defined or given a special name.
Note that species can have multiple forms which aren't listed in the Pokédex, e.g. Arceus and Genesect.
Gender differences Edit
A number of species have gender differences. These are purely cosmetic, as only the sprite displayed for a Pokémon of that species can vary.
To give a species with gender differences any more differences than just alternate sprites, you will need to mimic how the differences between forms are determined, but have the differences depend on the gender rather than the form.
Changing forms Edit
Several species are able to change their forms during the game. Most of them are only able to do so during battle, while the rest are changed due to an external trigger (e.g. examining a meteorite for Deoxys).
Form-changing during battle is dealt with in the script section PokeBattle_Battler, in the def
pbCheckForm. It is called multiple times per round, so the Pokémon will always change their forms as soon as possible.
A handful of species need to have their forms resetting to 0 once they are switched out battle or when a battle ends. This is done by calling the def
pbResetForm in the same script section.
Sprites, icons and cries Edit
Whenever a Pokémon's sprite or icon is displayed, a method is called that decides which picture to use as that sprite/icon. These methods are in the script section PokemonUtilities and are
These two methods check several properties of the Pokémon they are finding a sprite/icon for, to make sure they return the most appropriate one. A sprite's file is found in the "Graphics/Battlers" folder, and its name will begin with "
XXX", which is either the internal name of that species or its ID number padded to 3 digits. An icon's file is found in the "Graphics/Icons" folder, and its name will begin with "
iconXXX". Both then have one or more additions to the name, as follows (in order):
f- If female.
s- If shiny.
b- If a back sprite.
_1- If a multiple form. The number is the form number.
_shadow- If a Shadow Pokémon.
The game runs through all possible combinations of the above 5 options, and returns the first (most appropriate) file name which corresponds to an existing graphic.
For example, the back sprite of a female shiny East Sea Gastrodon would be "
423fsb_1". However, Gastrodon does not have gender differences, so there would be no file with this name. Upon ignoring the gender, the new file name "
423sb_1" is generated. This matches a file that exists, so that file is used as the sprite.
There are plenty of examples in Essentials of how the sprites and icons are named. If you are unsure about file naming, look at those.
A species' cry can also depend on its form. Simply add "
_1" to the end of the cry sound file's name, where the number is the form number as above (resulting in "
025Cry_1.wav" and so forth).
Important note! Edit
There must be a sprite file whose file name is simply the species' ID number (or internal name), as this basic sprite will be used in places like the Pokédex where the Pokémon shown is just an example of the species rather than being a specific Pokémon with defined gender/form/etc.
It is therefore recommended that the basic sprites are used for form 0 Pokémon, i.e. the first form of a Pokémon species. The alternate form sprites will then start with "_1", even though technically "_0" is also viable.
For example, Gastrodon would have sprite files named "
423" and "
423_1" only (the default form West Sea and the alternate form East Sea respectively).
The same goes for the cry sound file - there needs to be a sound file for each species without any form numbers tagged on the end.
Differences between forms Edit
As mentioned above, different forms of a species can have different properties. These differences are defined in the script section PokemonMultipleForms.
The properties that can be defined separately for each form of a species are as follows:
|Base stats||The base stats of the Pokémon.||
| Type 1|
|The first and second elemental types of the Pokémon. These are defined separately.||
|Ability||The ability of the Pokémon.||
|Moveset||The moves that the Pokémon will learn when it levels up.||
|Weight||The base weight of the Pokémon.||
|Wild hold items||The item(s) that the wild Pokémon can be found holding commonly/uncommonly/rarely.||
|Base EXP||The base amount of EXP earned by defeating the Pokémon.||-|
|EV yield||The EVs earned by defeating the Pokémon.||
|Altered sprite||This edits the Pokémon's sprite. In Spinda's case, this means drawing spots on it.||
Each of these properties has a procedure in PokemonMultipleForms that defines the differences for each species.
In addition to those procedures, there are a few others that are used in different circumstances, usually to set a Pokémon's form depending on those circumstances. They are:
| || Checked whenever the game looks at the Pokémon, and determines which form it should be. The form can depend on anything, such as location, held item or time.
Pokémon whose species have this procedure cannot have their forms manually changed by an external force, as that change will be overridden by whatever this procedure decides. This procedure itself can be edited, though.
| ||Checked when the Pokémon is first created, and determines which form it should be (at least initially). The form can depend on anything, such as location or the type of terrain nearby.||
| ||Checked when the Pokémon is sent into battle, and determines which form the Pokémon should be. For Burmy, the form depends on the type of terrain the battle is taking place on.||
| ||Checked when the Pokémon's form has been changed (by one of the above procedures, or through Debug mode), and does further things. Typically this just will record the new form as seen in the Pokédex, but for Rotom this procedure will also teach it a move depending on its new form.||
There are also some procedures used solely for Mega Evolutions, which are not listed here.
- Any property of a Pokémon that is retrieved by calling a method in the script section PokeBattle_Pokemon can be made to vary depending on the Pokémon's form. For example, you could have a Pokémon whose gender ratios vary depending on its form, or whose beauty is always maximum only in a particular form.
- You can use the above methods to apply differences depending on other criteria than just a Pokémon's form. For example, you could have all female Pokémon of a given species always know a certain move, or all shiny Pokémon of that species have high IVs, or a Shadow Pokémon be different to its non-Shadow version.