Essentials Docs Wiki
Essentials Docs Wiki
For the main page about moves, see Moves.
For a description of how move effects work, see Move effects.
For a list of all function codes and their effects, see Function codes.
For how to create an animation for a move, see Attack animations.

This page describes how to define a move.

Defining a move

A move begins with its definition. This means that it is listed in the PBS file "moves.txt", so that it can be recognised by the game as a move. This alone does not necessarily give the move an effect, but you must start by defining it before you can use it.

This page only describes how to define a move. See the page Move effects to find out how to add effects to defined moves.

PBS file "moves.txt"

The PBS file "moves.txt" lists all the defined moves in the game. Each line in this file is one separate move.

Every line in this file follows the same format. Firstly, here are some examples:

188,FLAMETHROWER,Flamethrower,00A,90,FIRE,Special,100,15,10,NearOther,0,bef,"The target is scorched with an intense blast of fire. It may also leave the target with a burn."
212,FLY,Fly,0C9,90,FLYING,Physical,95,15,0,Other,0,abef,"The user soars, then strikes on the second turn. It can also be used for flying to any familiar town."
399,TACKLE,Tackle,000,40,NORMAL,Physical,100,35,0,NearOther,0,abef,"A physical attack in which the user charges and slams into the target with its whole body."
510,TAILWHIP,Tail Whip,043,0,NORMAL,Status,100,30,0,AllNearFoes,0,bce,"The user wags its tail cutely, making opposing Pokémon less wary and lowering their Defense stat."
667,BUBBLE,Bubble,044,40,WATER,Special,100,30,10,AllNearFoes,0,bef,"A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats."

Each line is structured as follows, with commas separating each part:

Part Information Description
1 ID number This number must be different for each move. It must be a whole number greater than 0. You can skip numbers (e.g. the sequence 23,24,25,197,198,199,... is allowed). The order in which moves are numbered is not important.

ID numbers are obsolete and not used for anything.

2 ID This must be different for each move. This is how the scripts refer to the move. Typically this is the same as the move name, but written in all capital letters and with no spaces or symbols. In the scripts, the ID is used as a symbol (i.e. with a colon in front of it, e.g. :TACKLE). The ID is never seen by the player.
3 Name The name of the move, as seen by the player.
4 Function code The move's function code. This is a string of text. Each function code represents a different effect (e.g. poisons the target).
5 Base power The move's base power value. Status moves have a base power of 0, while moves with a variable base power are defined here with a base power of 1. For multi-hit moves, this is the base power of a single hit.
6 Type The ID of the move's elemental type.
7 Damage category Is one of the following:
  • Physical
  • Special
  • Status
8 Accuracy The move's accuracy, as a percentage. An accuracy of 0 means the move doesn't perform an accuracy check (i.e. it will always hit, barring effects like semi-invulnerability).
9 Total PP The maximum amount of PP this move can have, not counting modifiers such as the item PP Up. If the total PP is 0, the move can be used infinitely.
10 Additional effect chance The probability that the move's additional effect occurs, as a percentage. If the move has no additional effect (e.g. all status moves), this value is 0.

Note that some moves have an additional effect chance of 100 (e.g. Acid Spray), which is not the same thing as having an effect that will always occur. Abilities like Sheer Force and Shield Dust only affect additional effects, not regular effects.

11 Target The Pokémon that the move will strike. Is one of the following:
  • None - For Counter, Metal Burst, Mirror Coat.
  • User
  • NearAlly - For Aromatic Mist, Helping Hand, Helping Hand.
  • UserOrNearAlly - For Acupressure.
  • UserAndAllies - For Aromatherapy, Gear Up, Heal Bell, Life Dew, Magnetic Flux.
  • NearFoe - For Me First.
  • AllNearFoes
  • RandomNearFoe - For Petal Dance, Outrage, Struggle, Thrash, Uproar.
  • Foe
  • AllFoes - Unused by default.
  • NearOther
  • AllNearOthers
  • Other - For most Flying-type moves and pulse moves.
  • AllBattlers - For Flower Shield, Perish Song, Rototiller, Teatime.
  • UserSide - Affects the side itself rather than any Pokémon.
  • FoeSide - Affects the side itself rather than any Pokémon. For entry hazards.
  • BothSides - Affects the battle as a whole rather than any Pokémon. For weather, etc.

The word "near" means the move will be unable to target a Pokémon that is not near to the user (e.g. when they are at opposite ends in a triple battle).

12 Priority The move's priority, between -6 and 6 inclusive. This is usually 0. A higher priority move will be used before all moves of lower priority, regardless of Speed calculations. Moves with equal priority will be used depending on which move user is faster.

For example, Quick Attack has a priority of 1.

13 Flags Any combination of the following letters:
  • a - The move makes physical contact with the target.
  • b - The target can use Protect or Detect to protect itself from the move.
  • c - The target can use Magic Coat to redirect the effect of the move. Use this flag if the move deals no damage but causes a negative effect on the target. (Flags c and d are mutually exclusive.)
  • d - The target can use Snatch to steal the effect of the move. Use this flag for most moves that target the user. (Flags c and d are mutually exclusive.)
  • e - The move can be copied by Mirror Move.
  • f - The move has a 10% chance of making the opponent flinch if the user is holding a King's Rock/Razor Fang. Use this flag for all damaging moves that don't already have a flinching effect.
  • g - If the user is frozen, the move will thaw it out before it is used.
  • h - The move has a high critical hit rate.
  • i - The move is a biting move (powered up by the ability Strong Jaw).
  • j - The move is a punching move (powered up by the ability Iron Fist).
  • k - The move is a sound-based move.
  • l - The move is a powder-based move (Grass-type Pokémon are immune to them).
  • m - The move is a pulse-based move (powered up by the ability Mega Launcher).
  • n - The move is a bomb-based move (resisted by the ability Bulletproof).
  • o - The move is a dance move (repeated by the ability Dancer).
14 Description The move's description.

If there are any commas in the description, you must surround the entire description with quote marks. If there are no commas in the description, there's no harm in having those quote marks anyway.

If there are any quote marks in the description itself, you must put a backslash before each of them, e.g. \". The same applies if there are any apostrophes in the description and you haven't surrounded it with quote marks.