Editing Creating Items
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
[[File:BANANA_2.png]] [[File:Bug_gym_badge.png]] | [[File:BANANA_2.png]] [[File:Bug_gym_badge.png]] | ||
After creating your item sprite, put your graphic under <code> | After creating your item sprite, put your graphic under <code>resources/gfx/items</code>. | ||
== Using your item in Tuxemon == | == Using your item in Tuxemon == | ||
Line 13: | Line 13: | ||
== Item Design == | == Item Design == | ||
Items in Tuxemon can be created by adding a JSON file to the <code> | Items in Tuxemon can be created by adding a JSON file to the <code>resources/db/item</code> directory. With each new item, the following data must be specified: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 21: | Line 21: | ||
|- | |- | ||
| conditions | | conditions | ||
| Conditions are the prerequisites on which an item can be used or not. By using the example below: "is current_hp <,1.0", and "is current_hp >,0" | | Conditions are the prerequisites on which an item can be used or not. By using the example below: "is current_hp <,1.0", and "is current_hp >,0" mean that the item can be used on a monster with more than 0 HP (not fainted) and less that the total (not healthy). | ||
|- | |- | ||
| effects | | effects | ||
Line 39: | Line 39: | ||
|- | |- | ||
| type | | type | ||
| It can be '''KeyItem''' or '''Consumable''' | | It can be '''KeyItem''' or '''Consumable'''. If used, then '''Consumable''' is going to remove 1 quantity. | ||
|- | |- | ||
| usable_in | | usable_in | ||
Line 52: | Line 52: | ||
| use_success | | use_success | ||
| Corresponding msgid (translation PO file) will appear if the item is used successfully (depending on effects). | | Corresponding msgid (translation PO file) will appear if the item is used successfully (depending on effects). | ||
|} | |} | ||
Here is an example of what an item file might look like: | Here is an example of what an item file might look like: | ||
` | `resources/db/item/potion.json` | ||
json | json |