Difference between revisions of "Template:Attribute"
m |
GrampaSwood (talk | contribs) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{dictionary/attributes/{{lc:{{{class|{{{1|error}}}}}}}}|{{#if:{{{lang|{{{force|}}}}}}|lang|null}}={{{lang|{{{force|}}}}}}|2={{{2}}}|3={{{3 | + | <includeonly>{{dictionary/attributes/{{lc:{{{class|{{{1|error}}}}}}}}|{{#if:{{{lang|{{{force|}}}}}}|lang|null}}={{{lang|{{{force|}}}}}}|2={{{2|VALUE 1 NOT SET}}}|3={{{3|VALUE 2 NOT SET}}}}}</includeonly><noinclude>{{doc begin}} |
− | </includeonly><noinclude>{{doc begin}} | ||
{{dictionary/wrapper}} | {{dictionary/wrapper}} | ||
=== Example === | === Example === | ||
− | < | + | <code><nowiki>{{attribute|StickiesDetonateStickies}}</nowiki></code> generates "{{attribute|StickiesDetonateStickies}}"<br> |
− | + | <code><nowiki>{{attribute|MedicRegenBonus|20}}</nowiki></code> generates "{{attribute|MedicRegenBonus|20}}"<br> | |
− | <nowiki>{{attribute|MedicRegenBonus|20}}</nowiki> generates {{attribute|MedicRegenBonus|20}}<br> | + | <code><nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki></code> generates "{{attribute|SaxxyAward|Best Extended|2023}}" |
− | <nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki> generates {{attribute|SaxxyAward|Best Extended|2023}} | ||
=== Syntax === | === Syntax === | ||
− | <nowiki>{{attribute| | + | <code><nowiki>{{attribute|attr|val1|val2}}</nowiki></code> |
− | ; | + | ;attr: Attribute token. See [[File:tf_english.txt]], [[List of item attributes]], or [[Template:dictionary/attributes|Dictionary/attributes]] for a list of attributes. |
− | ; | + | ;val1: Value 1. Sometimes required - If the attribute has a variable and you don't specify a value, it will default to "VALUE NOT SET". |
− | ; | + | :; Example of corret usage: |
+ | :: <code><nowiki>{{attribute|ClipSize_Positive|20}}</nowiki></code> generates "{{attribute|ClipSize_Positive|20}}" | ||
+ | :: <code><nowiki>{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}</nowiki></code> generates "{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}" — Note that only ''raw numbers'' should be passed along, text should always be translated. | ||
+ | :; Example of incorrect usage: | ||
+ | :: <code><nowiki>{{attribute|ReducedCloakFromAmmo}}</nowiki></code> generates "{{attribute|ReducedCloakFromAmmo}}" — Missing a value | ||
+ | :: <code><nowiki>{{attribute|SaxxyAward|Best Extended}}</nowiki></code> generates "{{attribute|SaxxyAward|Best Extended}}" — Also missing a value | ||
+ | :: <code><nowiki>{{attribute|MemoryMakerAward|Best Extended|2023}}</nowiki></code> generates "{{attribute|MemoryMakerAward|Best Extended|2023}}" — Text can't be translated | ||
+ | |||
+ | ;val2: Value 2. Same as above. | ||
[[Category:Template dictionary|Attribute]]</noinclude> | [[Category:Template dictionary|Attribute]]</noinclude> |
Latest revision as of 13:39, 11 July 2024
Documentation for Attribute
This is a wrapper template for a {{dictionary}}
entry. No individual language strings are stored here.
Example
{{attribute|StickiesDetonateStickies}}
generates "Able to destroy enemy stickybombs"
{{attribute|MedicRegenBonus|20}}
generates "+20% natural regen rate"
{{attribute|SaxxyAward|Best Extended|2023}}
generates "Winner: Best Extended 2023"
Syntax
{{attribute|attr|val1|val2}}
- attr
- Attribute token. See File:Tf english.txt, List of item attributes, or Dictionary/attributes for a list of attributes.
- val1
- Value 1. Sometimes required - If the attribute has a variable and you don't specify a value, it will default to "VALUE NOT SET".
- Example of corret usage
{{attribute|ClipSize_Positive|20}}
generates "+20% clip size"{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}
generates "Saxxy Nominee: Best Cinematography 2023" — Note that only raw numbers should be passed along, text should always be translated.- Example of incorrect usage
{{attribute|ReducedCloakFromAmmo}}
generates "VALUE 1 NOT SET% cloak meter from ammo boxes" — Missing a value{{attribute|SaxxyAward|Best Extended}}
generates "Winner: Best Extended VALUE 2 NOT SET" — Also missing a value{{attribute|MemoryMakerAward|Best Extended|2023}}
generates "Saxxy Nominee: Best Extended 2023" — Text can't be translated
- val2
- Value 2. Same as above.