Template:DataProp/doc: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Update not-found example to show error message (with help from vergir-bot LLM) |
Fix doc page: restore Weapon example, clean up duplicate sections (with help from vergir-bot LLM) |
||
| Line 4: | Line 4: | ||
Powered by [[Module:GameData|Module:GameData]]. | Powered by [[Module:GameData|Module:GameData]]. | ||
Dot notation is supported for nested properties (e.g. <code>Scale.Value</code>). Tables with a <code>Value</code> field are automatically unwrapped. | |||
== Parameters == | == Parameters == | ||
| Line 34: | 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. | Drifter regenerates {{DataProp|Drifter|BaseHealthRegen}} HP each second. | ||
=== | === Weapon === | ||
<code>Mo & Krill fires {{DataProp|Mo & Krill|BulletsPerShot}} bullets per shot.</code> | |||
<code>{{DataProp| | |||
Mo & Krill fires {{DataProp|Mo & Krill|BulletsPerShot}} bullets per shot. | |||
=== Ability === | === Ability === | ||
| Line 58: | Line 54: | ||
=== Not found === | === Not found === | ||
If the entity or property does not exist, the template returns | 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}}</code> | ||
{{DataProp|Nonexistent Item|FakeProperty}} | |||
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | <includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | ||