Difference between revisions of "Template:Gallery/Weapon"
From SpiralKnights
m (#ifexist for animations (save point - overworld attack and charge attack)) |
m (#ifexist for second tooltip animation, video disclaimer (awaiting response from staff about external video links still), documentation prep) |
||
Line 1: | Line 1: | ||
− | {| cellspacing ="5" style="border: 1px solid #C0C0C0; width:800px;" | + | <includeonly>{| cellspacing ="5" style="border: 1px solid #C0C0C0; width:800px;" |
<!--=============================== | <!--=============================== | ||
Line 36: | Line 36: | ||
}} | }} | ||
− | |style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{video link|}}} | + | |style="border: 1px solid #C0C0C0; padding:10px; width:200px;" | {{#if:{{{video link|video link}}} |
− | |[{{{video link}}} External Video] | + | |[{{{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:{{{name|{{PAGENAME}}}}}-Combat.png|200px|Click to see more info about this image]] | ||
+ | |[[File:Animation Wanted.png|link=File:{{{name|{{PAGENAME}}}}}-Combat.png]] | ||
+ | }} | ||
}} | }} | ||
<!--=============================== | <!--=============================== | ||
Line 100: | Line 103: | ||
}} | }} | ||
− | |style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | | + | |style="border: 1px solid #C0C0C0; padding:10px; width:150px;" | {{#ifexist:File:{{{panel 2B image|{{PAGENAME}}}}}-Equipped 2.png |
+ | |[[File:{{{panel 2B image|{{PAGENAME}}}}}-Equipped 2.png|150px|Click to see more info about this image]] | ||
+ | |[[File:Animation Wanted.png|link=File:{{{panel 2B image|{{PAGENAME}}}}}-Equipped 2.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;" | [[File:{{{panel 3B image|{{{name|{{PAGENAME}}}}}}}}-Preview.png|150px|Click to see more info about this image]] | ||
Line 146: | Line 152: | ||
}} | }} | ||
− | |}<noinclude>[[Category:Gallery Templates]]</noinclude> | + | |}</includeonly><noinclude> |
+ | {{documentation}} [[Category:Gallery Templates]]</noinclude> |
Revision as of 04:15, 2 March 2015
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. |