Editing Template:DataProp/docGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
A shorthand template to retrieve raw technical values from datamined game data. Searches across abilities, heroes, and items automatically | A shorthand template to retrieve raw technical values from datamined game data. Searches across abilities, heroes, and items automatically. | ||
Powered by [[Module:GameData|Module:GameData]]. | Powered by [[Module:GameData|Module:GameData]]. | ||
For nested properties use dot notation e.g. <code>LevelScaling.TechPower</code>. It also automatically unwraps things like <code>DPS.Value</code>. | |||
== Parameters == | == Parameters == | ||
| Line 14: | Line 12: | ||
"1": { | "1": { | ||
"label": "Entity name", | "label": "Entity name", | ||
"description": "Name of the ability, hero, or item | "description": "Name of the ability, hero, or item.", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"example": "Singularity, Drifter, Grit | "example": "Singularity, Drifter, Grit" | ||
}, | }, | ||
"2": { | "2": { | ||
"label": "Property", | "label": "Property", | ||
"description": "Property key to retrieve. Supports dot notation for nested values | "description": "Property key to retrieve. Supports dot notation for nested values.", | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"example": "DPS, BaseHealthRegen, | "example": "DPS, BaseHealthRegen, BarrierDuration" | ||
} | } | ||
}, | }, | ||
"format": "inline", | "format": "inline", | ||
"paramOrder": ["1", "2 | "paramOrder": ["1", "2"], | ||
"description": "Retrieves a raw data value from abilities, heroes, items | "description": "Retrieves a raw data value from abilities, heroes, or items." | ||
} | } | ||
</templatedata> | </templatedata> | ||
| Line 43: | Line 34: | ||
=== Hero === | === Hero === | ||
<code>Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}} HP each second.</code> | <code>Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}}HP each second.</code> | ||
Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}}HP each second. | |||
=== Not found === | |||
If the entity or property does not exist, the template returns a visible error message. | |||
<code>{{DataProp|Nonexistent Item|FakeProperty}}</code> | |||
<code> | |||
{{DataProp|Nonexistent Item|FakeProperty}} | |||
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | |||
=== Ability === | === Ability === | ||
| Line 62: | Line 57: | ||
Grit's barrier lasts {{DataProp|Grit|BarrierDuration}}s. | Grit's barrier lasts {{DataProp|Grit|BarrierDuration}}s. | ||
=== | === Not found === | ||
If the entity or property does not exist, the template returns an empty string. | |||
If the entity | |||
<code>{{DataProp| | <code>{{DataProp|Nonexistent Item|FakeProperty}}</code> | ||
{{DataProp| | Result: "{{DataProp|Nonexistent Item|FakeProperty}}" | ||
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | <includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | ||