Difference between revisions of "Template:Transient list table result format"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(trying to find out what's wrong with skill display)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><tr>
<includeonly><tr>
   <td>[[{{{?Has icon|Unknown}}}|link={{{?Companion list subobject}}}|50px]]</td>
   <td>{{#if:{{{Has filename|}}}|{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/icon/icon_{{lc:{{{Has filename}}}}}.png|width="50"|height="50"}}|[[{{{Has icon|Unknown}}}|link={{{Transient list subobject}}}|50px]]}}</td>
   <td>[[{{{?Companion list subobject}}}|{{{?Has English name}}} {{#ifeq: {{{?Has variant}}} | Standard | | ({{{?Has variant}}}) }}]]</td>
   {{#ifeq: {{#var:show name}} | y | <td>[[{{{Transient list subobject}}}|{{{Has English name}}} {{#ifeq: {{{Has variant}}} | Standard | | ({{{Has variant}}}) }}]]</td>
  {{#ifeq: {{#var:show jp name}} | y | <td>{{{?Has Japanese name}}}</td>
}}{{#ifeq: {{#var:show jp name}} | y | <td>{{{Has Japanese name}}}</td>
  }}{{#ifeq: {{#var:show rarity}} | y | <td>{{{?Has rarity}}}</td>
}}{{#ifeq: {{#var:show rarity}} | y | <td>{{{Has rarity}}}</td>
  }}{{#ifeq: {{#var:show cost}} | y | <td>{{{?Has card cost}}}</td>
}}{{#ifeq: {{#var:show cost}} | y | <td>{{{Has card cost}}}</td>
  }}{{#ifeq: {{#var:show element}} | y | <td>{{Element|{{{?Has element}}}}}</td>
}}{{#ifeq: {{#var:show energy}} | y | <td>{{Energy|{{{Has energy|{{{Has element}}}}}}}}</td>
  }}{{#ifeq: {{#var:show weapon type}} | y | <td>{{Weapon type|{{{?Has weapon type}}}}}</td>
}}{{#ifeq: {{#var:show weapon type}} | y | <td>{{Weapon type|{{{Has weapon type}}}}}</td>
  }}{{#ifeq: {{#var:show base stats}} | y | <td>{{{?Has hp value}}}</td><td>{{{?Has atk value}}}</td>
}}{{#ifeq: {{#var:show base stats}} | y | <td>{{{Has hp value}}}</td><td>{{{Has atk value}}}</td>
  }}{{#ifeq: {{#var:show stats at lv}} | 0 | | <td>{{#expr:{{{?Has hp value}}}+{{{?Has hp growth value}}}*{{#var:show stats at lv}} round 0}}</td><td>{{#expr:{{{?Has atk value}}}+{{{?Has atk growth value}}}*{{#var:show stats at lv}} round 0}}</td>
}}{{#ifeq: {{#var:show stats at lv}} | 0 | | <td>{{#ifeq: {{{Has hp value|}}}|||{{#ifeq: {{{Has hp growth value|}}}|||{{#expr:{{{Has hp value|0}}}+{{{Has hp growth value|0}}}*{{#var:show stats at lv}}-{{{Has hp growth value|0}}} round 0}}}}}}</td><td>{{#ifeq: {{{Has atk growth value|}}}|||{{#ifeq: {{{Has atk value|}}}|||{{#expr:{{{Has atk value|0}}}+{{{Has atk growth value|0}}}*{{#var:show stats at lv}}-{{{Has atk growth value|0}}} round 0}}}}}}</td>
  }}{{#if: <!-- vardefine skills and match them -->
}}{{#if:
    <!-- vardefine skills and match them -->
     {{#vardefine:counter|0}}
     {{#vardefine:counter|0}}
     {{#arraymap: {{{?Has base skill stage|}}}
     {{#arraydefine: stage|{{{Has base skill stage}}}|###}}
     |,
    {{#arrayprint: stage
     |
     |@@@
     |@@@
     |{{#vardefine:base skill @@@ subobj|{{#explode:{{{?Has base skill subobj}}}|,| {{#var:counter}} }} }}
     |{{#vardefine:base skill @@@ subobj|{{#explode:{{{Has base skill subobj}}}|###| {{#var:counter}} }} }}
     {{#vardefine:base skill @@@ name|{{#explode:{{{?Has base skill en name}}}|,| {{#var:counter}} }} }}
     {{#vardefine:base skill @@@ name|{{#explode:{{{Has base skill en name}}}|###| {{#var:counter}} }} }}
     {{#vardefine:base skill @@@ desc|{{#explode:{{{?Has base skill desc}}}|%,| {{#var:counter}} }} }}
     {{#vardefine:base skill @@@ desc|{{#explode:{{{Has base skill desc}}}|###| {{#var:counter}} }} }}
    {{#ifeq:{{#sub:{{#var:base skill @@@ desc}}|-1}}|%|| {{#vardefine:base skill @@@ desc|{{#var:base skill @@@ desc}}%}} }}
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     |}}
     }}
   }}<!-- end skill vardefine -->{{#switch: {{#var:show skills}}
   }}<!-- end skill vardefine -->{{#switch: {{#var:show skills}}
     | n =  
     | n =  
Line 36: Line 37:
|}}<!-- end arraymap --></ul></td>
|}}<!-- end arraymap --></ul></td>
     | separate
     | separate
     |#default = <td>DEBUG CELL
     |#default = <td>{{#ifeq: {{#expr:{{#var:counter}} > 0 }} | 1 |{{#ifeq: {{#var:base skill 0 subobj}} | - | {{#var:base skill 0 name}} | [[{{#var:base skill 0 subobj}}|{{#var:base skill 0 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 0 desc}} }} | N/A}}</td>
 
Has base skill stage: {{{?Has base skill stage|}}}
 
Has base skill subobj: {{{?Has base skill subobj}}}
 
Has base skill en name: {{{?Has base skill en name}}}
 
Has base skill desc: {{{?Has base skill desc}}}
 
END</td><td>{{#ifeq: {{#expr:{{#var:counter}} > 0 }} | 1 |{{#ifeq: {{#var:base skill 0 subobj}} | - | {{#var:base skill 0 name}} | [[{{#var:base skill 0 subobj}}|{{#var:base skill 0 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 0 desc}} }} | N/A}}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 1 }} | 1 |{{#ifeq: {{#var:base skill 1 subobj}} | - | {{#var:base skill 1 name}} | [[{{#var:base skill 1 subobj}}|{{#var:base skill 1 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 1 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 1 }} | 1 |{{#ifeq: {{#var:base skill 1 subobj}} | - | {{#var:base skill 1 name}} | [[{{#var:base skill 1 subobj}}|{{#var:base skill 1 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 1 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 2 }} | 1 |{{#ifeq: {{#var:base skill 2 subobj}} | - | {{#var:base skill 2 name}} | [[{{#var:base skill 2 subobj}}|{{#var:base skill 2 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 2 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 2 }} | 1 |{{#ifeq: {{#var:base skill 2 subobj}} | - | {{#var:base skill 2 name}} | [[{{#var:base skill 2 subobj}}|{{#var:base skill 2 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 2 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 3 }} | 1 |{{#ifeq: {{#var:base skill 3 subobj}} | - | {{#var:base skill 3 name}} | [[{{#var:base skill 3 subobj}}|{{#var:base skill 3 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 3 desc}} }} | N/A }}</td>
   <td>{{#ifeq: {{#expr:{{#var:counter}} > 3 }} | 1 |{{#ifeq: {{#var:base skill 3 subobj}} | - | {{#var:base skill 3 name}} | [[{{#var:base skill 3 subobj}}|{{#var:base skill 3 name}}]] }} {{#ifeq: {{#var:show skill description}} | y | / {{#var:base skill 3 desc}} }} | N/A }}</td>
  }}{{#ifeq: {{#var:show charge skill}} | y | <td>[[{{{?Has charge skill pattern}}}|50px]]</td><td>{{{?Has charge skill name|}}} {{#ifeq: {{#var:show skill description}} | y | {{{?Has charge skill desc|}}} }}</td>
}}{{#ifeq: {{#var:show charge skill}} | y | <td>[[File:Weapon Spread {{{Has charge skill pattern}}}.png|50px]]</td><td>{{{Has charge skill name|}}} {{#ifeq: {{#var:show skill description}} | y |/ {{{Has charge skill desc|}}} }}</td>
  }}{{#ifeq: {{#var:show illustrator}} | y | <td>{{#if:{{{?Has illustrator name|}}}|{{#if:{{{?Has illustrator subobj|}}}|[[{{{?Has illustrator subobj}}}|{{{?Has illustrator name}}}]]|{{{?Has illustrator name}}}}}|&mdash;&mdash;}}</td>
}}{{#ifeq: {{#var:show illustrator}} | y | <td>{{#if:{{{Has illustrator name|}}}
  }}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{?Has scenario writer name|}}}|{{#if:{{{?Has scenario writer subobj|}}}|[[{{{?Has scenario writer subobj}}}|{{{?Has scenario writer name}}}]]|{{{?Has scenario writer name}}}}}|&mdash;&mdash;}}</td>
    | {{#vardefine:counter|0}}
  }}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{?Has voice actor name|}}}|{{#if:{{{?Has voice actor subobj|}}}|[[{{{?Has voice actor subobj}}}|{{{?Has voice actor name}}}]]|{{{?Has voice actor name}}}}}|&mdash;&mdash;}}</td>}}
      {{#arraydefine: illustrator|{{{Has illustrator name}}}|###}}
      {{#arrayprint: illustrator
      |,&#32;
      |@@@
      |{{#ifeq: {{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }}|@@@]] }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
      }}
    | &mdash;&mdash;
    }}</td>
}}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{Has scenario writer name|}}}
    | {{#vardefine:counter|0}}
      {{#arraydefine: scenario writer|{{{Has scenario writer name}}}|###}}
      {{#arrayprint: scenario writer
      |,&#32;
      |@@@
      |{{#ifeq: {{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }}|@@@]] }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
      }}
    | &mdash;&mdash;
    }}</td>
}}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{Has voice actor name|}}}
    | {{#vardefine:counter|0}}
      {{#arraydefine: voice actor|{{{Has voice actor name}}}|###}}
      {{#arrayprint: voice actor
      |,&#32;
      |@@@
      |{{#ifeq: {{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }}|@@@]] }}
      {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
      }}
    | &mdash;&mdash;
    }}</td>}}
</tr></includeonly><noinclude>== Description ==
</tr></includeonly><noinclude>== Description ==


This template creates a table row using query results. Used by [[Template:Companion list]].
This template creates a table row using query results. Used by [[Template:Transient list]].


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

Latest revision as of 05:08, 10 October 2021

Description

This template creates a table row using query results. Used by Template:Transient list.