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

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><tr>
<includeonly><tr>
   <td>[[{{{?Has icon|Unknown}}}|link={{{?Transient 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>
   {{#ifeq: {{#var:show name}} | y | <td>[[{{{?Transient 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 energy}} | y | <td>{{Energy|{{{?Has energy|{{{?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>{{#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>
}}{{#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:
}}{{#if:
     <!-- vardefine skills and match them -->
     <!-- vardefine skills and match them -->
     {{#vardefine:counter|0}}
     {{#vardefine:counter|0}}
     {{#arraydefine: stage|{{{?Has base skill stage}}}|###}}
     {{#arraydefine: stage|{{{Has base skill stage}}}|###}}
     {{#arrayprint: 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}} }} }}
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     }}
     }}
Line 41: Line 41:
   <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|}}}
}}{{#ifeq: {{#var:show illustrator}} | y | <td>{{#if:{{{Has illustrator name|}}}
     | {{#vardefine:counter|0}}
     | {{#vardefine:counter|0}}
       {{#arraydefine: illustrator|{{{?Has illustrator name}}}|###}}
       {{#arraydefine: illustrator|{{{Has illustrator name}}}|###}}
       {{#arrayprint: illustrator
       {{#arrayprint: illustrator
       |,&#32;
       |,&#32;
       |@@@
       |@@@
       |{{#ifeq: {{#explode:{{{?Has illustrator subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{?Has illustrator subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       |{{#ifeq: {{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       }}
       }}
     | &mdash;&mdash;
     | &mdash;&mdash;
     }}</td>
     }}</td>
}}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{?Has scenario writer name|}}}
}}{{#ifeq: {{#var:show scenario writer}} | y | <td>{{#if:{{{Has scenario writer name|}}}
     | {{#vardefine:counter|0}}
     | {{#vardefine:counter|0}}
       {{#arraydefine: scenario writer|{{{?Has scenario writer name}}}|###}}
       {{#arraydefine: scenario writer|{{{Has scenario writer name}}}|###}}
       {{#arrayprint: scenario writer
       {{#arrayprint: scenario writer
       |,&#32;
       |,&#32;
       |@@@
       |@@@
       |{{#ifeq: {{#explode:{{{?Has scenario writer subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{?Has scenario writer subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       |{{#ifeq: {{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       }}
       }}
     | &mdash;&mdash;
     | &mdash;&mdash;
     }}</td>
     }}</td>
}}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{?Has voice actor name|}}}
}}{{#ifeq: {{#var:show voice actor}} | y | <td>{{#if:{{{Has voice actor name|}}}
     | {{#vardefine:counter|0}}
     | {{#vardefine:counter|0}}
       {{#arraydefine: voice actor|{{{?Has voice actor name}}}|###}}
       {{#arraydefine: voice actor|{{{Has voice actor name}}}|###}}
       {{#arrayprint: voice actor
       {{#arrayprint: voice actor
       |,&#32;
       |,&#32;
       |@@@
       |@@@
       |{{#ifeq: {{#explode:{{{?Has voice actor subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{?Has voice actor subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       |{{#ifeq: {{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }}|@@@]] }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
       }}
       }}

Latest revision as of 05:08, 10 October 2021

Description

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