Editing Template:DataProp/doc

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
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 6: Line 6:
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.


An optional third parameter selects a game mode variant. Passing <code>Street Brawl</code> returns the value as changed for [[Street Brawl]]; properties that Street Brawl leaves alone fall back to the base value, so the parameter is safe to use on any property. Only abilities are affected.
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 25: Line 25:
"required": true,
"required": true,
"example": "DPS, BaseHealthRegen, citadel_camera_fov"
"example": "DPS, BaseHealthRegen, citadel_camera_fov"
},
"3": {
"label": "Variant",
"description": "Optional game mode variant. Accepts Street Brawl, ignoring case and spacing, and returns the value changed for Street Brawl. Properties that Street Brawl does not change fall back to the base value. Applies to abilities only.",
"type": "string",
"required": false,
"example": "Street Brawl"
}
}
},
},
"format": "inline",
"format": "inline",
"paramOrder": ["1", "2", "3"],
"paramOrder": ["1", "2"],
"description": "Retrieves a raw data value from abilities, heroes, items, or console variables."
"description": "Retrieves a raw data value from abilities, heroes, items, or console variables."
}
}
Line 48: Line 41:


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


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


=== Ability ===
=== Ability ===
Line 66: Line 59:


The default camera field of view is {{DataProp|Convar|citadel_camera_fov}}.
The default camera field of view is {{DataProp|Convar|citadel_camera_fov}}.
=== Street Brawl ===
<code>Essence Bomb has a radius of &#123;&#123;DataProp|Essence Bomb|Radius&#125;&#125;m, or &#123;&#123;DataProp|Essence Bomb|Radius|Street Brawl&#125;&#125;m in Street Brawl.</code>
Essence Bomb has a radius of {{DataProp|Essence Bomb|Radius}}m, or {{DataProp|Essence Bomb|Radius|Street Brawl}}m in Street Brawl.
Street Brawl does not change Essence Bomb's damage, so the base value is returned:
<code>&#123;&#123;DataProp|Essence Bomb|Damage|Street Brawl&#125;&#125;</code>
{{DataProp|Essence Bomb|Damage|Street Brawl}}


=== Errors ===
=== Errors ===
Line 96: Line 78:


{{DataProp|Convar|fake_convar}}
{{DataProp|Convar|fake_convar}}
If the variant is not recognised:
<code>&#123;&#123;DataProp|Essence Bomb|Radius|Deathmatch&#125;&#125;</code>
{{DataProp|Essence Bomb|Radius|Deathmatch}}


<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Pages included on this page: