User Tools

Site Tools


item

This is an old revision of the document!


Item


An item represents anything that the player is able to pick up and collect in their inventory or place into item containers. This includes potions, keys, weapons, or even quest items that the player must retrieve for an NPC. The items for your game are defined in the Item Editor.

Scripting

Certain properties of an item can be accessed from a script, for example to get the display name of an item by ID or to check the stack size of an item in a particular storage slot.

Retrieving an item's name and description:

$item_name = item["ITEM_0001"].name
$item_desc = item["ITEM_0001"].description

Retrieving the ID and count (i.e. stack size) of an item in a storage slot:

$item_id = widget["test"].element["0001"].item.id
$item_count = widget["test"].element["0001"].item.count
item.1606937110.txt.gz · Last modified: 2020/12/02 11:25 by justin