From GamingWiki
Jump to: navigation, search
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> | <modeskills> | <!--
+
-->{{#hashprint: allModes | | <modename> | <modeline> | <!--
  
 
   -->{{#hashinclude: headerHash | {{#var:modeCount}} = <modename> }}<!--
 
   -->{{#hashinclude: headerHash | {{#var:modeCount}} = <modename> }}<!--
   -->{{#arraydefine: skillsArray | <modeskills> | <MANY>}}<!--
+
   -->{{#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}} | <!--  
       -->{{#hashprint: headerHash || <num> | <header> | <nowiki/>
+
       -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/>
! <header> }}<nowiki/>
+
! {{#hashvalue: headerHash | {{#var: modeNum}} | &nbsp; }} <!--
 +
      -->}}<nowiki/>
 +
{{!}}- <!--
 +
      -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/>
 +
{{!}} {{#hashvalue: skillsHash | {{#var: modeNum}} | &nbsp; }} <!--
 +
      -->}}<nowiki/>
 +
{{!}}- <!--
 +
      -->{{#if: {{#hashsize: stuntsHash}} |<!--
 +
        -->{{#loop: modeNum | {{#expr: {{#var: modeCount}} -3}} | 3 |<nowiki/>
 +
{{!}} {{#hashvalue: stuntsHash | {{#var: modeNum}} | &nbsp; }} <!--
 +
        -->}}<nowiki/>
 
{{!}}- <!--
 
{{!}}- <!--
       -->{{#hashprint: skillsHash || <num> | <skills> | <nowiki/>
+
       -->}}<!--
{{!}} <skills> }}<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

    Template:((#ask:
        is a::skill mode
        
        
?Name ?Includes skill ?Includes stunt format
    array mainlabel=-
     Template:)) =