Difference between revisions of "Template:Attribute"
m |
GrampaSwood (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
{{dictionary/wrapper}} | {{dictionary/wrapper}} | ||
=== Example === | === Example === | ||
− | <nowiki>{{attribute|StickiesDetonateStickies}}</nowiki> generates "{{attribute|StickiesDetonateStickies}}"<br> | + | <code><nowiki>{{attribute|StickiesDetonateStickies}}</nowiki></code> generates "{{attribute|StickiesDetonateStickies}}"<br> |
− | <nowiki>{{attribute|MedicRegenBonus|20}}</nowiki> generates "{{attribute|MedicRegenBonus|20}}"<br> | + | <code><nowiki>{{attribute|MedicRegenBonus|20}}</nowiki></code> generates "{{attribute|MedicRegenBonus|20}}"<br> |
− | <nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki> generates "{{attribute|SaxxyAward|Best Extended|2023}}" | + | <code><nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki></code> generates "{{attribute|SaxxyAward|Best Extended|2023}}" |
=== Syntax === | === Syntax === | ||
− | <nowiki>{{attribute|attr|val1|val2}}</nowiki> | + | <code><nowiki>{{attribute|attr|val1|val2}}</nowiki></code> |
− | ;attr: Attribute token. See [[File:tf_english.txt]] | + | ;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". | ;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: | :; Example of corret usage: | ||
− | :: <nowiki>{{attribute|ClipSize_Positive|20}}</nowiki> generates "{{attribute|ClipSize_Positive|20}}" | + | :: <code><nowiki>{{attribute|ClipSize_Positive|20}}</nowiki></code> generates "{{attribute|ClipSize_Positive|20}}" |
− | :: <nowiki>{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}</nowiki> generates "{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}" — Note that only ''raw numbers'' should be passed along, text should always be translated. | + | :: <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: | :; Example of incorrect usage: | ||
− | :: <nowiki>{{attribute|ReducedCloakFromAmmo}}</nowiki> generates "{{attribute|ReducedCloakFromAmmo}}" — Missing a value | + | :: <code><nowiki>{{attribute|ReducedCloakFromAmmo}}</nowiki></code> generates "{{attribute|ReducedCloakFromAmmo}}" — Missing a value |
− | :: <nowiki>{{attribute|SaxxyAward|Best Extended}}</nowiki> generates "{{attribute|SaxxyAward|Best Extended}}" — Also missing a value | + | :: <code><nowiki>{{attribute|SaxxyAward|Best Extended}}</nowiki></code> generates "{{attribute|SaxxyAward|Best Extended}}" — Also missing a value |
− | :: <nowiki>{{attribute|MemoryMakerAward|Best Extended|2023}}</nowiki> generates "{{attribute|MemoryMakerAward|Best Extended|2023}}" — Text can't be translated | + | :: <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. | ;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.