Difference between revisions of "Template:Status infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
<includeonly><onlyinclude>{{#vardefine:status id|{{{id|{{#if:{{{jp name|}}}|{{#masterdata:Status|{{{jp name|}}}|id:name}}|0}}}}}}}{{#ifexpr:{{#var:status id|}}<1|{{#vardefine:status id|}}}}{{#if:{{#var:status id|}}|{{
{{#subobject:status{{#vardefineecho:statusnumber|{{#expr:{{#var:statusnumber|-1}}+1}}}}
#if:{{{en name|}}}|{{#vardefine:status en name|{{{en name|}}}}}}}{{
| Has game context = Status
#if:{{{jp name|}}}|{{#vardefine:status jp name|{{{jp name|}}}}}}}{{
| Has Japanese name = {{{jp name|}}}
#if:{{{jp-en name|}}}|{{#vardefine:status jp en name|{{{jp-en name|}}}}}}}{{
| Has English name = {{{en name|}}}
#if:{{{en note|}}}|{{#vardefine:status en note|{{{en note|}}}}}}}{{
| Has lowercase English name = {{lc:{{{en name|}}}}}
#masterdata:Status|{{#var:status id}}|{{#var:status template options|}}
| Has image = {{{filename|}}}
}}{{#vardefine:status template options|}}|<!--Invalid invocation.-->}}</includeonly></onlyinclude>
| Has table ID = {{{id|0}}}
| Has status type = {{{type|}}}
| Has duration = {{{duration|1}}}
| Has English note = {{{note|}}}
| Has Japanese note = {{{jp-note|{{{note|}}}}}}
 
<!-- Damage addition -->
| Adds damage = {{{damage-add|0}}}
| Adds damage max = {{{damage-add-max|0}}}
<!-- Damage mult -->
| Mults damage = {{{damage-mult|1.0}}}
| Mults damage max = {{{damage-mult-max|0}}}
<!-- Damaged addition -->
| Adds damaged = {{{damaged-add|0}}}
| Adds damaged max = {{{damaged-add-max|0}}}
<!-- Damaged mult -->
| Mults damaged = {{{damaged-mult|1.0}}}
| Mults damaged max = {{{damaged-mult-max|0}}}
<!-- HP recovery -->
| Recovers HP = {{{hp-recovery|0}}}
| Recovers HP max = {{{hp-recovery-max|0}}}
<!-- CP add -->
| Adds CP = {{{cp-add|0}}}
<!-- Proc Rate add -->
| Adds Rate Up = {{{rate-add|0}}}
<!-- Locks -->
| Locks = {{{locks|None}}}
 
}}[[Category:Status effects]]
}}<!-- end subobj creation --><!---->{{#css:
 
table.status-preview-infobox {
    background-color: #f9f9f9;
    border: 1px solid #aaa;
    font-size: 11px;
    margin: 1em 0em 1em 2em;
    padding: 2px;
    text-align: center;
    {{#ifeq:{{{floats|true}}}|true|float: right;}}
    overflow: visible;
    position: relative;
}
 
th > img {
    margin-right: 5px;
    width: 30x;
    height: 30px;
}
 
table.status-preview-infobox th {
    padding: 0em 1em 0em 1em;
}
 
table.status-preview-infobox tr:first-child th {
    background-color: #ccf;
    padding: 0.5em 1em 0.5em 1em;
    font-size: 1.2em;
}
 
table.status-preview-infobox tr:not(:first-child) th {
    background-color: #ddf;
}
 
table.status-preview-infobox tr:not(:first-child) th + th {
    background-color: #e4e4ff;
}
 
table.status-preview-infobox td {
    text-align: left;
    padding: 0px 7px 0px 7px;
}
}}{{#vardefine:status subobj|
{{#ask:
  [[Has game context::Status]]
  {{#if:{{{en name|}}}|[[Has English name::~{{{en name}}}]]}}
  {{#if:{{{jp name|}}}|[[Has Japanese name::{{{jp name}}}]]}}
  |link=none
  |limit=1
  |headers=hide
  |searchlabel=
}}
}}<table id="status{{#statusnumber}}" class="status-preview-infobox">
<tr>
  <th colspan="4">{{#if:{{{filename|}}}|{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon_status/icon_status_{{{filename|}}}.png}}  }}<abbr title="{{{jp name|}}}">[[{{#var:status subobj|}}|{{{en name|{{{jp name|???}}}}}}]]</abbr></th>
</tr>
<!--
  Notes
-->{{#if:{{{note|}}}|
<tr>
  <th colspan="2">Notes</th>
  <td coslapn="2">{{{note|?}}}</td>
</tr>
}}<!--
  Duration
-->{{#if:{{{duration|}}}|  
<tr>
  <th colspan="2">Duration</th>
  <td coslapn="2">{{{duration|?}}}</td>
</tr>
}}<tr>
  <th colspan="2"></th>
  <th colspan="1">Base Value</th>
  <th colspan="1">Maximum Value</th>
</tr><!--
  Damage Add
-->{{#if: {{{damage-add|}}} |  
<tr>
  <th colspan="2">Additional Damage Dealt</th>
  <td coslapn="1">{{{damage-add|?}}}</td>
  <td coslapn="1">{{{damage-add-max|?}}}</td>
</tr>
}}<!--
  Damage Mult
-->{{#if: {{{damage-mult|}}} |  
<tr>
  <th colspan="2">Damage Multiplier Dealt</th>
  <td coslapn="1">{{{damage-mult|?}}}%</td>
  <td coslapn="1">{{{damage-mult-max|?}}}%</td>
</tr>
}}<!--
  Damaged Add
-->{{#if: {{{damaged-add|}}} |
<tr>
  <th colspan="2">Additional Damaged Received</th>
  <td coslapn="1">{{{damaged-add|?}}}</td>
  <td coslapn="1">{{{damaged-add-max|?}}}</td>
</tr>
}}<!--
  Damaged Mult
-->{{#if: {{{damaged-mult|}}} |
<tr>
  <th colspan="2">Damage Multiplier Received</th>
  <td coslapn="1">{{{damaged-mult|?}}}%</td>
  <td coslapn="1">{{{damaged-mult-max|?}}}%</td>
</tr>
}}<!--
  HP Recovery
-->{{#if: {{{hp-recovery|}}} |  
<tr>
  <th colspan="2">HP Recovered</th>
  <td coslapn="1">{{{hp-recovery|?}}}</td>
  <td coslapn="1">{{{hp-recovery-max|?}}}</td>
</tr>
}}<!--
  CP Add
-->{{#if: {{{cp-add|}}} |
<tr>
  <th colspan="2">CP Added</th>
  <td coslapn="2">{{{cp-add|?}}}</td>
</tr>
}}<!--
  Rate Up
-->{{#if: {{{rate-add|}}} |  
<tr>
  <th colspan="2">Skill Proc Rate Up</th>
  <td coslapn="2">{{{rate-add|?}}}</td>
</tr>
}}<!--
  Locks
-->{{#if: {{{locks|}}} |
<tr>
  <th colspan="2">Unit Restrictions</th>
  <td coslapn="2">{{{locks|?}}}</td>
</tr>
}}
</table>
</includeonly><noinclude>
== Description ==
== Description ==


This templates creates an infobox for a status effect, as well as a status effect subobject using the following properties:
This templates serves as a proxy between the housamo.xyz API's master data parser and the old wiki template invocations. It is not recommended to manually invoke this template, but if you absolutely must, invoke this template via: <pre>
 
{{Status infobox
== Usage ==
| jp name = In-Game Japanese name
<pre>{{Status infobox
| en name = Translated name (if not localized in-game)
| id =
| en note = English note
| en name =
| jp name =  
| filename =
| duration =
| damage-add =
| damage-add-max =
| damage-mult =
| damage-mult-max =
| damaged-add =
| damaged-add-max =
| damaged_mult =
| damaged_mult_max =
| hp-recovery =
| hp-recovery-max =
| cp-add =
| locks =
| type =  
| note =
}}</pre>
 
=== Parameters ===
 
; en name : (Officially localized) English name of the status
; jp-en name : (Unofficially) translated English name of the status
; jp name : Original Japanese name of the status
; filename : Filename the status icon uses
; id : internal ID used
; type : Whether this is a buff or a debuff
; duration : How many turns the status effect persists
; note : Note that displays when the status effect is added
; jp-note : Original Japanese for the above
; damage-add : Additional damage applied when attacking (constant)
; damage-add-max : Max value for the above
; damage-mult : Damage multiplier applied when attacking (coefficient)
; damaged-add : Additional damage applied when attacked (constant)
; damaged-add-max : Max value for the above
; damage-mult-max : Max value for the above
; damaged-mult : Damage multiplier applied when attacked (coefficient)
; damaged-mult-max : Max value for the above
; hp-recovery : HP recovered at end turn
; hp-recovery-max : Max value for the above
; cp-add : CP recovered at end turn
; rate-add : Max value for the above
; locks : Restrictions applied to unit. These include: movement, attack, skill, CS, blowback
 
 
== Examples ==
 
<pre>{{Status infobox
| filename = Guts
| id = 41
| en name = Guts
| jp name = 根性
| filename = guts
| duration = 5
| damage-add =
| damage-add-max =
| damage-mult =
| damage-mult-max =
| damaged-add =
| damaged-add-max =
| damaged_mult =
| damaged_mult_max =
| hp-recovery =
| hp-recovery-max =
| cp-add =
| locks =
| type = buff
| note = HPゼロ時に復活
}}
}}
</pre>
</pre>
{{Status infobox
And the status should properly link up.
| filename = Guts
| id = 41
| en name = Guts
| jp name = 根性
| filename = guts
| duration = 5
| damage-add =
| damage-add-max =
| damage-mult =
| damage-mult-max =
| damaged-add =
| damaged-add-max =
| damaged_mult =
| damaged_mult_max =
| hp-recovery =
| hp-recovery-max =
| cp-add =
| locks =
| type = buff
| note = HPゼロ時に復活
}}


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

Latest revision as of 22:50, 28 December 2018

Description

This templates serves as a proxy between the housamo.xyz API's master data parser and the old wiki template invocations. It is not recommended to manually invoke this template, but if you absolutely must, invoke this template via:

{{Status infobox
| jp name = In-Game Japanese name
| en name = Translated name (if not localized in-game)
| en note = English note
}}

And the status should properly link up.