Difference between revisions of "Creating Items"

From Tuxepedia
Jump to navigation Jump to search
(Created page with "When creating content, you might want to add your own cool item to the game. This page will walk you through creating your own item and discuss how you can use it in the game....")
 
Line 2: Line 2:


== Item Design ==
== Item Design ==
Items in Tuxemon can be created by adding a JSON file to the `resources/gfx/items` directory. For more information on creating items, view the [item data](item-data) page. From there, you can specify the name of the item, its type, description, power, and [item effects](item-effects). An item's effects are the heart of what makes an item unique. You can have as many item effects bound to an item as you'd like to create an item with unique behavior. To create a **brand new** item effect, you'll need to add it as a new method to the [core.components.item.Item](http://www.tuxemon.org/docs/core.components.item.html#core.components.item.Item) class.
Items in Tuxemon can be created by adding a JSON file to the <code>resources/gfx/items</code> directory. For more information on creating items, view the [[item data]] page. From there, you can specify the name of the item, its type, description, power, and [[item effects]]. An item's effects are the heart of what makes an item unique. You can have as many item effects bound to an item as you'd like to create an item with unique behavior. To create a '''brand new''' item effect, you'll need to add it as a new method to the [http://www.tuxemon.org/docs/core.components.item.html#core.components.item.Item core.components.item.Item] class.


== Creating Item Graphics ==
== Creating Item Graphics ==


Item sprites should be PNG images that are **24 x 24** pixels in size. Here is an example of some item sprites:
Item sprites should be PNG images that are '''24 x 24''' pixels in size. Here is an example of some item sprites:


[[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 `resources/gfx/items`.
After creating your item sprite, put your graphic under <code>resources/gfx/items</code>.


== Using your item in Tuxemon ==
== Using your item in Tuxemon ==
You can add your item to the player's inventory by creating an *action event* with an action type of "add_item" using the [http://www.mapeditor.org Tiled map editor]. For more information on adding event actions and conditions to a map, check out the [[Map editor events]].
You can add your item to the player's inventory by creating an *action event* with an action type of "add_item" using the [[Tiled map editor]]. For more information on adding event actions and conditions to a map, check out the [[Map Editor Events]].

Revision as of 08:54, 18 September 2017

When creating content, you might want to add your own cool item to the game. This page will walk you through creating your own item and discuss how you can use it in the game.

Item Design

Items in Tuxemon can be created by adding a JSON file to the resources/gfx/items directory. For more information on creating items, view the item data page. From there, you can specify the name of the item, its type, description, power, and item effects. An item's effects are the heart of what makes an item unique. You can have as many item effects bound to an item as you'd like to create an item with unique behavior. To create a brand new item effect, you'll need to add it as a new method to the core.components.item.Item class.

Creating Item Graphics

Item sprites should be PNG images that are 24 x 24 pixels in size. Here is an example of some item sprites:

BANANA 2.png Bug gym badge.png

After creating your item sprite, put your graphic under resources/gfx/items.

Using your item in Tuxemon

You can add your item to the player's inventory by creating an *action event* with an action type of "add_item" using the Tiled map editor. For more information on adding event actions and conditions to a map, check out the Map Editor Events.