Template:Gallery/Weapon

From SpiralKnights

Revision as of 04:15, 2 March 2015 by Novaster (Talk | contribs)

Jump to: navigation, search
[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