Template:DataProp/doc: Difference between revisions

Vergir (talk | contribs)
Document Convar lookup mode: usage note, TemplateData, and Convar example (with help from vergir-bot LLM)
Vergir (talk | contribs)
m update doc
Line 5: Line 5:


Dot notation is supported for nested properties (e.g. <code>Scale.Value</code>). Tables with a <code>Value</code> field are automatically unwrapped.
Dot notation is supported for nested properties (e.g. <code>Scale.Value</code>). Tables with a <code>Value</code> field are automatically unwrapped.
To retrieve a [[Console commands|console variable]] value, pass <code>Convar</code> as the first parameter and the convar name as the second (e.g. <code>&#123;&#123;DataProp|Convar|citadel_camera_fov&#125;&#125;</code>). When a convar is stored together with a description, only its value is returned.


== Parameters ==
== Parameters ==
Line 41: Line 39:


=== Weapon ===
=== Weapon ===
<code>Mo &amp; Krill fires &#123;&#123;DataProp|Mo & Krill|BulletsPerShot&#125;&#125; bullets per shot.</code>
<code>Mo &amp; Krill fires &#123;&#123;DataProp|Mo & Krill|Weapon.BulletsPerShot&#125;&#125; bullets per shot.</code>


Mo & Krill fires {{DataProp|Mo & Krill|BulletsPerShot}} bullets per shot.
Mo & Krill fires {{DataProp|Mo & Krill|Weapon.BulletsPerShot}} bullets per shot.


=== Ability ===
=== Ability ===