- For the main page about items, see Items.
- For a description of how item effects work, see Item effects.
- For adding, removing, counting and choosing items in the Bag, see Manipulating items.
This page describes how to define an item.
Defining an item
An item begins with its definition. This means that is is listed in the PBS file "items.txt", so that it can be recognised by the game as an item. This alone does not give the item an effect, but you must start by defining it before you can use it.
This page only describes how to define an item. See the page Item effects to find out how to add effects to defined items.
PBS file "items.txt"
The PBS file "items.txt" lists all the defined items in the game. Each line in this file is one separate item.
Every line in this file follows the same format. Firstly, here are some examples:
1,REPEL,Repel,Repels,1,350,"An item that prevents weak wild Pokémon from appearing for 100 steps after its use.",2,0,0, 217,POTION,Potion,Potions,2,300,"A spray-type medicine for wounds. It restores the HP of one Pokémon by just 20 points.",1,1,0, 266,GREATBALL,Great Ball,Great Balls,3,600,"A good, high-performance Ball that provides a higher Pokémon catch rate than a standard Poké Ball.",0,2,4, 329,TM42,TM42,TM42s,4,3000,"An attack move that doubles its power if the user is poisoned, paralyzed, or has a burn.",3,0,0,FACADE 510,TOWNMAP,Town Map,Town Maps,8,0,"A very convenient map that can be viewed anytime. It even shows your present location.",2,0,6,
Each line is structured as follows, with commas separating each part:
|1||ID number|| This number must be different for each item. It must be a whole number between 1 and 65535 (it cannot be 0). You can skip numbers (e.g. the sequence |
|2||Internal name||This is how the scripts refer to the item. Typically this is the item name, but written in all capital letters and with no spaces or symbols. The internal name is never seen by the player.|
|3||Display name||The name of the item, as seen by the player.|
|4||Plural display name||The plural form of the name of the item, as seen by the player.|
|5|| The Bag pocket number the item is stored in. By default, this is one of:
|6||Price||The cost of the item when the player buys it from a Poké Mart. Note that when the player sells the item to a Poké Mart, it is sold for half this price (by default). If an item has a price of 0, the player cannot sell it.|
|7||Description|| The item'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. |
Typically, TMs and HMs will have the same description as the moves they teach, but they don't need to.
|8||Usability outside of battle|| Is one of the following values:
|9||Usability in battle|| Is one of the following values:
|10||Special items|| Is one of the following values:
|11||TM/HM move||This field is for TMs and HMs only, and contains the internal name of the move that it teaches.|
Each move that can be taught (by TMs, HMs and Move Tutors) must have its own section in the PBS file "tm.txt", which lists all Pokémon capable of learning that move. See the page Learning moves for more information.
Each item has a single icon, which is located in the folder "Graphics/Icons" and called
XXX is the internal name of that item or its ID number padded to 3 digits (e.g. item number 6 would have an icon called "item006.png", item number 42 would have an icon called "item042.png").
The item icon can be any size, although 48x48 pixels is traditional.
An item's icon can be animated. For it to be animated, its graphic should contain a number of cels in a row, and each cel must be exactly 48x48 pixels in size. No matter how many cels there are in the graphic, one complete cycle will last 40 frames (i.e. 1 second), so having more cels means less time is spent showing each individual cel. Both of these values (48 pixels and 40 frames) are defined at the top of the script section PItem_Sprites and are easily changeable; note that they apply to all item icons.
In addition to the above, each Mail item also needs its own background picture. This picture is located in the folder "Graphics/Pictures" and called
XXX is the internal name of that item or its ID number padded to 3 digits.
Mail background pictures should be the size of the game screen.