Difference between revisions of "Template:Attribute"

From Team Fortress Wiki
Jump to: navigation, search
m
 
Line 9: Line 9:
 
<code><nowiki>{{attribute|attr|val1|val2}}</nowiki></code>
 
<code><nowiki>{{attribute|attr|val1|val2}}</nowiki></code>
  
;attr: Attribute token. See [[File:tf_english.txt]] and [[List of item attributes]] for a list of attributes.
+
;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:

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.