Module:ItemData/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Shatangmi (talk | contribs)
mNo edit summary
Functions: wording
Line 10: Line 10:
**returns true/false
**returns true/false
*<code>get_prop|ITEM_NAME|PROPERTY</code>
*<code>get_prop|ITEM_NAME|PROPERTY</code>
**check the [[Data:ItemData.json|json file]] for item properties
**Returns the value of one of the item's properties. Check the [[Data:ItemData.json|json file]] for item properties
 
==Example==
==Example==
To get the total cost of [[Boundless Spirit]] you'd type:  
To get the total cost of [[Boundless Spirit]] you'd type:  

Revision as of 05:10, 22 February 2025

Loads data from Data:ItemData.json

Usage

{{#invoke:ItemData|FUNCTION_NAME|PARAMETER1|PARAMETER2}}

Functions

  • 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
    • Returns the value of one of the item's properties. Check the json file for item properties

Example

To get the total cost of Boundless Spirit you'd type:

{{#invoke:ItemData|get_cost|Boundless Spirit}}

and it would return:

9800