Module:ItemData/doc: Difference between revisions
Jump to navigation
Jump to search
Created page with "Loads data from Data:ItemData.json" |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
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== | |||
*<code>get_cost|ITEM_NAME</code> | |||
**Returns the total cost including components. | |||
*<code>get_type|ITEM_NAME</code> | |||
**The ItemData.json has different names for each category: Weapon = Weapon, Vitality = Armor, Spirit = Tech. This function will return Weapon, Vitality, or Spirit | |||
*<code>is_active|ITEM_NAME</code> | |||
**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