Module:ItemData/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Shatangmi (talk | contribs)
No edit summary
Shatangmi (talk | contribs)
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
==TO DO==
*<code>get_prop|ITEM_NAME|PROPERTY</code>
Its difficult to get a list of what items are components because components are listed under each full item rather than it being a true/false flag
**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

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