From GamingWiki
Line 5: | Line 5: | ||
-->{{#vardefine: modeType | {{{type | {{{1 | }}} }}} }}<!-- | -->{{#vardefine: modeType | {{{type | {{{1 | }}} }}} }}<!-- | ||
+ | -->{{#arraydefine: allModesArray <!-- | ||
+ | -->| {{#ask: | ||
+ | [[is a::skill mode]] | ||
+ | {{#if: {{#var: modeType}} | [[mode type::{{#var: modeType}}]] }} | ||
+ | {{#if: {{{campaign|}}} | [[campaign::{{{campaign}}}]] }} | ||
+ | |?Name | ||
+ | |?Includes skill | ||
+ | |?Includes stunt | ||
+ | |format=array | ||
+ | |mainlabel=- | ||
+ | }} <!-- | ||
+ | -->| , | <PROP> }}<!-- | ||
+ | -->{{#arrayprint: allModesArray | | <line> | <!-- | ||
+ | -->{{#arraydefine: modeLine | <line> | <PROP>}}<!-- | ||
+ | -->{{#vardefine: modeName | {{#arrayindex: modeLine | 0}} }}<!-- | ||
+ | -->{{#arrayslice: modeParts | modeLine | 1}}<!-- | ||
+ | -->{{#hashinclude: allModes | {{#var: modeName}} = {{#arrayprint: modeParts | <PROP> }} }}<!-- | ||
+ | -->}}<!-- | ||
+ | |||
+ | -->{{#if: |<!-- | ||
-->{{#hashdefine: allModes <!-- | -->{{#hashdefine: allModes <!-- | ||
-->| {{#ask: | -->| {{#ask: | ||
Line 16: | Line 36: | ||
}} <!-- | }} <!-- | ||
-->| , | <PROP> }}<!-- | -->| , | <PROP> }}<!-- | ||
+ | -->}}<!-- | ||
+ | |||
-->{{#hashtoarray: | allModes | modeNames}}<!-- | -->{{#hashtoarray: | allModes | modeNames}}<!-- | ||
-->{{#arraysort: modeNames | asc}}<!-- | -->{{#arraysort: modeNames | asc}}<!-- | ||
Line 26: | Line 48: | ||
--><nowiki/> | --><nowiki/> | ||
{| class="infobox" <!-- | {| class="infobox" <!-- | ||
− | -->{{#hashprint: allModes | | <modename> | < | + | -->{{#hashprint: allModes | | <modename> | <modeline> | <!-- |
-->{{#hashinclude: headerHash | {{#var:modeCount}} = <modename> }}<!-- | -->{{#hashinclude: headerHash | {{#var:modeCount}} = <modename> }}<!-- | ||
− | -->{{#arraydefine: skillsArray | < | + | -->{{#arraydefine: skillsArray | {{#explode: <modeline> | <PROP> | 0}} | <MANY>}}<!-- |
-->{{#hashinclude: skillsHash | {{#var:modeCount}} = {{#arrayprint: skillsArray | <br/>}} }}<!-- | -->{{#hashinclude: skillsHash | {{#var:modeCount}} = {{#arrayprint: skillsArray | <br/>}} }}<!-- | ||
+ | -->{{#if:{{#vardefineecho: currentStunts|{{#explode: <modeline> | <PROP> | 1}}}} |<!-- | ||
+ | -->{{#arraydefine: stuntsArray | {{#var: currentStunts}} | <MANY>}}<!-- | ||
+ | -->{{#hashinclude: stuntsHash | {{#var:modeCount}} = {{#arrayprint: stuntsArray | <br/> | <stunt> | [[<stunt>]] }} }}<!-- | ||
+ | -->}}<!-- | ||
-->{{#vardefine: modeCount | {{#expr: {{#var: modeCount}} +1}} }}<!-- | -->{{#vardefine: modeCount | {{#expr: {{#var: modeCount}} +1}} }}<!-- | ||
-->{{#ifexpr: {{#var: modeCount}} mod 3 = 0 or {{#var: modeCount}} >= {{#arraysize: modeNames}} | <!-- | -->{{#ifexpr: {{#var: modeCount}} mod 3 = 0 or {{#var: modeCount}} >= {{#arraysize: modeNames}} | <!-- | ||
− | -->{{# | + | -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/> |
− | ! < | + | ! {{#hashvalue: headerHash | {{#var: modeNum}} | }} <!-- |
+ | -->}}<nowiki/> | ||
+ | {{!}}- <!-- | ||
+ | -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/> | ||
+ | {{!}} {{#hashvalue: skillsHash | {{#var: modeNum}} | }} <!-- | ||
+ | -->}}<nowiki/> | ||
+ | {{!}}- <!-- | ||
+ | -->{{#if: {{#hashsize: stuntsHash}} |<!-- | ||
+ | -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/> | ||
+ | {{!}} {{#hashvalue: stuntsHash | {{#var: modeNum}} | }} <!-- | ||
+ | -->}}<nowiki/> | ||
{{!}}- <!-- | {{!}}- <!-- | ||
− | --> | + | -->}}<!-- |
− | |||
− | |||
-->{{#arrayreset: skillsArray}}<!-- | -->{{#arrayreset: skillsArray}}<!-- | ||
− | -->{{#hashreset: headerHash|skillsHash}}<!-- | + | -->{{#hashreset: headerHash|skillsHash|stuntsHash}}<!-- |
-->}}<!-- end ifexpr | -->}}<!-- end ifexpr | ||
Revision as of 13:13, 27 May 2014
[create]
Error creating thumbnail: File missing
Template documentation Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |
Template:((#ask:
is a::skill mode |
?Name | ?Includes skill | ?Includes stunt | format | ||
---|---|---|---|---|---|---|
array | mainlabel=-
Template:)) = |