• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Manual import of wikia's version + documentation. Only 3 edits. Grayscale broken or missing CSS
<includeonly>{{{{{subst|safesubst:}}}#invoke:ShipInfo|BattleCard}}</includeonly><noinclude>This template displays the battle card image for the requested ship.

==Examples==
<pre>
{{ShipBattleCardKai|Aircraft Carrier Princess}}
{{ShipBattleCardKai|Standard Carrier Wo-Class/Flagship II|flagship=true}}
{{ShipBattleCardKai|Akitsushima/|grayscale=true|layers=status_sunk}}
{{ShipBattleCardKai|Shigure/Kai Ni|layers=ring ring_glow}}
{{ShipBattleCardKai|name=Ooyodo|model=Kai}}
{{ShipBattleCardKai|Taihou/Kai|damaged=true|layers=smudge_medium status_medium_damage}}
{{ShipBattleCardKai|Taihou/Kai|hd=true}}
{{ShipBattleCardKai|Taihou/Kai|damaged=true|hd=true}}
</pre>

becomes

{{ShipBattleCardKai|Aircraft Carrier Princess}}
{{ShipBattleCardKai|Standard Carrier Wo-Class/Flagship II|flagship=true}}
{{ShipBattleCardKai|Akitsushima/|grayscale=true|layers=status_sunk}}
{{ShipBattleCardKai|Shigure/Kai Ni|layers=ring ring_glow}}
{{ShipBattleCardKai|name=Ooyodo|model=Kai}}
{{ShipBattleCardKai|Taihou/Kai|damaged=true|layers=smudge_medium status_medium_damage}}
{{ShipBattleCardKai|Taihou/Kai|hd=true}}
{{ShipBattleCardKai|Taihou/Kai|damaged=true|hd=true}}

==Parameters==
The following are the parameters that can be passed.

===[1]===
The ''key'' of the ship, which consists of: The name of the ship, followed by a slash (/), optionally followed by the suffix of the ship.

This method is included as a shortcut and for convenience. ''name'' and ''model'' will take precedence over this.

===name===
The name of the ship, without any suffixes.

===model===
The model of the ship, ie. the suffix. For example, Kai or Kai Ni.

To specify the base model you can omit model or leave model empty.

===flagship===
Set to <code>true</code> to display the flagship icon in the top right of the battle card.

===damaged===
Boolean. Set to <code>true</code> to show the damaged card. Defaults to <code>false</code>.

===layers===
A list of strings separated by spaces. Adds the specified layers on top of the card.

Available layers are:
* <code>status_light_damage</code>
* <code>status_medium_damage</code>
* <code>status_heavy_damage</code>
* <code>status_sunk</code>
* <code>status_repair</code>
* <code>status_expedition</code>
* <code>status_light_damage_installation</code>
* <code>status_medium_damage_installation</code>
* <code>status_heavy_damage_installation</code>
* <code>status_sunk_installation</code>
* <code>smudge_light</code>
* <code>smudge_medium</code>
* <code>smudge_heavy</code>
* <code>flagship</code>
** This does the same thing as setting the flagship parameter to true.
* <code>ring</code>
* <code>ring_glow</code>

===link===
String. If set, the image (and any layer images) becomes a link to the parameter's value. Set to <code>nil</code> to have images to link to themselves (like plain wikitext images). Set to <code>false</code> to force images to be unlinked.

===caption===
String. If set, hovering over the image will show the parameter's value as a tooltip. Will default to the ship's full name (base name with suffix).

===size===
String. If set, the card is resized to the specified size. The format of the string is the same as for normal wikitext images. <code>160x40px</code> by default (pre-HTML5 size).

===hd===
Boolean. Set to <code>true</code> to use HD (HTML5) card size (HD assets are always used, downscaled to pre-HTML5 size when this parameter is not set). Same as setting <code>[[#size|size]]</code> to <code>240x60px</code>.

===grayscale===
Boolean. Set to <code>true</code> to grayscale the image. Only works in browsers that support the CSS grayscale filter, unprefixed or with <code>-webkit</code> prefix (no IE).

===mode===
String. Changes the mode of the template. The default mode returns a fully formatted image.

Set to <code>source</code> to return the image's filename. All image formatting parameters are ignored in this mode. This mode is intended for use in conjunction with the <code>gallery</code> tag called via the <code>#tag</code> parser function.

==Tests==
===Parameters===
{|
!Code!!SD!!HD
|-
![1]
|{{ShipBattleCardKai|Taihou/Kai}}
|{{ShipBattleCardKai|Taihou/Kai|hd=true}}
|-
!name, model
|{{ShipBattleCardKai|name=Taihou|model=Kai}}
|{{ShipBattleCardKai|name=Taihou|model=Kai|hd=true}}
|-
!damaged
|{{ShipBattleCardKai|Taihou/Kai|damaged=true}}
|{{ShipBattleCardKai|Taihou/Kai|damaged=true|hd=true}}
|-
!link, caption
|{{ShipBattleCardKai|Taihou/Kai|link=BBV|caption=Taihou Kai (BBV)}}
|{{ShipBattleCardKai|Taihou/Kai|link=BBV|caption=Taihou Kai (BBV)|hd=true}}
|-
!grayscale
|{{ShipBattleCardKai|Taihou/Kai|grayscale=true}}
|{{ShipBattleCardKai|Taihou/Kai|grayscale=true|hd=true}}
|}
===Layers===
{{#invoke:ShipBattleCardKai|formatLayerTestTable}}
===Scale===
{|
|{{ShipBattleCardKai|Taihou/Kai|layers=status_expedition|size=100x0px}}
|{{ShipBattleCardKai|Taihou/Kai|layers=status_expedition|size=200x0px}}
|{{ShipBattleCardKai|Taihou/Kai|layers=status_expedition|size=300x0px}}
|-
|{{ShipBattleCardKai|Taihou/Kai|flagship=true|size=100x0px}}
|{{ShipBattleCardKai|Taihou/Kai|flagship=true|size=200x0px}}
|{{ShipBattleCardKai|Taihou/Kai|flagship=true|size=300x0px}}
|}

[[Category:Templates that use ship data modules|{{PAGENAME}}]]
</noinclude>
advmod, cssedit, Interface administrators, janitor, Moderators, prechecked, Widget editors
7,361

edits

Navigation menu