Module:ItemData/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
Loads data from [[Data:ItemData.json]] | Loads data from [[Data:ItemData.json]] | ||
==Usage== | |||
<pre>{{#invoke:ItemData|FUNCTION_NAME|PARAMETER1|PARAMETER2}}</pre> | |||
==Functions== | ==Functions== | ||
* get_cost|ITEM_NAME | *<code>get_cost|ITEM_NAME</code> | ||
* get_type|ITEM_NAME | **Returns the total cost including components. | ||
* is_active|ITEM_NAME | *<code>get_type|ITEM_NAME</code> | ||
** returns true/false | **The ItemData.json has different names for each category: Weapon = Weapon, Vitality = Armor, Spirit = Tech. This function will return Weapon, Vitality, or Spirit | ||
* get_prop|ITEM_NAME|PROPERTY | *<code>is_active|ITEM_NAME</code> | ||
** check the [[Data:ItemData.json|json file]] for item properties | **returns true/false | ||
== | *<code>get_prop|ITEM_NAME|PROPERTY</code> | ||
**check the [[Data:ItemData.json|json file]] for item properties | |||
==Example== | |||
To get the total cost of [[Boundless Spirit]] you'd type: | |||
<pre>{{#invoke:ItemData|get_cost|Boundless Spirit}}</pre> | |||
and it would return: | |||
<pre>9800</pre> |
Latest revision as of 03:57, 8 September 2024
Loads data from Data:ItemData.json
Usage[edit source]
{{#invoke:ItemData|FUNCTION_NAME|PARAMETER1|PARAMETER2}}
Functions[edit source]
get_cost|ITEM_NAME
- Returns the total cost including components.
get_type|ITEM_NAME
- The ItemData.json has different names for each category: Weapon = Weapon, Vitality = Armor, Spirit = Tech. This function will return Weapon, Vitality, or Spirit
is_active|ITEM_NAME
- returns true/false
get_prop|ITEM_NAME|PROPERTY
- check the json file for item properties
Example[edit source]
To get the total cost of Boundless Spirit you'd type:
{{#invoke:ItemData|get_cost|Boundless Spirit}}
and it would return:
9800