Essentials Docs Wiki

The Essentials wiki has moved and is now at: Essentials Engine wiki

This wiki will no longer be updated.

READ MORE

Essentials Docs Wiki
Maruno (talk | contribs)
No edit summary
Maruno (talk | contribs)
No edit summary
Tag: Source edit
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
== Defining an ability ==
 
== Defining an ability ==
   
An ability begins with its definition. This means that is is listed in the [[PBS file]] "abilities.txt", so that it can be recognised by the game as an ability. This alone does not give the ability an effect, but you ''must'' start by defining it before you can use it.
+
An ability begins with its definition. This means that it is listed in the [[PBS file]] "abilities.txt", so that it can be recognised by the game as an ability. This alone does not give the ability an effect, but you ''must'' start by defining it before you can use it.
   
This page only describes how to define an ability. See the page [[Abilities]] to find out how to add effects to defined abilities.
+
This page only describes how to define an ability. See the page [[Abilities]] to find out how to add effects to defined abilities.
   
 
== PBS file "abilities.txt" ==
 
== PBS file "abilities.txt" ==
   
The [[PBS file]] "abilities.txt" lists all the defined abilities in the game. Each line in this file is one separate ability.
+
The [[PBS file]] "abilities.txt" lists all the defined abilities in the game. Each line in this file is one separate ability.
   
 
Every line in this file follows the same format. Firstly, here are some examples:
 
Every line in this file follows the same format. Firstly, here are some examples:
Line 30: Line 30:
 
! 1
 
! 1
 
| ID number
 
| ID number
| This number must be different for each ability. It must be a whole number between 1 and 65535 (it cannot be 0). You can skip numbers (e.g. the sequence <code>23,24,25,197,198,199,...</code> is allowed). The order in which abilities are numbered is not important.
+
| This number must be different for each ability. It must be a whole number greater than 0. You can skip numbers (e.g. the sequence <code>23,24,25,197,198,199,...</code> is allowed). The order in which abilities are numbered is not important.
  +
  +
ID numbers are obsolete and not used for anything.
 
|-
 
|-
 
! 2
 
! 2
  +
| ID
| Internal name
 
| This is how the scripts refer to the ability. Typically this is the same as the ability name but written in all capital letters and with no spaces or symbols. The internal name is never seen by the player. This must be different for each ability.
+
| This must be different for each ability. This is how the scripts refer to the ability. Typically this is the same as the ability's 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. :INTIMIDATE). The ID is never seen by the player.
 
|-
 
|-
 
! 3
 
! 3
  +
| Name
| Display name
 
 
| The name of the ability, as seen by the player.
 
| The name of the ability, as seen by the player.
 
|-
 
|-
 
! 4
 
! 4
 
| Description
 
| Description
  +
| The ability's description.
| The ability's description. Quote marks are only required if there is a comma in the description, but there's no harm adding them in anyway. If there are any quote marks in the description itself, you must put a backslash before each of them, e.g. <code>\"</code>. The same applies if there are any apostrophes in the description and you haven't surrounded the whole description with quote marks.
 
  +
  +
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. <code>\"</code>. The same applies if there are any apostrophes in the description and you haven't surrounded it with quote marks.
 
|}
 
|}

Revision as of 18:28, 8 May 2021

For the main page about abilities, see Abilities.
For a list of abilities in Essentials,, see List of abilities.
For assigning abilities to Pokémon species, see Defining a species.

This page describes how to define an ability.

Defining an ability

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

This page only describes how to define an ability. See the page Abilities to find out how to add effects to defined abilities.

PBS file "abilities.txt"

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

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

1,STENCH,Stench,"The stench may cause the target to flinch."
2,DRIZZLE,Drizzle,"The Pokémon makes it rain if it appears in battle."
3,SPEEDBOOST,Speed Boost,"Its Speed stat is gradually boosted."
110,TINTEDLENS,Tinted Lens,"Powers up \"not very effective\" moves."

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

Part Information Description
1 ID number This number must be different for each ability. 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 abilities are numbered is not important.

ID numbers are obsolete and not used for anything.

2 ID This must be different for each ability. This is how the scripts refer to the ability. Typically this is the same as the ability's 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. :INTIMIDATE). The ID is never seen by the player.
3 Name The name of the ability, as seen by the player.
4 Description The ability'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.