Difference between revisions of "Template:Transient list table result format"
Jump to navigation
Jump to search
(trying to find out what's wrong with skill display) |
SurtrFan8511 (talk | contribs) |
||
(26 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><tr> | <includeonly><tr> | ||
<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>[[{{{ | {{#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 rarity}} | y | <td>{{{Has rarity}}}</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 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 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 --> | |||
{{#vardefine:counter|0}} | {{#vardefine:counter|0}} | ||
{{# | {{#arraydefine: stage|{{{Has base skill stage}}}|###}} | ||
| | {{#arrayprint: stage | ||
| | |||
|@@@ | |@@@ | ||
|{{#vardefine:base skill @@@ subobj|{{#explode:{{{ | |{{#vardefine:base skill @@@ subobj|{{#explode:{{{Has base skill subobj}}}|###| {{#var:counter}} }} }} | ||
{{#vardefine:base skill @@@ name|{{#explode:{{{ | {{#vardefine:base skill @@@ name|{{#explode:{{{Has base skill en name}}}|###| {{#var:counter}} }} }} | ||
{{#vardefine:base skill @@@ desc|{{#explode:{{{ | {{#vardefine:base skill @@@ desc|{{#explode:{{{Has base skill desc}}}|###| {{#var:counter}} }} }} | ||
{{#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 = | |#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> | ||
<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>[[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|}}} | |||
| {{#vardefine:counter|0}} | |||
{{#arraydefine: illustrator|{{{Has illustrator name}}}|###}} | |||
{{#arrayprint: illustrator | |||
|,  | |||
|@@@ | |||
|{{#ifeq: {{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has illustrator subobj}}}|###| {{#var:counter}} }}|@@@]] }} | |||
{{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }} | |||
}} | |||
| —— | |||
}}</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 | |||
|,  | |||
|@@@ | |||
|{{#ifeq: {{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has scenario writer subobj}}}|###| {{#var:counter}} }}|@@@]] }} | |||
{{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }} | |||
}} | |||
| —— | |||
}}</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 | |||
|,  | |||
|@@@ | |||
|{{#ifeq: {{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }} | - | @@@ | [[{{#explode:{{{Has voice actor subobj}}}|###| {{#var:counter}} }}|@@@]] }} | |||
{{#vardefine:counter|{{#expr:{{#var:counter}}+1}} }} | |||
}} | |||
| —— | |||
}}</td>}} | |||
</tr></includeonly><noinclude>== Description == | </tr></includeonly><noinclude>== Description == | ||
This template creates a table row using query results. Used by [[Template: | 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.