- For giving, taking, counting and choosing Pokémon, see Manipulating Pokémon.
This page describes how to edit the attributes of a Pokémon, such as its gender, owner or ribbons.
Editing a Pokémon
The first step is to find the Pokémon to edit. This can be done a variety of different ways depending on the circumstances. For example:
pkmn = $Trainer.party pkmn = pbFirstAblePokemon(1) pkmn = $Trainer.lastPokemon pkmn = pbGetPokemon(1)
These will all return a Pokémon (if possible) and call it "
pkmn". This article assumes that the Pokémon being edited is referred to as "
Common attributes to edit
|Ability|| || Sets the Pokémon's ability to be the first natural (0), second natural (1) or a hidden (2-5) ability available to its species. Use |
It is not possible to give the Pokémon any ability other than those defined in the PBS file "pokemon.txt" for its species.
|Ball used|| ||Sets the type of Poké Ball the Pokémon is contained in. The list of Poké Balls and their corresponding numbers is in the script section PItem_PokeBalls.|
|EVs|| || Sets the Pokémon's EVs for a given stat. Each stat should be a number between 0 and 255 inclusive. The stats (the number in square brackets) are as follows:
|Form|| || Sets the Pokémon's form. 0 is the default form as defined in the PBS file "pokemon.txt".
Some Pokémon species determine their form automatically depending on various factors. Their form cannot be manually changed this way, as they will immediately change back.
Setting a Pokémon's form will also recalculate its stats.
|Gender|| || Sets the Pokémon's gender to male or female. They cannot give a Pokémon a gender it cannot have. Use |
You will also need to record the new gender as seen, so that it will show up in the Pokédex. To do this, use
|Happiness|| ||Sets the Pokémon's happiness. This should be a number between 0 and 255 inclusive.|
|Held item|| || Sets the Pokémon's held item. "|
If the item is a mail item, then
If the item is a mail item which shows Pokémon on it, then this should instead be:
|IVs|| || Sets the Pokémon's IVs for a given stat. Each stat should be a number between 0 and 31 inclusive. The stats (the number in square brackets) are as follows:
|Language|| || Sets the Pokémon's language. Is one of the following:
|Level|| || Sets the Pokémon's current level.
What it actually does is change the Pokémon's "
|Moveset|| || The first option teaches a move to the Pokémon. This can teach any move, and will do so without informing the player. If the Pokémon already knows 4 moves, the first move will be forgotten, the other three bumped up and the new move added to the end.
The second option deletes a move from the Pokémon, if it knows it. Again, this will happen without informing the player.
The third option resets the Pokémon's moveset to what a wild Pokémon of that species/level/form would know. This can be useful when changing a Pokémon's level/form.
|Nature|| || Sets the Pokémon's nature. Use |
|Nickname|| || Sets the Pokémon's nickname to a given phrase. Use |
To let the player choose their own name, simply call
|Obtain text|| || Sets the phrase to use instead of the obtain map's name as the place where the Pokémon was obtained. Use |
|Pokérus|| || Gives the Pokémon Pokérus. The parameter is optional, and is the strain of Pokérus to give (between 1 and 15; the strain is randomly chosen if not given).
|Ribbons|| || Gives the Pokémon the specified ribbon (or removes it).
There are a few other methods dealing with ribbons:
|Shadowness|| ||Makes the Pokémon a Shadow Pokémon. It is not so easy to turn a Shadow Pokémon into a regular Pokémon, though.|
|Shininess|| || Makes the Pokémon shiny, or not. Use |
Rare attributes to edit
The following are attributes you are unlikely to ever want to edit. They are listed mainly for completeness.
|Contest stats|| || Sets the Pokémon's contest stats. Each stat should be a number between 0 and 255 inclusive.
Note that these properties are currently unused (except beauty for Feebas' evolution).
|Current HP|| ||Sets the Pokémon's current HP. The second option fully heals the Pokémon's HP. The last option will also restore the Pokémon's PP and status to full/normal.|
|Egg steps|| ||Sets the number of steps required for the Pokémon egg to hatch.|
|Experience|| ||Sets the Pokémon's Experience Points. You will usually want to add/subtract amounts from this, rather than setting it to a specific new value.|
|Fused Pokémon|| || Sets the Pokémon which is fused with this Pokémon. |
|Hatched map|| ||Sets the map in which the Pokémon hatched from an egg. Is used only if the Pokémon's obtain method is "egg received".|
|Hatched time|| ||Sets the time at which the Pokémon hatched from an egg. Is used only if the Pokémon's obtain method is "egg received".|
|Markings|| || Sets the markings the Pokémon has. Each marking has a value, and the Pokémon will have the markings whose values add up to the number specified. The six markings are in order:
For example, if this number is 5, the values that make 5 are 1 (circle) and 4 (triangle), so the Pokémon will have those two markings.
|Obtain level|| ||Sets the Level at which the Pokémon was obtained.|
|Obtain map|| ||Sets the map in which the Pokémon was obtained.|
|Obtain method|| || Sets the method by which the Pokémon was obtained. The number is either |
|Original trainer's gender|| || Sets the gender of the Pokémon's original trainer. The number is either |
|Original trainer's ID number|| || Sets the ID number of the Pokémon's original trainer. The first option sets it to the player's ID number, and the second option sets it to a random other ID number.
This and the original trainer's name determine whether the Pokémon originally belonged to the player or not.
|Original trainer's name|| || Sets the name of the Pokémon's original trainer.
This and the original trainer's ID number determine whether the Pokémon originally belonged to the player or not.
|Personal ID|| || Sets the Pokémon's personal ID. The example will randomise the Pokémon's personal ID, although it can also be set to any value between 0 and 4,294,967,295.
Note that the Pokémon's gender, nature, ability and shininess all depend on the value of the personal ID by default. Spinda's spot locations and the evolution methods "Silcoon" and "Cascoon" also depend on it.
|Species|| ||Sets the Pokémon's species.|
|Status|| || Sets the Pokémon's status. The possible statuses are:
If putting the Pokémon to sleep, then
What can't be changed
There are some attributes of a Pokémon that cannot be changed directly. These are:
- Type 1
- Type 2
- Maximum HP
- Special Attack
- Special Defense
The last part of editing a Pokémon
Once a Pokémon's attributes have been edited, its stats may need to be recalculated. This is done by the following code:
To be safe, you should always include this line after all other edits.