Difference between revisions of "Template:Gallery/Weapon"
From SpiralKnights
m (sigh, just not doable until (if) we get a bigger file limit...bombs too big. Many swords too big.) |
|||
(12 intermediate revisions by 2 users not shown) | |||
Line 28: | Line 28: | ||
|[[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 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|}}} |
+ | |{{{panel 2A}}} | ||
+ | |{{#ifexist:File:{{{name|{{PAGENAME}}}}}-Charge Attack.png | ||
|[[File:{{{name|{{PAGENAME}}}}}-Charge Attack.png|350px|Click to see more info about this image]] | |[[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]] | |[[File:Image Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Charge Attack.png]] | ||
+ | }} | ||
}} | }} | ||
<!--=============================== | <!--=============================== | ||
Line 59: | Line 62: | ||
| {{#switch:{{{type|}}} | | {{#switch:{{{type|}}} | ||
− | |#default= {{{panel 1A caption|Basic | + | |#default= {{{panel 1A caption|Basic Attack <br> (Animation - click to see)}}} |
− | | | + | |bomb = |
}} | }} | ||
− | | {{{panel 2A caption|Charge Attack}}} | + | | {{{panel 2A caption|Charge Attack <br> (Animation - click to see)}}} |
|} | |} | ||
<!--=============================== | <!--=============================== | ||
Line 126: | Line 129: | ||
|- align = "center" valign = "middle" | |- align = "center" valign = "middle" | ||
− | |style="border: | + | |style="border: 0px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{news link|}}} |
− | |{{#ifexist:File:{{{news image|}}}.png|Related [[News|news]] art.{{fn|1={{{news link}}} 1}}|This item was | + | |{{#ifexist:File:{{{news image|}}}.png|Related [[News|news]] art.{{fn|1={{{news link}}} 1}}|This item was advocated [{{{news link}}} here].}} |
|No official announcement for this item. | |No official announcement for this item. | ||
}} | }} |
Latest revision as of 08:25, 3 June 2016
Contents
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 = }}
Basic Attack (Animation - click to see) |
Charge Attack (Animation - click to see) |
No news art for this item. | ||
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
Basic Attack (Animation - click to see) |
Charge Attack (Animation - click to see) |
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.
The above documentation is transcluded from Template:Gallery/Weapon/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |