Difference between revisions of "Template:Attribute"

From Team Fortress Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
<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>{{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 ===
<nowiki>{{attribute|StickiesDetonateStickies}}</nowiki> generates {{attribute|StickiesDetonateStickies}}<br>
+
<nowiki>{{attribute|StickiesDetonateStickies}}</nowiki> generates "{{attribute|StickiesDetonateStickies}}"<br>
<nowiki>{{attribute|ReducedCloakFromAmmo|-35}}</nowiki> generates {{attribute|ReducedCloakFromAmmo|-35}}<br>
+
<nowiki>{{attribute|MedicRegenBonus|20}}</nowiki> generates "{{attribute|MedicRegenBonus|20}}"<br>
<nowiki>{{attribute|MedicRegenBonus|20}}</nowiki> generates {{attribute|MedicRegenBonus|20}}<br>
+
<nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki> generates "{{attribute|SaxxyAward|Best Extended|2023}}"
<nowiki>{{attribute|SaxxyAward|Best Extended|2023}}</nowiki> generates {{attribute|SaxxyAward|Best Extended|2023}}
 
  
 
=== Syntax ===
 
=== Syntax ===
<nowiki>{{attribute|arg1|arg2}}</nowiki>
+
<nowiki>{{attribute|attr|val1|val2}}</nowiki>
  
;arg1: Attribute. See [[File:tf_english.txt]] for a list of attributes.
+
;attr: Attribute token. See [[File:tf_english.txt]] and [[List of item attributes]] for a list of attributes.
;arg2: Value 1
+
;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".
;arg3: Value 2
+
:; Example of corret usage:
 +
:: <nowiki>{{attribute|ClipSize_Positive|20}}</nowiki> generates "{{attribute|ClipSize_Positive|20}}"
 +
:: <nowiki>{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}</nowiki> generates "{{attribute|MemoryMakerAward|{{common string|Best Cinematography}}|2023}}" &mdash; Note that only ''raw numbers'' should be passed along, text should always be translated.
 +
:; Example of incorrect usage:
 +
:: <nowiki>{{attribute|ReducedCloakFromAmmo}}</nowiki> generates "{{attribute|ReducedCloakFromAmmo}}" &mdash; Missing a value
 +
:: <nowiki>{{attribute|SaxxyAward|Best Extended}}</nowiki> generates "{{attribute|SaxxyAward|Best Extended}}" &mdash; Also missing a value
 +
:: <nowiki>{{attribute|MemoryMakerAward|Best Extended|2023}}</nowiki> generates "{{attribute|MemoryMakerAward|Best Extended|2023}}" &mdash; Text can't be translated
 +
 
 +
;val2: Value 2. Same as above.
  
 
[[Category:Template dictionary|Attribute]]</noinclude>
 
[[Category:Template dictionary|Attribute]]</noinclude>

Revision as of 01:28, 9 February 2023

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 and List of item 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.