Forms

*For creating new Pokémon species, see Defining a species.*
*For information on how Mega Evolution works, see Mega Evolution.*
*For information on how shiny Pokémon behave, see Shiny Pokémon.*
This page describes how **Pokémon forms** are defined and how they work. This includes proper alternate forms (e.g. Deoxys), and also gender differences (e.g. Meowstic).

## What is a form?

A Pokémon form is a particular set of properties for a given species. Properties include base stats, types, possible abilities, height, Pokédex entry, battle sprite positioning, name of the form, and so on. This covers most of the properties that are defined in the PBS file "pokemon.txt".

A given species can have multiple forms, each of which have different sets of properties. They may differ in just one aspect (e.g. the only difference between the Unown forms are the names of those forms), or they may differ in many ways (e.g. Mega Evolutions can have differing stats/types/height/weight/abilities/etc.).

Different forms of a species tend to look different to each other. In other words, they have different sprites and icons. With the exceptions of cosmetic gender differences (see below) and shininess, if you want one Pokémon to look different to another Pokémon of the same species, it will need to be an alternate form of that species. It is explained below how these sprites and icons are named to allow them to represent different forms.

Every species has at least one form. The base form (also known as form 0) is defined in the PBS file "pokemon.txt", and alternate forms are defined in the PBS file "pokemon\_forms.txt". Each alternate form has its own number, usually starting at 1 and going upwards, although any positive whole number will suffice.

### Cosmetic gender differences

A number of species look different depending on whether a Pokémon of those species is male or female. There are no other differences between them, and the differences are purely cosmetic. In this case, the two appearances do not need to be treated as separate forms; there is a special feature that allows cosmetic gender differences to exist without the use of forms.

If a species looks different depending on its gender *and also* has other differences (e.g. Meowstic has different hidden abilities and movesets), it will need to be split into two separate forms (the base form with a form name of "Male" and an alternate form with a form name of "Female"). The gender differences in this case are not purely cosmetic.

## Defining an alternate form

A Pokémon's base form is defined in the PBS file "pokemon.txt", while its alternate forms are defined in the PBS file "pokemon\_forms.txt". Alternate forms will inherit the properties of the base form, except ones that are defined in "pokemon\_forms.txt" for that form. The PBS file "pokemon\_forms.txt" therefore only needs to list the differences between each form of a species compared to its base form.

With a few exceptions (see below), anything defined about a species in the PBS file "pokemon.txt" can be overridden for an alternate form of that species.

The PBS file "pokemon\_forms.txt" is laid out in nearly the same way as "pokemon.txt". It has a number of sections, each beginning with something in square brackets followed by any number of lines in the form `XXX = YYY`. The latter are exactly the same as in "pokemon.txt". Any line beginning with a `#` (including the lines separating one form from the next) are comment lines and are not compiled; they are just there to make things more legible and are not required.

The sections names (the text in square brackets) are comprised of two parts: a species ID and a form number. They are separated by a comma.

Here are some examples of form definitions:

```
[PICHU,2]
FormName = Spiky-Eared
Generation = 4
Evolutions = PIKACHU,None,
#-------------------------------
[UNOWN,16]
FormName = Q
#-------------------------------
[CASTFORM,2]
FormName = Rainy Form
Types = WATER
Color = Blue
Pokedex = This is the form Castform takes when soaked with rain. When its body is compressed, water will seep out as if from a sponge.

```

Remember that form 0 is the base form that is defined in "pokemon.txt", so a form number of 0 cannot be used in "pokemon\_forms.txt".

### Definable properties

Most properties that are defined in the PBS file "pokemon.txt" can also be defined for a form in "pokemon\_forms.txt". All of these properties are optional for a form. If a property is not defined for a form, that form will inherit the property from the base form in "pokemon.txt". See Defining a species for a more detailed description of each property.

The table below lists the properties that can be defined for a form:

In addition to the above, there are also some properties exclusive to alternate forms which can also be defined. These properties are mostly relevant to Mega Evolution forms.

 MegaMove
 MegaMessage
* 0 = "{Pokémon}'s {Mega Stone} is reacting to {Player}'s {Mega Ring}!"
 UnmegaForm
 PokedexForm
This is used by duplicate forms which are needed to make other code work. For example, Zygarde has two "Complete Forme" forms defined, because it can turn into Complete Form from two other forms and needs to remember which of those forms (10% and 50%) it originally was. Having two Complete Formes is the most convenient way to remember this. One of those Complete Forms can be registered in the Pokédex, while the other one uses this property to point to the first Complete Form, ensuring that only one Complete Forme can be registered as seen no matter which of the two was actually seen (because they're both treated the same from the player's perspective).

### Undefinable properties

The following properties cannot be defined for an alternate form, even though they can be defined in "pokemon.txt". The reasons for why they are disabled vary.

 GenderRatio
 GrowthRate
 Incense

## Choosing the form to use

A Pokémon's form is the value of `pkmn.form`. If this value does not correspond to a defined alternate form, then the Pokémon will use the base form's properties instead. If there are no sprites/icons/cries for a form of this value, then the base form's sprites/icons/cries will be used instead. The Pokémon will still technically be an alternate form, albeit one that doesn't have any form-specific properties and/or sprites/icons/cries.

By default, a Pokémon will be form 0. For some species with alternate forms, each Pokémon can have a different form depending on various factors, such as location (Shellos), held item (Arceus), moves known (Keldeo) or just a random choice (Unown).

The script section **FormHandlers** contains code that makes the decision for each Pokémon of which form it should have. These are:

Some species can change their forms, but only due to an outside influence (e.g. Deoxys changes when inspecting certain meteorites). These species do not need to use any of the procedures listed above.

## Graphics and audio

### Sprites and icons

Pokémon sprites and icons are stored in several folders in the folder "Graphics/Pokemon". The names of those sub-folders are self-explanatory.

Whenever a Pokémon's sprite or icon is displayed, one of a variety of methods are called that decides which file to use as that sprite/icon. These methods are in the script section **Species\_Files**. These methods check several properties of the Pokémon they are finding a sprite/icon for, to make sure they return the most appropriate graphic.

The filenames for Pokémon sprites are constructed from one or more elements in the following order:

* `XXX` - the ID of the species (always present)
* `_1` - if an alternate form (the number is the form number)
* `_female` - if female (for cosmetic gender differences)
* `_shadow` - if a Shadow Pokémon

You do not need a file for every combination of the above elements. Essentials checks through each relevant permutation of elements in order until it finds the most appropriate one which exists as a file.

For example, the back sprite of a female shiny East Sea Gastrodon would be "`GASTRODON_1_female`" in the folder "Back shiny". However, Gastrodon does not have gender differences, so there would be no file with this name. Upon ignoring the gender, the new filename "`GASTRODON_1`" is generated. This matches a file that exists in the folder "Back shiny", 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.

### Cries

Pokémon cries are stored in the folder "Audio/SE/Cries". Their filenames include fewer elements than sprites/icons, but are still constructed in the same way:

* `XXX` - the ID of the species (always present)
* `_1` - if an alternate form (the number is the form number)

For example, Sky Forme Shaymin's cry has a filename of "`SHAYMIN_1`".

### Important note!

Files for the base form (0) should *not* have a form part of "`_0`" in them. Simply omit that element when naming the files. For example, Gastrodon would have front sprite files named "`GASTRODON.png`" and "`GASTRODON_1.png`" only (the default form West Sea and the alternate form East Sea respectively).