Template:Weapon: Difference between revisions

From Inkipedia, the Splatoon wiki
m (Removing userspace links)
(making into module invocation)
Tag: Replaced
 
(33 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{#switch:{{#if:{{{game|}}}|{{{game}}}|Splatoon}}
<includeonly>{{#invoke:Weapon|main}}</includeonly><noinclude>
|Splatoon  = S
Template invocation of [[Module:Weapon]].
|Splatoon 2 = S2
|#default  = S
}}_Weapon_{{{1}}}_{{{2}}}{{#ifeq:{{{2}}}|Bomb Rush|_{{#if:{{{sub|}}}|{{{sub}}}|Splat Bomb}}}}.png|{{{3|24px}}}|link={{{2}}}]]{{#ifeq:{{{icononly|}}}|true||
&#32;[[{{{2}}}|{{{2}}}]]
}}</includeonly><noinclude>__NOTOC__
Displays an inline [[Weapon]] icon with a text link.


=== Parameters ===
{{:Module:Weapon/doc}}
{|
|- style="vertical-align: top;"
|<code>category</code>||Unnamed.||The type of weapon. Must be one of the following:
*Main
*Sub
*Special
|- style="vertical-align: top;"
|<code>name</code>||Unnamed.||The English name of the weapon.
|- style="vertical-align: top;"
|<code>size</code>||Unnamed, optional.||A Mediawiki image size parameter for the icon. The default size is 24px.
|- style="vertical-align: top;"
|<code>game</code>||Optional.||The game that the sub weapon belongs to. The default value is "Splatoon". Must be one of the following:
*Splatoon
*Splatoon 2
|- style="vertical-align: top;"
|<code>icononly</code>||Optional.||If present and "true", the text label will be omitted.
|- style="vertical-align: top;"
|<code>sub</code>||Optional.||For [[Bomb Rush]], the corresponding [[Sub Weapon]]. If absent, the Bomb Rush icon uses the [[Splat Bomb]] variant.
|}
 
=== Examples ===
==== Markup ====
<nowiki>{{Weapon|Main|Splattershot}}<br />
{{Weapon|Sub|Splat Bomb}}<br />
{{Weapon|Special|Bomb Rush}}<br />
{{Weapon|Special|Bomb Rush|sub=Seeker}}<br />
{{Weapon|Main|Splattershot|48px}}<br />
{{Weapon|Main|Splattershot|game=Splatoon 2}}<br />
{{Weapon|Main|Splattershot|icononly=true}}</nowiki>
 
==== Output ====
{{Weapon|Main|Splattershot}}<br />
{{Weapon|Sub|Splat Bomb}}<br />
{{Weapon|Special|Bomb Rush}}<br />
{{Weapon|Special|Bomb Rush|sub=Seeker}}<br />
{{Weapon|Main|Splattershot|48px}}<br />
{{Weapon|Main|Splattershot|game=Splatoon 2}}<br />
{{Weapon|Main|Splattershot|icononly=true}}
</noinclude>
</noinclude>

Latest revision as of 22:17, 12 September 2023

Template invocation of Module:Weapon.

Displays an inline weapon icon with a text link.

Usage

{{Weapon|<game>|<category>|<name>|<size>|<icononly>}}

Parameters

Parameter Type Status Description
game Unnamed Required The game that the ability belongs to. Must be one of the following:
  • S for Splatoon
  • S2 for Splatoon 2
  • S3 for Splatoon 3
category Unnamed Required The type of weapon. Must be one of the following:
  • Main
  • Sub
  • Special
name Unnamed Required The English name of the weapon.
  • For Bomb Rush, specify the bomb type after "Bomb Rush", with or without parentheses like Bomb Rush Burst Bomb or Bomb Rush (Burst Bomb).
  • For random weapons in Salmon Run, simply use a question mark: ? for the green random weapon and ?? for the yellow random weapon.
size Unnamed Optional The pixel width for the icon. The default size is 24.
icononly Unnamed Optional If present, the text label will be omitted.
var Named Optional If present, the variant name will be appended to the file name, to choose between different variants of the same weapon's icons.

Examples

Markup

* {{Weapon|S|Special|Bomb Rush}}
* {{Weapon|S|Special|Bomb Rush (Seeker)|48}}
* {{Weapon|S2|Main|Splattershot|icononly}}
* {{Weapon|S2|Main|Splattershot|48|icononly}}
* {{Weapon|S2|Main|?}}
* {{Weapon|S2|Main|??}}
* {{Weapon|S3|Main|?}}
* {{Weapon|S3|Main|??}}
* {{Weapon|S3|Main|Splattershot|icononly}}
* {{Weapon|S3|Main|Splattershot|48|icononly}}
* {{Weapon|S|Sub|Splat Bomb|icononly}}
* {{Weapon|S2|Sub|Splat Bomb|icononly}}
* {{Weapon|S3|Sub|Splat Bomb|icononly}}
* {{Weapon|S|Special|Bomb Rush Splat Bomb|icononly}}
* {{Weapon|S|Special|Killer Wail}} 
* {{Weapon|S3|Main|Hero Shot Replica|var=2D Current|icononly}}

Output