Template:DataProp/doc: Difference between revisionsGive feedback
m minor doc fixes |
Update not-found example to show error message (with help from vergir-bot LLM) |
||
| Line 38: | Line 38: | ||
Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}}HP each second. | 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> | |||
{{DataProp|Nonexistent Item|FakeProperty}} | |||
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | |||
=== Ability === | === Ability === | ||
Revision as of 12:38, 1 June 2026
Usage
A shorthand template to retrieve raw technical values from datamined game data. Searches across abilities, heroes, and items automatically.
Powered by Module:GameData.
For nested properties use dot notation e.g. LevelScaling.TechPower. It also automatically unwraps things like DPS.Value.
Parameters
Retrieves a raw data value from abilities, heroes, or items.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Entity name | 1 | Name of the ability, hero, or item.
| String | required |
| Property | 2 | Property key to retrieve. Supports dot notation for nested values.
| String | required |
Examples
Hero
Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}}HP each second.
Drifter regenerates 3.5HP each second.
Not found
If the entity or property does not exist, the template returns a visible error message.
{{DataProp|Nonexistent Item|FakeProperty}}
Entity not found: Nonexistent Item
Ability
Singularity deals {{DataProp|Singularity|DPS}} damage per second.
Singularity deals 75 damage per second.
Item
Grit's barrier lasts {{DataProp|Grit|BarrierDuration}}s.
Grit's barrier lasts 4s.
Not found
If the entity or property does not exist, the template returns an empty string.
{{DataProp|Nonexistent Item|FakeProperty}}
Result: "Entity not found: Nonexistent Item"