Difference between revisions of "Template:Transient icon"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(22 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  [[{{{subobject}}}]]
  [[{{{subobject}}}]]
|
|
  [[Has game context::Companion]]
  [[Has game context::Transient]]
  [[Has lowercase English name::{{lc:{{{1|}}}}}]]
  {{#if:{{{1|}}}|[[Has lowercase English name::{{Name corrector|{{lc:{{{1|}}}}}}}]]}}
{{#if:{{{id|}}}|[[Has ID::{{{id|}}}]]}}
  {{#if:{{{rarity|}}}|[[Has rarity::{{{rarity}}}]]}}
  {{#if:{{{rarity|}}}|[[Has rarity::{{{rarity}}}]]}}
  {{#if:{{{variant|}}}|[[Has variant::{{{variant}}}]]}}
  {{#if:{{{variant|}}}|[[Has variant::{{{variant}}}]]}}
  {{#if:{{{energy|}}}|[[Has energy::{{{energy}}}]]}}
  {{#if:{{{energy|}}}|[[Has energy::{{{energy}}}]]}}
}}
}}
|?=Companion icon subobject
|?=Transient icon subobject
|?Has English name
|?Has English name
|?Has icon
|?Has icon
Line 16: Line 17:
|?Has weapon type
|?Has weapon type
|?Has variant
|?Has variant
|?Has ID
|?Has filename
|format=template
|format=template
|template=Companion icon result format
|template=Transient icon result format
|userparam=frame=y,size={{#switch:{{lc:{{{size|small}}}}}|
|userparam=frame=y,size={{#switch:{{lc:{{{size|small}}}}}|
| medium = medium
| medium = medium
Line 23: Line 26:
| small
| small
|#default = small
|#default = small
}},link={{{link|}}},show name={{#switch:{{lc:{{{show name|n}}}}}|
}},link={{{link|}}},show name={{#switch:{{lc:{{{show name|?}}}}}|
| n
|#default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}}
| y = y
| y = y
}}
| n = n
| #default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}}
}},skin={{#if:{{{skin|{{{face|}}}}}}|{{{face|}}} {{{skin|}}};}}
|limit=1
|limit=1
|sort=Has rarity
|sort=Has rarity
Line 35: Line 38:
|named args=yes
|named args=yes
|default={{#switch: {{{size|}}}
|default={{#switch: {{{size|}}}
| medium = <span style="position:relative; display: inline-block; width:58px; height:58px; vertical-align: middle;"><span style="position:absolute; left: 4px; top: 4px;">[[File:Unknown icon.png|50x50px|link={{{link|}}}]]</span><span style="position:absolute; width:58px; height:58px;">[[File:Icon frame rarity 0.png|58x58px|link={{{link|}}}]]</span><span style="position:absolute; top: 0px; left: 3px;">[[File:None element icon.png|14x14px|link={{{link|}}}]]</span><span style="position:absolute; top: 0px; left: 3px;">[[File:None weapon icon.png|14x14px|link={{{link|}}}]]</span></span>
| medium = <span class="transient-icon-medium"><span class="transient-icon-char">[[File:Unknown icon.png|50x50px|link={{{link|}}}]]</span><span class="transient-icon-rarity">[[File:Icon frame rarity 0.png|58x58px|link={{{link|}}}]]</span><span class="transient-icon-energy">[[File:None element icon.png|14x14px|link={{{link|}}}]]</span><span class="transient-icon-weapon">[[File:None weapon icon.png|14x14px|link={{{link|}}}]]</span></span>
| large = <span style="position:relative; display: inline-block; width:116px; height:116px; vertical-align: middle;"><span style="position:absolute; left: 8px; top: 8px;">[[File:Unknown icon.png|link={{{link|}}}]]</span><span style="position:absolute; width:116px; height:116px;">[[File:Icon frame rarity 0.png|116x116px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None element icon.png|29x29px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None weapon icon.png|29x29px|link={{{link|}}}]]</span></span>
| large = <span class="transient-icon-large"><span class="transient-icon-char">[[File:Unknown icon.png|link={{{link|}}}]]</span><span class="transient-icon-rarity">[[File:Icon frame rarity 0.png|116x116px|link={{{link|}}}]]</span><span class="transient-icon-energy">[[File:None element icon.png|29x29px|link={{{link|}}}]]</span><span class="transient-icon-weapon">[[File:None weapon icon.png|29x29px|link={{{link|}}}]]</span></span>
| small
| small
|#default = <span style="position: relative; display: inline-block; width: 20px; height: 20px; vertical-align: middle;"><span style="position: absolute;">[[File:None element icon.png|20x20px|link={{{link|}}}]]</span><span style="position:absolute; top: 0px; left: 0px;">[[File:None weapon icon.png|20x20px|link={{{link|}}}]]</span></span>[[File:Unknown icon.png|20x20px|link={{{link|}}}]]{{#if:{{{link|}}}|[[{{{link}}}|{{{1|Unknown}}}]]|{{{1|Unknown}}}}}
|#default = <span class="transient-icon-small"><span class="transient-icon-energy">[[File:None element icon.png|20x20px|link={{{link|}}}]]</span><span class="transient-icon-weapon">[[File:None weapon icon.png|20x20px|link={{{link|}}}]]</span></span>[[File:Unknown icon.png|20x20px|link={{{link|}}}]]{{#if:{{{link|}}}|[[{{{link}}}|{{Name corrector|{{{1|Unknown}}}}}]]|{{Name corrector|{{{1|Unknown}}}}}}}
}}<!-- end switch -->
}}<!-- end switch -->
}}<!-- end ask (with frame) -->
}}<!-- end ask (with frame) -->
Line 45: Line 48:
  [[{{{subobject}}}]]
  [[{{{subobject}}}]]
|
|
  [[Has game context::Companion]]
  [[Has game context::Transient]]
  [[Has lowercase English name::{{lc:{{{1|}}}}}]]
  {{#if:{{{1|}}}|[[Has lowercase English name::{{Name corrector|{{lc:{{{1|}}}}}}}]]}}
{{#if:{{{id|}}}|[[Has ID::{{{id|}}}]]}}
  {{#if:{{{rarity|}}}|[[Has rarity::{{{rarity}}}]]}}
  {{#if:{{{rarity|}}}|[[Has rarity::{{{rarity}}}]]}}
  {{#if:{{{variant|}}}|[[Has variant::{{{variant}}}]]}}
  {{#if:{{{variant|}}}|[[Has variant::{{{variant}}}]]}}
  {{#if:{{{energy|}}}|[[Has energy::{{{energy}}}]]}}
  {{#if:{{{energy|}}}|[[Has energy::{{{energy}}}]]}}
}}
}}
|?=Companion icon subobject
|?=Transient icon subobject
|?Has English name
|?Has English name
|?Has icon
|?Has icon
|?Has variant
|?Has variant
|?Has ID
|?Has filename
|format=template
|format=template
|template=Companion icon result format
|template=Transient icon result format
|userparam=frame=n,size={{#switch:{{lc:{{{size|small}}}}}|
|userparam=frame=n,size={{#switch:{{lc:{{{size|small}}}}}|
| medium = medium
| medium = medium
Line 62: Line 68:
| small
| small
|#default = small
|#default = small
}},link={{{link|}}},show name={{#switch:{{lc:{{{show name|n}}}}}|
}},link={{{link|}}},show name={{#switch:{{lc:{{{show name|?}}}}}|
| n
|#default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}}
| y = y
| y = y
}}
| n = n
| #default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}}
}},skin={{#if:{{{skin|{{{face|}}}}}}|{{{face|}}} {{{skin|}}};}}
|limit=1
|limit=1
|sort=Has rarity
|sort=Has rarity
Line 77: Line 83:
| large = [[File:Unknown icon.png|link={{{link|}}}]]
| large = [[File:Unknown icon.png|link={{{link|}}}]]
| small
| small
|#default = [[File:Unknown icon.png|20x20px|link={{{link|}}}]]{{#if:{{{link|}}}|[[{{{link}}}|{{{1|Unknown}}}]]|[[{{{1|Unknown}}}|{{{1|Unknown}}}]]}}{{#if:{{{link|}}}||[[Category:List of invalid Companion icon template calls]]}}
|#default=[[File:Unknown icon.png|20x20px|link={{{link|}}}]]{{#if:{{{link|}}}|[[{{{link}}}|{{Name corrector|{{{1|Unknown}}}}}]]|[[{{Name corrector|{{{1}}}}}|{{Name corrector|{{{1|Unknown}}}}}]]}}{{#if:{{{link|}}}||[[Category:List of invalid Transient icon template calls]]}}
}}<!-- end switch -->
}}<!-- end switch -->
}}<!-- end ask (no frame) -->
}}<!-- end ask (no frame) -->
}}
}}</includeonly><noinclude>
</includeonly><noinclude>
== Description ==
== Description ==


This template displays a link to a companion together with its icon. If multiple companions would fit the search criteria, only the one with the lowest rarity of the standard variant is displayed.
This template displays a link to a transient together with its icon. If multiple transients would fit the search criteria, only the one with the lowest rarity of the standard variant is displayed.


== Usage ==
== Usage ==
<pre>{{Companion icon
<pre>{{Transient icon
|<en companion name>
|<en transient name>
| rarity =  
| rarity =  
| variant =  
| variant =  
Line 99: Line 104:
=== Parameters ===
=== Parameters ===


; en companion name : Required. Name of the companion
; en transient name : Required. Name of the transient
; rarity : Filter result by the rarity of the companion.
; rarity : Filter result by the rarity of the transient.
; energy : Filter result by the energy of the companion.
; energy : Filter result by the energy of the transient.
; variant : Filter result by the variant of the companion.
; variant : Filter result by the variant of the transient.
; frame : Set to ''y'' to also display a frame with rarity, energy and weapon type of the companion, ''n'' to only display the icon. Defaults to ''n''.
; frame : Set to ''y'' to also display a frame with rarity, energy and weapon type of the transient, ''n'' to only display the icon. Defaults to ''n''.
; size : Set to ''small'', ''medium'' or ''large'' to change the size of the icon. When set to ''small'', also displays the companion's English name. Defaults to ''small''.
; size : Set to ''small'', ''medium'' or ''large'' to change the size of the icon. When set to ''small'', also displays the transient's English name. Defaults to ''small''.
; link : Page that the icon should link to. Defaults to the page of the companion.
; link : Page that the icon should link to. Defaults to the page of the transient.
; show name : Set to ''y'' to show the name, ''n'' to hide. Defaults to ''y'' if '''size''' is set to ''small'', ''n'' otherwise.
; show name : Set to ''y'' to show the name, ''n'' to hide. Defaults to ''y'' if '''size''' is set to ''small'', ''n'' otherwise.
; subobject : Subobject of the companion. Can be used by other templates to directly display the correct companion. Do not use this parameter manually.
; subobject : Subobject of the transient. Can be used by other templates to directly display the correct transient. Do not use this parameter manually.


=== Examples ===
=== Examples ===


<pre>{{Companion icon|Moritaka}}</pre>
<pre>{{Transient icon|Moritaka}}</pre>


{{Companion icon|Moritaka}}
{{Transient icon|Moritaka}}


<pre>{{Companion icon|Moritaka|size=large}}</pre>
<pre>{{Transient icon|Moritaka|size=large}}</pre>


{{Companion icon|Moritaka|size=large}}
{{Transient icon|Moritaka|size=large}}


<pre>{{Companion icon|Moritaka|size=medium|frame=y}}</pre>
<pre>{{Transient icon|Moritaka|size=medium|frame=y}}</pre>


{{Companion icon|Moritaka|size=medium|frame=y}}
{{Transient icon|Moritaka|size=medium|frame=y}}


<pre>{{Companion icon|Moritaka|rarity=4}}</pre>
<pre>{{Transient icon|Moritaka|rarity=4}}</pre>


{{Companion icon|Moritaka|rarity=4}}
{{Transient icon|Moritaka|rarity=4}}


<pre>{{Companion icon|Moritaka|variant=Valentine|frame=y}}</pre>
<pre>{{Transient icon|Moritaka|variant=Valentine|frame=y}}</pre>


{{Companion icon|Moritaka|variant=Valentine|frame=y}}
{{Transient icon|Moritaka|variant=Valentine|frame=y}}


[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Latest revision as of 23:19, 20 June 2022

Description

This template displays a link to a transient together with its icon. If multiple transients would fit the search criteria, only the one with the lowest rarity of the standard variant is displayed.

Usage

{{Transient icon
|<en transient name>
| rarity = 
| variant = 
| link = 
| energy = 
| subobject = 
| show name = 
}}

Parameters

en transient name
Required. Name of the transient
rarity
Filter result by the rarity of the transient.
energy
Filter result by the energy of the transient.
variant
Filter result by the variant of the transient.
frame
Set to y to also display a frame with rarity, energy and weapon type of the transient, n to only display the icon. Defaults to n.
size
Set to small, medium or large to change the size of the icon. When set to small, also displays the transient's English name. Defaults to small.
link
Page that the icon should link to. Defaults to the page of the transient.
show name
Set to y to show the name, n to hide. Defaults to y if size is set to small, n otherwise.
subobject
Subobject of the transient. Can be used by other templates to directly display the correct transient. Do not use this parameter manually.

Examples

{{Transient icon|Moritaka}}

Moritaka

{{Transient icon|Moritaka|size=large}}

{{Transient icon|Moritaka|size=medium|frame=y}}

Icon frame rarity 3.pngWater element icon.pngSlash weapon icon.png

{{Transient icon|Moritaka|rarity=4}}

Moritaka

{{Transient icon|Moritaka|variant=Valentine|frame=y}}

Fire element icon.pngSlash weapon icon.png Moritaka (Valentine)