Difference between revisions of "Template:WeaponInfo"

From SpiralKnights

Jump to: navigation, search
m (even more convenient cat sorting (I hope))
m (that minus letter was bothering me xd)
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{SKWindow
+
<includeonly>{{SKWindow
 
| width = 300px
 
| width = 300px
 
| align = right
 
| align = right
Line 17: Line 17:
 
}}
 
}}
 
{{SKWindow/NewRow}}
 
{{SKWindow/NewRow}}
{{SKWindow/Cell|'''[[Damage|Stats]]''':[[File:Icon-notice.png|20px|right|Damage type(s) and Attack Speed influence combat. The attack style of the weapon in relation to the combat environment is also important. Consider both when choosing weapons to wield.]]{{clearright}}{{{stats|[[Image:Equipment-{{{name|Unknown}}}_Stats.png|center|stats]]}}}|left}}<br/>
+
{{SKWindow/Cell|'''[[Damage|Offenses]]''':[[File:Icon-notice.png|20px|right|Damage type(s) and Attack Speed influence combat. The attack style of the weapon in relation to the combat environment is also important. Consider both when choosing weapons to wield.]]{{clearright}}{{{stats|[[Image:Equipment-{{{name|Unknown}}}_Stats.png|center|Stats]]}}}|left}}<br/>
{{SKWindow/NewRow}}
+
{{SKWindow/Cell|'''[[Abilities#Charge Time Reduction|CTR]]''': [[File:Icon-notice.png|20px|right|All weapons gain these CTR bonuses as they level.]]
+
* Level 5+: CTR: Low
+
* Level 10: CTR: Medium|left}}<br/>
+
 
{{SKWindow/NewRow}}
 
{{SKWindow/NewRow}}
 
{{SKWindow/Cell|'''[[Abilities]]''':[[File:Icon-notice.png|20px|right|Boosts and Penalties are both considered "abilities" in general. Many items don't have any special abilities. See the Abilities page for details. Some enemies are immune to certain status conditions - see individual status pages for details.]]{{clearright}}
 
{{SKWindow/Cell|'''[[Abilities]]''':[[File:Icon-notice.png|20px|right|Boosts and Penalties are both considered "abilities" in general. Many items don't have any special abilities. See the Abilities page for details. Some enemies are immune to certain status conditions - see individual status pages for details.]]{{clearright}}
 
{{#switch: {{{abilities|}}}  
 
{{#switch: {{{abilities|}}}  
| #default = {{{abilities|}}}
+
| #default = This item doesn't have any special abilities.
| no      = This item doesn't have any special abilities.
+
| yes      = [[File:Equipment-{{{name|}}} Abilities.png|center]]<br/>
| yes      = [[File:Equipment-{{{name|}}} Abilities.png|center|link={{{status}}}]]<br/>
+
 
}}
 
}}
 
}}
 
}}
 
{{SKWindow/NewRow}}
 
{{SKWindow/NewRow}}
{{SKWindow/Cell|'''Related Items''':
+
{{SKWindow/Cell|'''[[Abilities#Charge Time Reduction|CTR]]''': [[File:Icon-notice.png|20px|right|All weapons gain these CTR bonuses as they level.]]  
{{#if:{{{related items|}}}
+
* Level 5+: CTR: Low
|{{{related items}}}
+
* Level 10: CTR: Medium|left}}<br/>
|*[[File:Equipment-{{{name|}}} icon.png|36px|{{{name}}}]] isn't in any distinct [[group]]s.
+
|padding = 5px 0px 5px 10px
}}
+
|padding = 5px 0px 5px 10px}}
+
 
}}
 
}}
The '''{{{name}}}''' is a {{{star}}}-star [[{{{type}}}]].<includeonly>[[Category:Equipment]][[Category:Weapons|{{{star}}}{{{name}}}]]
+
The '''{{{name}}}''' is a {{{star}}}-star [[{{lcfirst:{{{type}}}}}]].<includeonly>[[Category:Equipment]][[Category:Weapons|{{{star}}}{{{name}}}]]
{{#switch: {{{type}}}
+
{{#switch:{{{categories|yes}}}
 +
|no=
 +
|yes={{#switch: {{{type}}}
 
| bomb    = [[Category:Bombs]]
 
| bomb    = [[Category:Bombs]]
 
| handgun  = [[Category:Handguns]]
 
| handgun  = [[Category:Handguns]]
Line 52: Line 47:
 
| none      =   
 
| none      =   
 
|          =
 
|          =
| Normal    = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Normal damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Normal    = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Normal damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
| Elemental = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Elemental damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8{{{star}}}}}{{{star}}}]]
+
| Elemental = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Elemental damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8{{{star}}}}}-{{{star}}}-{{{name}}}]]
| Piercing  = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Piercing damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Piercing  = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Piercing damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
| Shadow    = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Shadow damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Shadow    = [[Category:Weapons dealing {{#switch:{{{damage 2|}}}|=only|none=only}} Shadow damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
 
}}{{#switch: {{{damage 2|none}}}
 
}}{{#switch: {{{damage 2|none}}}
 
| none      =   
 
| none      =   
 
|          =
 
|          =
| Normal    = [[Category:Weapons dealing Normal damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Normal    = [[Category:Weapons dealing Normal damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
| Elemental = [[Category:Weapons dealing Elemental damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Elemental = [[Category:Weapons dealing Elemental damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
| Piercing  = [[Category:Weapons dealing Piercing damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Piercing  = [[Category:Weapons dealing Piercing damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
| Shadow    = [[Category:Weapons dealing Shadow damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
| Shadow    = [[Category:Weapons dealing Shadow damage|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
 
}}{{#switch:{{{status}}}
 
}}{{#switch:{{{status}}}
 
|      =  
 
|      =  
|Curse  = [[Category:Weapons that can inflict Curse|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Curse  = [[Category:Weapons that can inflict Curse|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Fire  = [[Category:Weapons that can inflict Fire|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Fire  = [[Category:Weapons that can inflict Fire|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Freeze = [[Category:Weapons that can inflict Freeze|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Freeze = [[Category:Weapons that can inflict Freeze|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Poison = [[Category:Weapons that can inflict Poison|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Poison = [[Category:Weapons that can inflict Poison|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Shock  = [[Category:Weapons that can inflict Shock|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Shock  = [[Category:Weapons that can inflict Shock|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Sleep  = [[Category:Weapons that can inflict Sleep|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Sleep  = [[Category:Weapons that can inflict Sleep|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
|Stun  = [[Category:Weapons that can inflict Stun|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}{{{star}}}]]
+
|Stun  = [[Category:Weapons that can inflict Stun|{{#switch:{{{type|}}}|bomb=6|handgun=7|sword=8|Bomb=6|Handgun=7|Sword=8}}-{{{star}}}-{{{name}}}]]
 
}}{{#switch:{{{promotional}}}
 
}}{{#switch:{{{promotional}}}
 
| yes = [[Category:Promotional items]]
 
| yes = [[Category:Promotional items]]
 
| #default =
 
| #default =
}}</includeonly><noinclude>
+
}}}}</includeonly><noinclude>
 +
{{documentation}}[[Category:Infobox templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Latest revision as of 01:48, 1 May 2020

[edit] [purge] Template documentation

Usage

This places an infobox about the weapon on the upper right corner of an article.

It also places the weapon in relevant categories, some of which are "special" categories that use numeric organization.

It uses a few other templates to get the job done. Full documentation for individual templates used can be found by entering this template's code into the edit field of the page you wish to update, clicking "preview," and navigating through "templates used on this page" below the edit field box.

Code

{{WeaponInfo
| name      = {{PAGENAME}} 
| type      = 
| star      = 
| damage 1  = 
| damage 2  = 
| abilities = 
| status    =
| set       = 
}}

Parameters

Required

name
The confirmed name of the item as seen in-game. {{PAGENAME}} should be used for easier copypasting and reduction of mistakes, unless there are disambiguation issues.
type
either bomb, handgun, or sword. We are using lowercase because I forgot about {{lcfirst:}}.
star
either 0, 1, 2, 3, 4, or 5.
damage 1
either Normal, Elemental, Piercing, or Shadow. Please use uppercase. Automatically places item in a relevant category.

Optional

damage 2
no input: no change
Use only if the item has two offensive damage types. "damage 1" is usually "normal" if there are two damage types - several swords are like this. Either Elemental, Piercing, or Shadow. Please use uppercase. Automatically places item in a relevant category.
abilities
no input: defaults to "this item doesn't have any special abilities."
just enter "yes" If the item has any abilities at all. This makes the template have a slot for the ability image. The "yes" should be lowercase because it is not an entity.
status
no input: no change
one of the status conditions. Please use uppercase. Automatically places item in a relevant category.
set
no input: defaults to the item's icon and "isn't in a set."
Use only if the item is confirmed to be in a set. Other groupings are listed in collections and don't belong in this field. If the item qualifies to be in a set, use the code like so:
{{WeaponInfo
| name     = {{PAGENAME}}
| type     = handgun
| star     = 5
| damage 1 = Shadow
| set      = {{SetLinks
| item 1 = Gorgofist
| item 2 = Gorgomega
}}
}}

Notes

This infobox is different from previous infoboxes. The star info and item icon have been moved into the body of the box. The title text font size has been shrunk to fit into a single line in the infobox window - this size is determined by the current longest known item name in the game (one of the "gunner" items, Sacred Snakebite Pathfinder Armor).

Discussion about this template can be found on the wiki editors' forums:

Infoboxes in general
Weapon page format
"Special" category usage
Personal tools