Difference between revisions of "Template:Transient infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(225 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if: <!-- define vars -->
<includeonly><!--
ID provided
-->{{#vardefine:transient id|{{{id|}}}}}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Lookup against existing SMW subobjects
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transient id|{{Transient title to ID|{{{jp title|}}}|mode=smw}} }} }}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Lookup against the Housamo MediaWiki extension (lately ineffective)
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transient id|{{Transient title to ID|{{{jp title|}}}|mode=ext}} }} }}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Proxy through extended template
-->{{#if:{{#var:transient id|}}|{{#vardefine:transient en title|{{{en title|}}}}}{{
#if:{{{en name|}}}|{{#vardefine:transient en name|{{{en name|}}}}}}}{{
#if:{{{charge skill name|}}}|{{#vardefine:transient en jingi|{{{charge skill name|}}}}}}}{{
#if:{{{charge skill description|}}}|{{#vardefine:transient en jingi description|{{{charge skill description|}}}}}}}{{
#if:{{{artwork|}}}|{{#vardefine:transient artwork|{{{artwork|}}}}}}}{{
#if:{{{icon|}}}|{{#vardefine:transient icon|{{{icon|}}}}}}}{{
#if:{{{acquisition|}}}|{{#vardefine:transient acquisition|{{{acquisition|}}}}}}}{{
#if:{{{availability|}}}|{{#vardefine:transient availability|{{{availability|}}}}}}}{{
#if:{{{variant|}}}|{{#vardefine:transient variant|{{{variant|}}}}}}}{{#vardefine:transient jp en research file|{{{en research file||}}}}}{{
#masterdata:Card|{{#var:transient id}}|{{#var:transient template options|<!--{{#if:{{{en research file|}}}||no-research=true}}-->}}
}}{{#vardefine:transient template options|}}|Guru mediation: error mapping Transient title "{{{jp title|}}}" to an ID. To avoid this error in the future, please pass an ID to the infobox template.


{{#vardefine:element|{{#switch:{{lc:{{{element|}}}}}
{{#var:transient id|}}
| 火 | fire = 火
| 水 | water = 水
| 木 | wood | grass | earth | tree = 木
| 天 | heaven | holy | light = 天
| 冥 | dark = 冥
| 魔 | demon = 魔
| 全 | all = 全
|#default = ?
}}
}}
 
{{#vardefine:weapon type|{{#switch:{{lc:{{{weapon type|}}}}}
| 斬撃 | 斬 | slash = 斬撃
| 打撃 | 打 | strike | blunt = 打撃
| 突撃 | 突 | pierce | thrust = 突撃
| 射撃 | 射 | ranged | shoot = 射撃
| 魔法 | 魔 | magic = 魔法
|#default = ?
}}
}}
 
{{#vardefine:availability|{{#switch:{{lc:{{{availability|}}}}}
| limited = Limited
| event = Event
| unavailable = Unavailable
| current
|#default = Current
}}
}}
 
{{#ifeq:{{lc:{{{acquisition|}}}}} | unobtainable | {{#vardefine:availability|Unavailable}}
}}
 
{{#arraydefine:illustrator|{{{illustrator|}}}|;}}
 
{{#vardefine:counter|0}}
{{#arrayprint:illustrator
|
| @@@
| {{#vardefine:illustrator subobj {{#var:counter}}|
    {{#ask:
      [[Has game context::Illustrator]]
      [[Has Japanese name::@@@]]
    |link=none
    |limit=1
    |headers=hide
    |searchlabel=
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#vardefine:counter|0}}
{{#arrayprint:illustrator
|
| @@@
| {{#vardefine:illustrator en name {{#var:counter}}|
    {{#if: {{#var:illustrator subobj {{#var:counter}} }}
    | {{#show: {{#var:illustrator subobj {{#var:counter}} }} |?Has English name }}
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#arraydefine:scenario writer|{{{scenario writer|}}}|;}}
 
{{#vardefine:counter|0}}
{{#arrayprint:scenario writer
|
| @@@
| {{#vardefine:scenario writer subobj {{#var:counter}}|
    {{#ask:
      [[Has game context::Scenario writer]]
      [[Has Japanese name::@@@]]
    |link=none
    |limit=1
    |headers=hide
    |searchlabel=
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#vardefine:counter|0}}
{{#arrayprint:scenario writer
|
| @@@
| {{#vardefine:scenario writer en name {{#var:counter}}|
    {{#if: {{#var:scenario writer subobj {{#var:counter}} }}
    | {{#show: {{#var:scenario writer subobj {{#var:counter}} }} |?Has English name }}
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#arraydefine:voice actor|{{{voice actor|}}}|;}}
 
{{#vardefine:counter|0}}
{{#arrayprint:voice actor
|
| @@@
| {{#vardefine:voice actor subobj {{#var:counter}}|
    {{#ask:
      [[Has game context::Voice actor]]
      [[Has Japanese name::@@@]]
    |link=none
    |limit=1
    |headers=hide
    |searchlabel=
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#vardefine:counter|0}}
{{#arrayprint:voice actor
|
| @@@
| {{#vardefine:voice actor en name {{#var:counter}}|
    {{#if: {{#var:voice actor subobj {{#var:counter}} }}
    | {{#show: {{#var:voice actor subobj {{#var:counter}} }} |?Has English name }}
    }}
  }}
  {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
}}
 
{{#vardefine:base skill 1 subobj|
{{#if: {{{base skill 1|}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::{{{base skill 1}}}]]
  |link=none
  |limit=1
  |headers=hide
  |searchlabel=
  }}
}}
}}
 
{{#vardefine:base skill 1 en name|
{{#if: {{#var:base skill 1 subobj|}}
|{{#show: {{#var:base skill 1 subobj}} |?Has English name }}
}}
}}
 
{{#vardefine:base skill 1 desc|
{{#if: {{#var:base skill 1 subobj|}}
|{{#show: {{#var:base skill 1 subobj}} |?Has preformatted English description }}
}}
}}
 
<!-- escape semi-colons to not run into issues when setting it as a value in the record property -->
{{#vardefine:base skill 1 raw desc|
{{#if: {{#var:base skill 1 subobj|}}
|{{#replace:{{#show: {{#var:base skill 1 subobj}} |?Has raw English description }}|;|\;}}
}}
}}
 
{{#vardefine:base skill 2 subobj|
{{#if: {{{base skill 2|}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::{{{base skill 2}}}]]
  |link=none
  |limit=1
  |headers=hide
  |searchlabel=
  }}
}}
}}
 
{{#vardefine:base skill 2 en name|
{{#if: {{#var:base skill 2 subobj|}}
|{{#show: {{#var:base skill 2 subobj}} |?Has English name }}
}}
}}
 
{{#vardefine:base skill 2 desc|
{{#if: {{#var:base skill 2 subobj|}}
|{{#show: {{#var:base skill 2 subobj}} |?Has preformatted English description }}
}}
}}
 
{{#vardefine:base skill 2 raw desc|
{{#if: {{#var:base skill 2 subobj|}}
|{{#replace:{{#show: {{#var:base skill 2 subobj}} |?Has raw English description }}|;|\;}}
}}
}}
 
{{#vardefine:base skill 3 subobj|
{{#if: {{{base skill 3|}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::{{{base skill 3}}}]]
  |link=none
  |limit=1
  |headers=hide
  |searchlabel=
  }}
}}
}}
 
{{#vardefine:base skill 3 en name|
{{#if: {{#var:base skill 3 subobj|}}
|{{#show: {{#var:base skill 3 subobj}} |?Has English name }}
}}
}}
 
{{#vardefine:base skill 3 desc|
{{#if: {{#var:base skill 3 subobj|}}
|{{#show: {{#var:base skill 3 subobj}} |?Has preformatted English description }}
}}
}}
 
{{#vardefine:base skill 3 raw desc|
{{#if: {{#var:base skill 3 subobj|}}
|{{#replace:{{#show: {{#var:base skill 3 subobj}} |?Has raw English description }}|;|\;}}
}}
}}
 
{{#vardefine:base skill 4 subobj|
{{#if: {{{base skill 4|}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::{{{base skill 4|}}}]]
  |link=none
  |limit=1
  |headers=hide
  |searchlabel=
  }}
}}
}}
 
{{#vardefine:base skill 4 en name|
{{#if: {{#var:base skill 4 subobj|}}
|{{#show: {{#var:base skill 4 subobj}} |?Has English name }}
}}
}}
 
{{#vardefine:base skill 4 desc|
{{#if: {{#var:base skill 4 subobj|}}
|{{#show: {{#var:base skill 4 subobj}} |?Has preformatted English description }}
}}
}}
 
{{#vardefine:base skill 4 raw desc|
{{#if: {{#var:base skill 4 subobj|}}
|{{#replace:{{#show: {{#var:base skill 4 subobj}} |?Has raw English description }}|;|\;}}
}}
}}
 
}}<!--create vars end-->{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> | <!--
 
For Has base skill as well as Has illustrator, Has scenario writer and Has voice actor, the subobject is set to "-" if no subobject is available to return a result in queries in order to properly match names to subobjects in Template:Companion list table result format. Otherwise, name, description, unlocked limit break and subobject (for skills) and name and subobject (for voice actor, scenario writer and illustrator) may be mismatched.
 
-->{{#subobject:companion{{#vardefineecho:companionnumber|{{#expr:{{#var:companionnumber|-1}}+1}}}}
| Has game context =Companion
| Has Japanese name ={{{jp name|?}}}
| Has English name ={{{en name|?}}}
| Has lowercase English name ={{lc:{{{en name|?}}}}}
| Has Japanese title ={{{jp title|}}}
| Has English title ={{{en title|}}}
| Has artwork ={{#if:{{{artwork|}}}|File:{{{artwork}}}.png}}
| Has icon ={{#ifexist:File:{{{icon|}}}.png|File:{{{icon}}}.png|File:Unknown icon.png}}
| Has skin artwork ={{#if:{{{skin artwork|}}}|File:{{{skin artwork}}}.png}}
| Has rarity ={{{rarity|0}}}
| Has card cost ={{{cost|0}}}
| Has variant ={{{variant|Standard}}}
| Has availability ={{#var:availability}}
| Has element ={{#ifeq:{{#var:element}}|?||{{#var:element}}}}
| Has weapon type ={{#ifeq:{{#var:weapon type}}|?||{{#var:weapon type}}}}
| Has hp value = {{{hp|0}}}
| Has hp growth value = {{{hp growth|0}}}
| Has atk value = {{{atk|0}}}
| Has atk growth value = {{{atk growth|0}}}
| Has base skill ={{#if:{{{base skill 1|}}}|{{#var:base skill 1 subobj|-}};0;{{{base skill 1}}};{{#var:base skill 1 en name|{{{base skill 1}}}}};{{#var:base skill 1 desc|[?] ? / ?%}};{{#var:base skill 1 raw desc|[?] ? / ?%}}}}
| Has base skill ={{#if:{{{base skill 2|}}}|{{#var:base skill 2 subobj|-}};1;{{{base skill 2}}};{{#var:base skill 2 en name|{{{base skill 2}}}}};{{#var:base skill 2 desc|[?] ? / ?%}};{{#var:base skill 2 raw desc|[?] ? / ?%}}}}
| Has base skill ={{#if:{{{base skill 3|}}}|{{#var:base skill 3 subobj|-}};2;{{{base skill 3}}};{{#var:base skill 3 en name|{{{base skill 3}}}}};{{#var:base skill 3 desc|[?] ? / ?%}};{{#var:base skill 3 raw desc|[?] ? / ?%}}}}
| Has base skill ={{#if:{{{base skill 4|}}}|{{#var:base skill 4 subobj|-}};3;{{{base skill 4}}};{{#var:base skill 4 en name|{{{base skill 4}}}}};{{#var:base skill 4 desc|[?] ? / ?%}};{{#var:base skill 4 raw desc|[?] ? / ?%}}}}
| Has charge skill ={{{charge skill name|}}};{{{charge skill description|}}};File:{{{charge skill pattern|}}}.png
| Has illustrator ={{#if:{{{illustrator|}}}|
  {{#vardefine:counter|0}}
  {{#arrayprint:illustrator
  | ###
  | @@@
  | {{#var:illustrator subobj {{#var:counter}}|-}};@@@;{{#var:illustrator en name {{#var:counter}}|@@@}}
    {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
  }}
}}|+sep=###
| Has scenario writer ={{#if:{{{scenario writer|}}}|
  {{#vardefine:counter|0}}
  {{#arrayprint:scenario writer
  | ###
  | @@@
  | {{#var:scenario writer subobj {{#var:counter}}|-}};@@@;{{#var:scenario writer en name {{#var:counter}}|@@@}}
    {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
  }}
}}|+sep=###
| Has voice actor ={{#if:{{{voice actor|}}}|
  {{#vardefine:counter|0}}
  {{#arrayprint:voice actor
  | ###
  | @@@
  | {{#var:voice actor subobj {{#var:counter}}|-}};@@@;{{#var:voice actor en name {{#var:counter}}|@@@}}
    {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
  }}
}}|+sep=###
}}
}}<!-- end subobject
-->{{#css:
div.companion-infobox {
    background-color: #f9f9f9;
    padding-bottom: 2px;
    position: relative;
    width: 700px;
    border: 1px solid #aaa;
    border-spacing: 0px;
}
 
div.companion-infobox > .header {
    width: auto;
    margin: 4px 4px 2px 4px;
    padding: 0px;
}
 
div.companion-infobox > .header .icon {
    float: left;
    vertical-align: bottom;
}
 
div.companion-infobox > .header .caption {
    color: #000000;
    font-size: 1.5em;
    text-align: center;
    vertical-align: middle;
    width: 100%;
}
 
div.companion-infobox > .header .caption > .name {
    font-weight: bold;
}
 
div.companion-infobox > .header .caption > .sub {
    font-size: 0.8em;
}
 
div.companion-infobox .body {
    clear: both;
    border-collapse: collapse;
}
 
div.companion-infobox .body tr td {
    margin: 0px; padding: 0px;
}
 
div.companion-infobox .body .artwork {
    margin: 0px 2px 4px 4px;
    width: 300px;
    text-align: center;
}
 
div.companion-infobox .body .artwork img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    width: auto\9;
}
 
div.companion-infobox .body .data {
    width: 388px;
    margin: 0px 2px 2px 2px;
    border-collapse: collapse;
}
 
div.companion-infobox .body .data tr:not(:first-child) th {
    border-top: 2px solid #f9f9f9;
    border-right: 2px solid #f9f9f9;
}
 
div.companion-infobox .body .data  tr  td {
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-left: 2px solid #f9f9f9;
}
 
div.companion-infobox .body .data  tr:not(:first-child)  td {
    border-top: 2px solid #f9f9f9;
}
 
/* fire */
div.fire > .header {
    background-color: #ffbfbf;
}
 
div.fire > .body .data tr > th {
    background-color: #ffd2d0;
}
 
div.fire > .body .data tr > th + th {
    background-color: #ffdddc;
}
 
/* water */
div.water > .header {
    background-color: #bfd9ff;
}
 
div.water > .body .data tr > th {
    background-color: #d0e3ff;
}
 
div.water > .body .data tr > th + th {
    background-color: #dceaff;
}
 
/* wood */
div.wood > .header {
    background-color: #bfffbf;
}
 
div.wood > .body .data tr > th {
    background-color: #dcffdc;
}
 
div.wood > .body .data tr > th + th {
    background-color: #e3ffe3;
}
 
/* light */
div.light > .header,
div.heaven > .header {
    background-color: #ffd4bf;
}
 
div.light > .body .data tr > th,
div.heaven > .body .data tr > th {
    background-color: #ffe0d0;
}
 
div.light > .body .data tr > th + th,
div.heaven > .body .data tr > th + th {
    background-color: #ffe8dc;
}
 
/* dark */
div.dark > .header {
    background-color: #e5ccff;
}
 
div.dark > .body .data tr > th {
    background-color: #e3d3f3;
}
 
div.dark > .body .data tr > th + th {
    background-color: #f0e0ff;
}
 
/* all, demon, none */
div.all > .header,
div.demon > .header,
div.none > .header {
    background-color: #d4d4d4;
}
 
div.all > .body .data tr > th,
div.demon > .body .data tr > th,
div.none > .body .data tr > th {
    background-color: #dcdcdc;
}
 
div.all > .body .data tr > th + th,
div.demon > .body .data tr > th + th,
div.none > .body .data tr > th + th {
    background-color: #e3e3e3;
}
 
}}
<div class="companion-infobox {{#ifeq:{{#var:element}}|?|none|{{lc:{{Element|{{#var:element}}}}}}}}" id="companion{{#var:companionnumber}}">
<div class="header">
  <table>
  <tr>
    <td class="icon">[[File:{{#ifexist:File:{{{icon|}}}.png|{{{icon}}}|Unknown icon}}.png|60px]]</td>
    <td class="caption">
    <div class="name">{{#ifeq: {{#var:availability}} | Unavailable | |[{{#if:{{{en title|}}}|{{{en title}}}|?}}]&nbsp;}}{{{en name|?}}}</div>
    <div class="sub">{{#ifeq: {{#var:availability}} | Unavailable | |&#x3010;{{#if:{{{jp title|}}}|{{{jp title}}}|&#xFF1F;}}&#x3011;}}{{#if:{{{jp name|}}}|{{{jp name}}}|&#xFF1F;}}</div>
    </td>
  </tr>
  </table>
</div>
<table class="body">
  <tr>
  <td><div class="artwork">{{#if:{{{artwork|}}}|[[File:{{{artwork}}}.png]]|No artwork uploaded.}}</div></td>
  <td>
    <table class="data">
    {{#if: {{{variant|}}} | {{#ifeq: {{lc:{{{variant}}}}} | standard | |
    <tr>
      <th>Variant</th>
      <td>{{{variant|Standard}}}</td>
    </tr>
    }}
    }}
    {{#ifeq: {{#var:availability}} | Unavailable | |
    <tr>
      <th>Rarity</th>
      <td>{{{rarity|0}}}</td>
    </tr>
    <tr>
      <th>Cost</th>
      <td>{{{cost|0}}}</td>
    </tr>
    }}
    <tr>
      <th>Acquisition</th>
      <td>{{{acquisition|?}}}</td>
    </tr>
    </table>
    {{#ifeq: {{#var:availability}} | Unavailable | |
    <table class="data">
    <tr>
      <th>HP</th>
      <td>{{{hp|?}}} (+{{{hp growth|?}}} per level)</td>
    </tr>
    <tr>
      <th>ATK</th>
      <td>{{{atk|?}}} (+{{{atk growth|?}}} per level)</td>
    </tr>
    </table>
    }}
    <table class="data">
    <tr>
      <th>Element</th>
      <td>{{Element|{{#var:element}}}}</td>
      <td rowspan="2" style="width:50px; padding: 0px;">[[File:Weapon_Spread_{{Weapon type|{{#var:weapon type}}}}.png|50px]]</td>
    </tr>
    <tr>
      <th>Weapon type</th>
      <td>{{Weapon type|{{#var:weapon type}}}}</td>
    </tr>
    </table>
    {{#ifeq: {{#var:availability}} | Unavailable | |
    <table class="data">
    <tr>
      <th colspan="3">Base skills</th>
    </tr>
    <tr>
      <th>Def.</th>
      <th>{{#if: {{#var:base skill 1 subobj|}} | [[{{#var:base skill 1 subobj|}}|{{#var:base skill 1 en name|{{{base skill 1}}} }}]] | {{#if:{{{base skill 1|}}}|{{{base skill 1}}}|?}} }}</th>
      <td>{{#var:base skill 1 desc| ? }}</td>
    </tr>
    <tr>
      <th>LB1</th>
      <th>{{#if: {{#var:base skill 2 subobj|}} | [[{{#var:base skill 2 subobj|}}|{{#var:base skill 2 en name|{{{base skill 2}}} }}]] | {{#if:{{{base skill 2|}}}|{{{base skill 2}}}|?}} }}</th>
      <td>{{#var:base skill 2 desc| ? }}</td>
    </tr>
    <tr>
      <th>LB2</th>
      <th>{{#if: {{#var:base skill 3 subobj|}} | [[{{#var:base skill 3 subobj|}}|{{#var:base skill 3 en name|{{{base skill 3}}} }}]] | {{#if:{{{base skill 3|}}}|{{{base skill 3}}}|?}} }}</th>
      <td>{{#var:base skill 3 desc| ? }}</td>
    </tr>
    <tr>
      <th>LB3</th>
      <th>{{#if: {{#var:base skill 4 subobj|}} | [[{{#var:base skill 4 subobj|}}|{{#var:base skill 4 en name|{{{base skill 4}}} }}]] | {{#if:{{{base skill 4|}}}|{{{base skill 4}}}|?}} }}</th>
      <td>{{#var:base skill 4 desc| ? }}</td>
    </tr>
    </table>
    <table class="data">
    <tr>
      <th colspan="3">Charge skill</th>
    </tr>
    <tr>
      <th>{{#if:{{{charge skill name|}}}|{{{charge skill name}}}|?}}</th>
      <td>{{#if:{{{charge skill name|}}}|{{{charge skill description}}}|?}}</td>
      <td rowspan="2" style="width:50px; padding: 0px;">[[File:{{#if:{{{charge skill pattern|}}}|{{{charge skill pattern}}}|Weapon_Spread_WEAPON}}.png|50px]]</td>
    </tr>
    </table>
    }}
    <table class="data">
    <tr>
      <th>Illustration</th>
      <td>{{#vardefine:counter|0}}{{#if: {{{illustrator|}}}
  | {{#arrayprint:illustrator
    |,&#32;
    |@@@
    | {{#if: {{#var:illustrator subobj {{#var:counter}}|}}
      | [[{{#var:illustrator subobj {{#var:counter}}}}|{{#var:illustrator en name {{#var:counter}}|@@@ }}]]
      | @@@
      }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
    }}
  | &mdash;&mdash;
  }}</td>
    </tr>
    <tr>
      <th>Scenario</th>
      <td>{{#vardefine:counter|0}}{{#if: {{{scenario writer|}}}
  | {{#arrayprint:scenario writer
    |,&#32;
    |@@@
    | {{#if: {{#var:scenario writer subobj {{#var:counter}}|}}
      | [[{{#var:scenario writer subobj {{#var:counter}}}}|{{#var:scenario writer en name {{#var:counter}}|@@@ }}]]
      | @@@
      }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
    }}
  | &mdash;&mdash;
  }}</td>
    </tr>
    <tr>
      <th>Voice</th>
      <td>{{#vardefine:counter|0}}{{#if: {{{voice actor|}}}
  | {{#arrayprint:voice actor
    |,&#32;
    |@@@
    | {{#if: {{#var:voice actor subobj {{#var:counter}}|}}
      | [[{{#var:voice actor subobj {{#var:counter}}}}|{{#var:voice actor en name {{#var:counter}}|@@@ }}]]
      | @@@
      }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
    }}
  | &mdash;&mdash;
  }}</td>
    </tr>
    </table>
  </td>
  </tr>
</table>
</div><!--
 
    auto categorization
 
-->{{#if: {{#ifeq: {{{categorize|y}}} | n | n }} <!-- categorize is set to don't categorize -->
      {{NAMESPACE}} <!-- don't categorize if outside namespace -->
| <!-- don't categorize -->
|
  <!-- element -->
  {{#ifeq: {{Element|{{{element|}}}}} | ? | [[Category:Companions with unknown element]] |
    [[Category:{{Element|{{{element}}}}} companions]]
  }}
 
  <!-- weapon type -->
  {{#ifeq: {{Weapon type|{{{weapon type|}}}}} | ? | [[Category:Companions with unknown weapon type]] |
    [[Category:{{Weapon type|{{{weapon type}}}}} companions]]
  }}
 
  <!-- availability -->
  {{#ifeq: {{#var:availability}} | Current | |
    [[Category:{{#var:availability}} companions]]
  }}


{{#var:transient tmp subobj|}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
== Description ==
== Description ==
This templates is a proxy for the [[Template:Transient extended infobox]] extended template to avoid manually adding internal ID's to units by matching up titles to units. If you absolutely have to create an infobox for a unit that's not in game, please use:
<pre>
{{#vardefine:transient en name|Gullinbursti}}
{{#vardefine:transient jp name|グリンブルスティ}}
{{#vardefine:transient element|英雄}}
{{#vardefine:transient weapon|打撃}}
{{#vardefine:transient illustrator|WAKU+LW}}
{{#vardefine:transient voice actor|日野聡}}
{{#vardefine:transient availability|}}
{{#vardefine:transient acquisition|}}
{{#vardefine:transient artwork|}}
{{#vardefine:transient icon|}}
{{#masterdata:CardPartial|utageFilename}}
</pre>
Where either you can either specify artwork (filename on wiki) or utageFilename (asset used in-game). An icon is optional but recommended.


This templates creates an infobox for a character.
If a unit is in-game and the ID is unable to be found, you can simply invoke this template by: <pre>
 
{{Transient infobox
== Usage ==
| en title =
<pre>{{Companion infobox
| en name =
| jp name =
| charge skill name =
| en name =
| charge skill description =
| jp title =
| artwork =
| en title =
| icon =
| artwork =
| acquisition =
| icon =
| availability =
| skin artwork =
| variant =
| rarity =
| en research file =
| cost =
| element =
| variant =
| availability =
| acquisition =
| weapon type =
| base skill 1 =
| base skill 2 =
| base skill 3 =
| base skill 4 =
| charge skill name =
| charge skill description =
| charge skill pattern =
| illustrator =
| scenario writer =
| voice actor =
}}</pre>
 
=== Parameters ===
 
; jp name : Japanese name of the companion.
; en name : English name of the companion.
; jp title : Japanese title.
; en title : Translated English title.
; artwork : Filename of the artwork on the wiki. Automatically adds <code>.png</code> as the file extension.
; icon : Filename of the icon on the wiki. Automatically adds <code>.png</code> as the file extension.
; skin artwork : Filename of the skin artwork on the wiki. Automatically adds <code>.png</code> as the file extension.
; rarity : Rarity of the companion.
; cost : Team cost of the companion.
; element : Japanese element of the companion. See [[Property:Has element]] for a list of allowed values.
; variant : Variant of the companion. Defaults to ''Standard''.
; availability : Availability of the companion. See [[Property:Has availability]] for a list of allowed values. If set to ''Unavailable'', many parameters will automatically be omitted.
; acquisition : Method of acquisition of the companion.
; weapon type : Japanese weapon type of the companion. See [[Property:Has weapon type]] for a list of allowed values.
; base skill 1 : Japanese skill name of the default base skill.
; base skill 2 : Japanese skill name of the base skill learnt after the first limit break.
; base skill 3 : Japanese skill name of the base skill learnt after the second limit break.
; base skill 4 : Japanese skill name of the base skill learnt after the third limit break.
; charge skill name : English name of the charge skill.
; charge skill description : English description of the charge skill.
; charge skill pattern : Filename of the charge skill's attack pattern on the wiki. Automatically adds <code>.png</code> as the file extension.
; illustrator : Japanese name of the illustrator. Separate multiple with a semicolon.
; scenario writer : Japanese name of the scenario writer. Separate multiple with a semicolon.
; voice actor : Japanese name of the voice actor. Separate multiple with a semicolon.
 
== Examples ==
 
<pre>{{Companion infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 孝の八犬士
| en title =
| acquisition = Gacha
| artwork = Moritaka 3star full
| icon = Moritaka 01 icon
| skin artwork =
| rarity = 3
| cost = 8
| element = 水
| weapon type = 斬撃
| hp = 403
| hp growth = 103.074
| atk = 198
| atk growth = 54.129
| base skill 1 = 獣の末裔
| base skill 2 = 切り払いの名手
| base skill 3 = 霊玉の八犬士
| base skill 4 =  
| charge skill name = Frozen Ice Blade
| charge skill description = Slash Damage + Inflict Purge on Enemy
| charge skill pattern = Weapon Spread Slash
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}</pre>
{{Companion infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 孝の八犬士
| en title =
| acquisition = Gacha
| artwork = Moritaka 3star full
| icon = Moritaka 01 icon
| skin artwork =
| rarity = 3
| cost = 8
| element = 水
| weapon type = 斬撃
| hp = 403
| hp growth = 103.074
| atk = 198
| atk growth = 54.129
| base skill 1 = 獣の末裔
| base skill 2 = 切り払いの名手
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade
| charge skill description = Slash Damage + Inflict Purge on Enemy
| charge skill pattern = Weapon Spread Slash
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}
 
<pre>{{Companion infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 武士は恋を知る
| en title =  
| acquisition = Valentine's Gacha
| artwork = Moritaka Valentine 5star full
| icon = Moritaka 03 icon
| skin artwork = Moritaka 2 Valentine 5star full
| rarity = 5
| cost = 24
| element = 火
| weapon type = 斬撃
| variant = Valentine
| availability = Limited
| hp = 1599
| hp growth = 84.497
| atk = 850
| atk growth = 65.217
| base skill 1 = 恋焦がれる者
| base skill 2 = 獣の末裔
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade?
| charge skill description = Magic Damage + Cast CP Up on all Nearby Allies
| charge skill pattern = Weapon Spread Magic
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}</pre>
{{Companion infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 武士は恋を知る
| en title =
| acquisition = Valentine's Gacha
| artwork = Moritaka Valentine 5star full
| icon = Moritaka 03 icon
| skin artwork = Moritaka 2 Valentine 5star full
| rarity = 5
| cost = 24
| element = 火
| weapon type = 斬撃
| variant = Valentine
| availability = Limited
| hp = 1599
| hp growth = 84.497
| atk = 850
| atk growth = 65.217
| base skill 1 = 恋焦がれる者
| base skill 2 = 獣の末裔
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade?
| charge skill description = Magic Damage + Cast CP Up on all Nearby Allies
| charge skill pattern = Weapon Spread Magic
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}
}}
</pre>


<pre>{{Companion infobox
If just a Japanese title is provided (without an ID), the template will attempt to check if the title has already been defined on the wiki, then attempts to map the title string to an ID. If this fails, an error message is thrown.
| jp name =
| en name = Tetsuya
| jp title =
| en title =
| acquisition = Unobtainable
| artwork = Tetsuya 3star full
| icon = Tetsuya 01 icon
| skin artwork =
| rarity =
| cost =
| element = 冥
| weapon type = 斬撃
| availability = Unavailable
| hp =
| hp growth =
| atk =
| atk growth =
| base skill 1 =
| base skill 2 =
| base skill 3 =
| base skill 4 =
| charge skill name =
| charge skill description =
| charge skill
| illustrator = naop
| scenario writer =
| voice actor =
}}</pre>
{{Companion infobox
| jp name =
| en name = Tetsuya
| jp title =
| en title =
| acquisition = Unobtainable
| artwork = Tetsuya 3star full
| icon = Tetsuya 01 icon
| skin artwork =
| rarity =
| cost =
| element = 冥
| weapon type = 斬撃
| availability =
| hp =
| hp growth =
| atk =
| atk growth =
| base skill 1 =
| base skill 2 =
| base skill 3 =
| base skill 4 =
| charge skill name =
| charge skill description =
| charge skill
| illustrator = naop
| scenario writer =
| voice actor =
}}


[[Category:Infobox templates]][[Category:Subobject templates]]
[[Category:Infobox templates]][[Category:Subobject templates]][[Category:Deprecated templates]]
</noinclude>
</noinclude>

Latest revision as of 06:21, 15 October 2019

Description

This templates is a proxy for the Template:Transient extended infobox extended template to avoid manually adding internal ID's to units by matching up titles to units. If you absolutely have to create an infobox for a unit that's not in game, please use:

{{#vardefine:transient en name|Gullinbursti}}
{{#vardefine:transient jp name|グリンブルスティ}}
{{#vardefine:transient element|英雄}}
{{#vardefine:transient weapon|打撃}}
{{#vardefine:transient illustrator|WAKU+LW}}
{{#vardefine:transient voice actor|日野聡}}
{{#vardefine:transient availability|}}
{{#vardefine:transient acquisition|}}
{{#vardefine:transient artwork|}}
{{#vardefine:transient icon|}}
{{#masterdata:CardPartial|utageFilename}}

Where either you can either specify artwork (filename on wiki) or utageFilename (asset used in-game). An icon is optional but recommended.

If a unit is in-game and the ID is unable to be found, you can simply invoke this template by:

{{Transient infobox
| en title =
| en name =
| charge skill name =
| charge skill description =
| artwork =
| icon =
| acquisition =
| availability =
| variant =
| en research file =
}}

If just a Japanese title is provided (without an ID), the template will attempt to check if the title has already been defined on the wiki, then attempts to map the title string to an ID. If this fails, an error message is thrown.