Difference between revisions of "Template:Gallery/Weapon"

From SpiralKnights

Jump to: navigation, search
m (better naming convention, since this is all new, let's do it from the start)
 
(34 intermediate revisions by 2 users not shown)
Line 25: Line 25:
 
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#switch:{{{type|}}}
 
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#switch:{{{type|}}}
 
|#default = {{#ifexist:File:{{{name|{{PAGENAME}}}}}-Attack.png
 
|#default = {{#ifexist:File:{{{name|{{PAGENAME}}}}}-Attack.png
|[[File:{{{name|{{PAGENAME}}}}}-Attack.png|200px|Click to see more info about this image]]
+
|[[File:{{{name|{{PAGENAME}}}}}-Attack.png|350px|Click to see more info about this image]]
 
|[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Attack.png]]
 
|[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Attack.png]]
 
}}
 
}}
|Bomb     = Bombs do not have basic attacks, <br> only charge attacks.
+
|bomb     = Bombs do not have a basic attack, <br> only a charge attack.
 
}}
 
}}
  
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#ifexist:File:{{{name|{{PAGENAME}}}}}-Charge Attack.png
+
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{panel 2A|}}}
|[[File:{{{name|{{PAGENAME}}}}}-Charge Attack.png|200px|Click to see more info about this image]]
+
|{{{panel 2A}}}
|[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Charge Attack.png]]
+
|{{#ifexist:File:{{{name|{{PAGENAME}}}}}-Charge Attack.png
}}
+
|[[File:{{{name|{{PAGENAME}}}}}-Charge Attack.png|350px|Click to see more info about this image]]
 
+
|[[File:Image Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Charge Attack.png]]
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{video link|video link}}}
+
|[{{{video link}}} External Video] <br> (parts of video might be inaccurate)
+
|{{#ifexist:File:{{{name|{{PAGENAME}}}}}-Combat.png
+
|[[File:{{{name|{{PAGENAME}}}}}-Combat.png|200px|Click to see more info about this image]]
+
|[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Combat.png]]
+
 
}}
 
}}
 
}}
 
}}
Line 67: Line 62:
  
 
| {{#switch:{{{type|}}}
 
| {{#switch:{{{type|}}}
|#default= {{{panel 1A caption|Basic Attack and Attack Combos <br> (Animation - click to see)}}}
+
|#default= {{{panel 1A caption|Basic Attack <br> (Animation - click to see)}}}
|Bomb =
+
|bomb =
 
}}
 
}}
  
 
| {{{panel 2A caption|Charge Attack <br> (Animation - click to see)}}}
 
| {{{panel 2A caption|Charge Attack <br> (Animation - click to see)}}}
 
+
|}
| {{{panel 3A caption|Demonstration of this weapon in combat.}}}
+
 
<!--===============================
 
<!--===============================
  
Line 95: Line 89:
  
 
===============================-->
 
===============================-->
 +
{| cellspacing ="5" style="border: 1px solid #C0C0C0; width:800px;"
 
|- align = "center" valign = "middle"
 
|- align = "center" valign = "middle"
  
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#switch:{{{news|}}}
+
|style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{news image|}}}
|#default=[[File:{{{news|}}}.png|200px|Click to see more info about this image]]
+
|[[File:{{{news image|}}}.png|200px|Click to see more info about this image]]
|no news image = No [[News]] art for this weapon.
+
|No [[News|news]] art for this item.
|no news = No [[News]] art for this weapon.
+
 
}}
 
}}
  
|style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | {{#ifexist:File:{{{panel 2B image|{{PAGENAME}}}}}-Equipped 2.png
+
|style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | {{#ifexist:File:{{{name|{{PAGENAME}}}}}-tooltip animation.png
|[[File:{{{panel 2B image|{{PAGENAME}}}}}-tooltip rotation.png|150px|Click to see more info about this image]]
+
|[[File:{{{name|{{PAGENAME}}}}}-tooltip animation.png|150px|Click to see more info about this image]]
|[[File:Animation Wanted.png|link=File:{{{panel 2B image|{{PAGENAME}}}}}-tooltip rotation.png]]
+
|[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-tooltip animation.png]]
 
}}
 
}}
  
|style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | [[File:{{{panel 3B image|{{{name|{{PAGENAME}}}}}}}}-Preview.png|150px|Click to see more info about this image]]
+
|style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | {{#ifexist:File:{{{panel 3B image|{{{name|{{PAGENAME}}}}}}}}-Preview.png
 +
|[[File:{{{panel 3B image|{{{name|{{PAGENAME}}}}}}}}-Preview.png|150px|Click to see more info about this image]]
 +
|[[File:Image Wanted.png|link=File:{{{panel 3B image|{{{name|{{PAGENAME}}}}}}}}-Preview.png]]
 +
}}
 
<!--===============================
 
<!--===============================
  
Line 132: Line 129:
 
|- align = "center" valign = "middle"
 
|- align = "center" valign = "middle"
  
| {{#switch:{{{news|}}}
+
|style="border: 0px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{news link|}}}
|#default = Related [[news]] art, announced [{{{news link}}} here].
+
|{{#ifexist:File:{{{news image|}}}.png|Related [[News|news]] art.{{fn|1={{{news link}}} 1}}|This item was advocated [{{{news link}}} here].}}
|no news image = No [[news]] art featuring this item, <br> but it was announced [{{{news link}}} here].
+
|No official announcement for this item.
|no news  = This item was not directly announced.
+
 
}}
 
}}
  

Latest revision as of 08:25, 3 June 2016

[edit] [purge] Template documentation

Usage

To display a weapon in all its glory in an informative way. This gallery has slots for regular attacks, charge attacks, news, and aesthetics. It can be used for all known weapons.

It currently mimics the appearance of the <gallery> family of code, using the template systems in this wiki instead to ensure consistent file naming.

Code

{{Gallery/Weapon
|name       = 
|type       = 
|news image =
|news link  =
}}

Paramaters

Required

  • name
Make sure you get the name correctly. Using {{PAGENAME}} is an excellent option, but be careful using the pagename trick - it "works" almost everywhere, except when there's disambiguation issues and in a few other circumstances.
  • type
Must be either (always lowercase):
bomb
handgun
sword

Optional

These are optional, but it really is best for them to be filled whenever possible for wiki enrichment. It also encourages users to pay attention to admin posts and to know where to look for "official" release information. Interlinking!

  • news image
the filename of the news image. Please use the large version of the image whenever possible. Many images on the news page have "big" versions, though some of these have been uploaded by staff in an official manner. If this is the case, use the official file instead of "SpiralKnights News #-big" and so on.
Filetype is .png. "File" is included in template code.
Defaults to generic "this doesn't exist" statement that can be adjusted in the template code as needed.
Uses "if" coding.
  • news link
the external link (NOT internal wiki link) announcing the item. Please use the admin forums whenever possible - if there was no admin post, SEGA, a non-changing Steam link, twitter, etc. are apporpriate IF they are in an official capacity (from game employees).
Defaults to generic "this doesn't exist" statement that can be adjusted in the template code as needed.
Uses "if" coding.

Images

Please upload images in a consistent manner. This template forces consistent file naming, but it does not force consistent visual perspectives and quality. Compare the file you wish to upload with existing images in implemented galleries on individual pages. Your file should, as always, be the best quality you can manage and show the item in the most useful way(s) possible. See the style guide for more information about image files.

Examples

Void

This template uses images to "call" editor attention, as well as provide relative template size consistency on pages. These "wanted" images allow editors to find "things to do" more easily.

{{Gallery/Weapon
|name       = 
|type       = 
}}
Animation Wanted.png Image Wanted.png
Basic Attack
(Animation - click to see)
Charge Attack
(Animation - click to see)
No news art for this item. Animation Wanted.png Image Wanted.png
No official announcement for this item. Another tooltip view.
(Animation - click to see)
An inspect window view.

Ideal

{{Gallery/Weapon
|name       = Obsidian Edge
|type       = Sword
|news image = Social Apocrea
|news link  = http://forums.spiralknights.com/en/node/91276
}}
Produces
Click to see more info about this image Click to see more info about this image
Basic Attack
(Animation - click to see)
Charge Attack
(Animation - click to see)
Click to see more info about this image Click to see more info about this image Click to see more info about this image
Related news art.1 Another tooltip view.
(Animation - click to see)
An inspect window view.

Notes

This template is a sibling to other similar gallery templates.

There are lots of switches and if conditions in this template. If you edit the template code, make sure nothing breaks - this template is very fragile compared to other templates.

This should be flexible enough to be used for any weapon, including new ones in the future - just add more options in the type switch in the coding. For example, bombs don't have an attack animation, so the "type=bomb" automatically takes care of that in the template without hassle on the input level.

Personal tools