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

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(try converting #arraymap to #array stuff)
(remove debug cell)
Line 20: Line 20:
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
     }}
     }}
    <!--{{#arraymap: {{{?Has base skill stage|}}}
    |###
    |@@@
    |{{#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 @@@ desc|{{#explode:{{{?Has base skill desc}}}|###| {{#var:counter}} }} }}
    {{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }}
    |}}-->
   }}<!-- end skill vardefine -->{{#switch: {{#var:show skills}}
   }}<!-- end skill vardefine -->{{#switch: {{#var:show skills}}
     | n =  
     | n =  
Line 44: Line 36:
|}}<!-- 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}}}
 
explode Has base skill stage at pos=0 with delimiter="###": {{#explode:{{{?Has base skill stage}}}|###| 0 }}
 
counter var: {{#var:counter}}
 
arraymap through stage: {{#arraymap: {{{?Has base skill stage|}}}
    |###
    |@@@
    |@@@-->|}}
 
base skill 0 subobj: {{#var:base skill 0 subobj}}
 
base skill 1 subobj: {{#var:base skill 1 subobj}}
 
base skill 2 subobj: {{#var:base skill 2 subobj}}
 
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>[[{{{?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 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|}}}|{{#if:{{{?Has illustrator subobj|}}}|[[{{{?Has illustrator subobj}}}|{{{?Has illustrator name}}}]]|{{{?Has illustrator name}}}}}|&mdash;&mdash;}}</td>
   }}{{#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>
   }}{{#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>

Revision as of 03:24, 12 April 2017

Description

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