Difference between revisions of "Template:Skill extended infobox"

Jump to navigation Jump to search
Undo revision 43392 by SurtrFan8511 (talk)
(Undo revision 43392 by SurtrFan8511 (talk))
 
(63 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:skillnumber|{{#expr:{{#var:skillnumber|-1}}+1}}}}{{#css:
<includeonly><!--for categorization-->{{#if:{{NAMESPACE}}||{{#vardefine:skill page|true}}}}{{#vardefine:expand tips|left}}{{#vardefine:skillnumber|{{#expr:{{#var:skillnumber|-1}}+1}}}}{{#css:
table.skill-infobox {
table.skill-infobox {
     background-color: #f9f9f9;
     background-color: #f9f9f9;
Line 37: Line 37:
}}{{#if: <!-- define vars -->
}}{{#if: <!-- define vars -->
{{#vardefine:skill desc|[{{Skill trigger timing|{{{jp trigger timing|}}}}}] {{#if:{{{en description|}}}|{{{en description}}}|{{{jp description|?}}}}} {{#if:{{{proc chance|}}}|/ {{{proc chance|0}}}%}}|}}
{{#vardefine:skill desc|[{{Skill trigger timing|{{{jp trigger timing|}}}}}] {{#if:{{{en description|}}}|{{{en description}}}|{{{jp description|?}}}}} {{#if:{{{proc chance|}}}|/ {{{proc chance|0}}}%}}|}}
<!-- split string at html tags (i.g. strip them) -->
{{#if:{{#var:skill en name|}}||{{#vardefine:skill en name|{{#explode:{{{en name|}}}|/|0}}}}}}
<!-- {{#arraydefine:raw skill desc|{{#var:skill desc}}|/<[^>]*>/}} -->
{{#if:{{#var:skill en name|}}||{{#vardefine:skill jp name|{{#replace:{{#explode:{{{jp name|}}}|/|0}}}}|+|+}}}}
<!--{{#vardefine:raw skill desc|<strip>{{#var:skill desc}}</strip>}}-->
{{#vardefine:skill effect num|{{{effect|1}}}}}
<!-- use whitespace as delimiter -->
<!--{{#vardefine:raw skill desc|{{#arrayprint:raw skill desc|&#32;|@@@|@@@}}}}-->
<!--{{#vardefine:raw skill desc|{{#tag:strip|{{#var:skill desc}}}}}}-->
<!-- just dont define it, it breaks a lot of things -->
{{#vardefine:skill en name|{{#explode:{{{en name|}}}|/|0}}}}
{{#vardefine:skill jp name|{{#replace:{{#explode:{{{jp name|}}}|/|0}}}}|+|+}}
{{#vardefine:skill effect num|{{#explode:{{{jp name|}}}|/|1}}}}
{{#vardefine:skill id|{{{id|{{#masterdata:Skill|{{#var:skill jp name|}}|id:name}}}}}}}
{{#vardefine:skill id|{{{id|{{#masterdata:Skill|{{#var:skill jp name|}}|id:name}}}}}}}
{{#ifexpr:{{#var:skill id|}}<2|{{#vardefine:skill id|}}}}
{{#ifexpr:{{#var:skill id|}}<1|{{#vardefine:skill id|}}}}
}}<!-- end define vars --><!-- create subobject
}}<!-- Grab evolution and precursor name -->
--><!--{{#vardefine:additional skills jp name
<!--{{#vardefine:evolution skill subobj|
|{{#if:{{#explode:{{{jp name|}}}|/|1}}
  |{{#explode:{{{jp name|}}}|/|0}}/{{#expr:{{#explode:{{{jp name|}}}|/|1}}+1}}
  |{{{jp name|}}}/2}}
}}{{#vardefine:additional skills subobj|
  {{#ask:
  {{#ask:
   [[Has game context::Skill]]
   [[Has game context::Skill]]
   [[Has Japanese name::{{#var:additional skills jp name}}]]
   [[Has Japanese name::{{#var:skill jp name|{{{jp name|}}}}}]]
   |link=none
   |link=none
   |limit=1
   |limit=1
   |headers=hide
   |headers=hide
   |searchlabel=
   |searchlabel=
}}
   }}
}}-->{{#subobject:skill{{#var:skillnumber}}
| Has game context =Skill
| Has Japanese name ={{#var:skill jp name|{{{jp name|}}}}}
| Has English name ={{#var: skill en name|{{{en name|}}}}}
| Has effect ID = {{#var:skill effect num|1}}
| Has Japanese-English name = {{{jp-en name|}}}
| Has lowercase English name ={{lc:{{#var: skill en name|{{{en name|}}}}}}}
| Has Japanese description ={{{jp description|}}}
| Has English description ={{{en description|}}}
| Has skill trigger timing ={{{jp trigger timing|}}}
| Has skill proc chance ={{{proc chance|0}}}
| Has preformatted English description ={{#var:skill desc}}
| Has raw English description ={{#var:raw skill desc}}
| Has evolved skill={{{evolution|}}}
| Has precursor skill={{{precursor|}}}
| <!--Has additional skills={{#var:additional skills subobj|}}-->
| Has ID = {{#var:skill id|}}
}}<!-- end of subobject creation
--><!-- test -->{{#if:{{#var:skill id|}}||[[Category:Skill that lacks an ID]]}}{{#ifexpr:{{#var:skillnumber}} > 0|[[Category:Skill with additional effects]]{{#if:{{#pos:{{{jp description|}}}|Hidden:}}||{{#subobject:skill0
| Has preformatted English description = <br>{{#var:skill desc}}
| Has raw English description = <br>{{#var:raw skill desc}}
}}}}}}<!-- Grab evolution and precursor name -->
{{#vardefine:evolution skill subobj|
{{#if: {{{evolution|}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::{{{evolution}}}]]
   |link=none
  |limit=1
  |headers=hide
  |searchlabel=
  }}
}}
}}{{#vardefine:evolution skill en name|
}}{{#vardefine:evolution skill en name|
  {{#if: {{#var:evolution skill subobj|}}
  {{#if: {{#var:evolution skill subobj|}}
  |{{#show: {{#var:evolution skill subobj}} |?Has English name }}
  |{{#show: {{#var:evolution skill subobj}} |?Has English name }}
  }}
  }}
}}{{#vardefine:precursor skill subobj|
}}-->{{#if:{{#var:skill evolution|}}|{{#arraydefine:skill evolution id array|{{#var:skill evolution|}}}}
}}{{#arraydefine:skill evo list|{{#if:{{#arrayprint:skill evolution id array}}
|{{#arrayprint:skill evolution id array||@@@@|{{#ask:
  [[Has game context::Skill]]
  [[Has ID::{{formatnum:@@@@|R}}]]
  [[Has effect ID::1]]
  |link=none|headers=hide|searchlabel=
}}}}
|{{#ask:
  [[Has game context::Skill]]
  [[Has Japanese name::~{{#var:skill jp name|{{{jp name|}}}}}+*]]
  [[Has effect ID::1]]
  |link=none|headers=hide|searchlabel=
}} }}}}{{#vardefine:precursor skill subobj|
  {{#if: {{{precursor |}}}
  {{#if: {{{precursor |}}}
  |{{#ask:
  |{{#ask:
Line 111: Line 80:
   }}  
   }}  
  }}
  }}
}}{{#vardefine:precursor skill en name|
}}<!-- end define vars --><!-- create subobject
-->{{#subobject:skill{{#var:skillnumber}}
| Has game context = Skill
| Has skill type = {{#if:{{#var:ar skill page|}}|AR Skill|{{#if:{{#var:charge skill page|}}|Charge Skill|Base Skill}}}}
| Has Japanese name ={{#var:skill jp name|{{{jp name|}}}}}
| Has English name ={{#var: skill en name|{{{en name|}}}}}
| Has Japanese-English name = {{{jp-en name|}}}
| Has lowercase English name ={{lc:{{#var: skill en name|{{{en name|}}}}}}}
| Has Japanese description ={{{jp description|}}}
| Has English description = <!--{{{en description|}}}-->
| Has skill trigger timing ={{{jp trigger timing|}}}
| Has skill proc chance ={{{proc chance|0}}}
| Has preformatted English description = <!--{{#var:skill desc}}|+sep=<br>-->
| Has raw English description ={{#var:raw skill desc}}|+sep=<br>
| Has evolved skill={{#arrayprint:skill evo list}}|+sep=,
| Has precursor skill={{{precursor|}}}
| Has ID = {{#var:skill id|}}
| Has effect ID = {{#var:skill effect num|1}}
| Has range = {{{skill range|}}}
}}<!-- end of subobject creation
-->{{#ifexpr:{{#var:skill effect num|1}} > 1|[[Category:Skill with additional effects]]{{#if:{{#pos:{{{jp description|}}}|Hidden:}}||{{#subobject:{{#explode:{{#ask:  [[Has game context::Skill]]  [[Has ID::{{#var:skill id|}}]]  [[Has effect ID::1]]  |link=none  |limit=1  |headers=hide  |searchlabel=}}|#|1}}
<!--| Has preformatted English description = {{#var:skill desc}}
| Has raw English description = {{#var:raw skill desc}}-->
}}}}}}{{#vardefine:precursor skill en name|
  {{#if: {{#var:precursor skill subobj|}}
  {{#if: {{#var:precursor skill subobj|}}
  |{{#show: {{#var:precursor skill subobj}} |?Has English name }}
  |{{#show: {{#var:precursor skill subobj}} |?Has English name }}
  }}
  }}
}}<table id="skill{{#var:skillnumber}}" class="skill-infobox" style="{{#ifeq:{{{floats|true}}}|true|float: right;}}">
}}<table id="skill{{#var:skillnumber}}" data-id="{{#var:skill id|0}}_{{#var:skill effect num|1}}" class="skill-infobox" style="{{#ifeq:{{{floats|true}}}|true|float: right;}}{{#ifeq:{{{empty table|false}}}|true|visibility:hidden;}}">
<tr>
<tr>
<!--  <th colspan="2">{{#if:{{{jp-en name|}}}|<abbr title="{{{jp-en name}}}"><u>{{#var:skill en name|{{{en name|{{#var: skill jp name|???}}}}}}}</u></abbr>|{{#var:skill en name|{{{en name|{{#var:skill jp name|???}}}}}}}}}</th>  -->
<!--  <th colspan="2">{{#if:{{{jp-en name|}}}|<abbr title="{{{jp-en name}}}"><u>{{#var:skill en name|{{{en name|{{#var: skill jp name|???}}}}}}}</u></abbr>|{{#var:skill en name|{{{en name|{{#var:skill jp name|???}}}}}}}}}</th>  -->
     {{#vardefine:skill display name|{{#ifeq:{{#var:skill en name|}}|{{{en name|{{#var: skill jp name|{{{jp name|???}}}}}}}}}
     {{#vardefine:skill display name|
     <th colspan="2">{{#if:{{{jp-en name|}}}|<abbr title="{{{jp-en name}}}"><u>{{#var:skill display name|}}</u></abbr>|{{#var:skill display name|}}}}
  {{#ifeq:{{#var:skill en name|}}| |{{{ en name | {{#var: skill jp name| {{{jp name|???}}} }} }}} | {{#var:skill en name}}
  }}
}}
     <th colspan="2">{{Skill range graphic|{{{skill range|0 0 0 0 0 0}}}}}<br>{{#if:{{{jp-en name|}}}|<abbr title="{{{jp-en name}}}"><u>{{#var:skill display name|}}</u></abbr>|{{#var:skill display name|}}}}</th>
</tr>
</tr>
<tr>
<tr>
Line 132: Line 127:
   <th>Effect</th>
   <th>Effect</th>
   <td>{{#if: {{{en description|}}}
   <td>{{#if: {{{en description|}}}
|{{{en description}}}
|{{#if:{{Skill trigger timing|{{{jp trigger timing|?}}}}}<!--defining variables-->}} {{#masterdata:SkillDescription|{{#var:skill id|0}}|effect={{{effect|1}}}}} <!--{{{en description}}}-->
|{{{jp description|?}}}
|{{{jp description|?}}}
}}</td>
}}</td>
Line 140: Line 135:
   <td>{{{proc chance|0}}}%</td>
   <td>{{{proc chance|0}}}%</td>
</tr>}}
</tr>}}
{{#if:{{{evolution|}}}|
{{#ifeq:{{#arraysize:skill evo list}}|0||
<tr>
<tr>
   <th>Evolution</th>
   <th>Evolution(s)</th>
   <td>{{#if: {{#var:evolution skill subobj|}} | [[{{#var:evolution skill subobj|}}|{{#var:evolution skill en name|{{{evolution}}} }}]] | {{#if:{{{evolution|}}}|{{{evolution}}}|?}} }}</td>
   <td>{{#arrayprint:skill evo list|,&nbsp;|@@@@|[[@@@@|{{#if:{{#show:@@@@|?Has English name}}|{{#show:@@@@|?Has English name}}|{{#show:@@@@|?Has Japanese name}}}}]]}}</td>
<!--<td>{{#if: {{#var:evolution skill subobj|}} | [[{{#var:evolution skill subobj|}}|{{#var:evolution skill en name|{{{evolution}}} }}]] | {{#if:{{{evolution|}}}|{{{evolution}}}|?}} }}</td>-->
</tr>
</tr>
}}
}}
Line 157: Line 153:
</tr>
</tr>
}}-->
}}-->
{{#ifexpr:{{#var:skillnumber}} > 0|
{{#ifexpr:{{#var:skill effect num|1}} > 1|
<tr>
<tr>
   <th colspan="2">This is an additional effect</th>
   <th colspan="2">This is an additional effect</th>
Line 169: Line 165:
       {{NAMESPACE}} <!-- don't categorize if outside namespace -->
       {{NAMESPACE}} <!-- don't categorize if outside namespace -->
| <!-- don't categorize -->
| <!-- don't categorize -->
|
|[[Category:Skills]]{{#ifeq:{{#var:skill en name|{{{en name|{{#var:skill jp name|{{{jp name|}}}}}}}}}}|{{#var:skill jp name|{{{jp name|}}}}}|[[Category:Skill that lacks an English name]]}}
  [[Category:Skills]]
}}{{#vardefine:skill page|}}</includeonly><includeonly>{{#ifeq:{{{empty table|false}}}|true||{{#ifeq:{{PAGENAME}}|Skill infobox||{{#ifeq:{{#var:skillnumber|0}}|0|{{#seo:
}}</includeonly><includeonly>{{#ifeq:{{PAGENAME}}|Skill infobox||{{#ifeq:{{#var:skillnumber|0}}|0|{{#seo:
|title={{#var:skill en name|{{{en name|{{#var:skill jp name|{{{jp name|}}}}}}}}}} - Tokyo Afterschool Summoners Wiki
|title={{{en name|{{{jp name|}}}}}} - Tokyo Afterschool Summoners Wiki
|titlemode=replace
|titlemode=replace
|keywords=tokyo,afterschool,summoners,housamo,wiki,「東京放課後サモナーズ」,東京放課後サモナーズ,{{{jp name|}}},{{{en name|}}}
|keywords=tokyo,afterschool,summoners,housamo,wiki,「東京放課後サモナーズ」,東京放課後サモナーズ,{{#var:skill en name|{{{en name|}}}}},{{#var:skill jp name|{{{jp name|}}}}}
|description={{#var:raw skill desc}} {{#if:{{#var:additional skills subobj|}}|(This skill has additional effects)}}
|og:title={{#var:skill en name|{{{en name|{{#var:skill jp name|{{{jp name|}}}}}}}}}} - Tokyo Afterschool Summoners Wiki
|og:title={{{en name|{{{jp name|}}}}}} - Tokyo Afterschool Summoners Wiki
}}}}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
}}}}}}</includeonly><noinclude>
== Description ==
 
This templates creates a formatted string using the skill information as well as a skill subobject using the following properties:
 
* Has game context
* Has Japanese name
* Has English name
* Has Japanese-English name
* Has lowercase English name
* Has Japanese description
* Has English description
* Has skill trigger timing
* Has skill proc chance
* Has preformatted English description
* Has raw English description
* Has evolved skill
* Has precursor skill
* Has additional skills
 
== Usage ==
<pre>{{Skill infobox
| jp name =
| en name =
| jp-en name =
| jp trigger timing =
| jp description =
| en description =
| proc chance =
}}</pre>
 
=== Parameters ===
 
; jp name : Japanese name.
; en name : English name.
; jp-en name: Translated English name.
; jp trigger timing : Activation method in Japanese without parentheses.
; jp description : Skill description in Japanese.
; en description : Translated English skill description.
; proc chance : The skill's chance to activate at skill level 1 in percent.
; evolution : The skill's evolution
; precursor : The skill's pre-evolution (base)
 
== Examples ==
 
<!--
<pre>{{Skill infobox
| jp name = 獣の末裔
| en name = Beast Descendant
| jp trigger timing = 移動後
| jp description = 自身に頑強付与
| en description = Apply {{Status effect|頑強}} to Self
| proc chance = 50
}}
</pre>
{{Skill infobox
| jp name = 獣の末裔
| en name = Beast Descendant
| jp trigger timing = 移動後
| jp description = 自身に頑強付与
| en description = Apply {{Status effect|頑強}} to Self
| proc chance = 50
}}
-->
 
[[Category:Infobox templates]] [[Category:Subobject templates]]
</noinclude>
trusted
5,920

edits

Navigation menu