This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
item [2020/12/02 10:47] – justin | item [2020/12/02 11:25] – justin | ||
---|---|---|---|
Line 5: | Line 5: | ||
=====Scripting===== | =====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 [[item_storage_slot|storage slot]]. | ||
+ | |||
+ | **Retrieving an item's name and description: | ||
<code bauxite> | <code bauxite> | ||
$item_name = item[" | $item_name = item[" | ||
Line 10: | Line 13: | ||
</ | </ | ||
+ | **Retrieving the ID and count (i.e. stack size) of an item in a storage slot:** | ||
<code bauxite> | <code bauxite> | ||
$item_id = widget[" | $item_id = widget[" |