From GamingWiki
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
− | <onlyinclude><!-- | + | == Example skill modes == |
+ | |||
+ | <!-- | ||
+ | |||
+ | --><onlyinclude><!-- | ||
-->{{#vardefine: modeType | {{{type | {{{1 | }}} }}} }}<!-- | -->{{#vardefine: modeType | {{{type | {{{1 | }}} }}} }}<!-- | ||
+ | -->{{#vardefine: campaign | {{{campaign | {{{2 | }}} }}} }}<!-- | ||
− | --> | + | --><noinclude><!-- |
+ | -->{{#vardefine: modeType | default }}<!-- | ||
+ | -->{{#vardefine: campaign | Humans are the Worst }}<!-- | ||
+ | --></noinclude><!-- | ||
-->{{#arraydefine: allModesArray <!-- | -->{{#arraydefine: allModesArray <!-- | ||
Line 11: | Line 19: | ||
[[is a::skill mode]] | [[is a::skill mode]] | ||
{{#if: {{#var: modeType}} | [[mode type::{{#var: modeType}}]] }} | {{#if: {{#var: modeType}} | [[mode type::{{#var: modeType}}]] }} | ||
− | {{#if: {{ | + | {{#if: {{#var: campaign}} | [[campaign::{{#var:campaign}}]] }} |
− | |? | + | |?mode name |
− | |? | + | |?includes skill |
− | |? | + | |?includes stunt |
|format=array | |format=array | ||
|mainlabel=- | |mainlabel=- | ||
}} <!-- | }} <!-- | ||
− | -->| , | + | -->| , }}<!-- |
+ | |||
+ | -->{{#hashdefine: allModes}}<!-- | ||
-->{{#arrayprint: allModesArray | | <line> | <!-- | -->{{#arrayprint: allModesArray | | <line> | <!-- | ||
-->{{#arraydefine: modeLine | <line> | <PROP>}}<!-- | -->{{#arraydefine: modeLine | <line> | <PROP>}}<!-- | ||
Line 24: | Line 34: | ||
-->{{#arrayslice: modeParts | modeLine | 1}}<!-- | -->{{#arrayslice: modeParts | modeLine | 1}}<!-- | ||
-->{{#hashinclude: allModes | {{#var: modeName}} = {{#arrayprint: modeParts | <PROP> }} }}<!-- | -->{{#hashinclude: allModes | {{#var: modeName}} = {{#arrayprint: modeParts | <PROP> }} }}<!-- | ||
+ | -->{{#arrayreset: modeLine | modeParts }}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
+ | -->{{#arrayreset: allModesArray}}<!-- | ||
− | + | Pick up just the hash keys: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->{{#hashtoarray: | allModes | modeNames}}<!-- | -->{{#hashtoarray: | allModes | modeNames}}<!-- | ||
-->{{#arraysort: modeNames | asc}}<!-- | -->{{#arraysort: modeNames | asc}}<!-- | ||
Line 57: | Line 56: | ||
-->{{#if:{{#vardefineecho: currentStunts|{{#explode: <modeline> | <PROP> | 1}}}} |<!-- | -->{{#if:{{#vardefineecho: currentStunts|{{#explode: <modeline> | <PROP> | 1}}}} |<!-- | ||
-->{{#arraydefine: stuntsArray | {{#var: currentStunts}} | <MANY>}}<!-- | -->{{#arraydefine: stuntsArray | {{#var: currentStunts}} | <MANY>}}<!-- | ||
− | -->{{#hashinclude: stuntsHash | {{#var:modeCount}} = {{#arrayprint: stuntsArray | <br/> | <stunt> | [[<stunt>]] }} }}<!-- | + | -->{{#hashinclude: stuntsHash | {{#var:modeCount}} = {{#arrayprint: stuntsArray | <br/> | <stunt> | Stunt: [[<stunt>]] }} }}<!-- |
-->}}<!-- | -->}}<!-- | ||
Line 79: | Line 78: | ||
{{!}}- <!-- | {{!}}- <!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | -->{{#arrayreset: skillsArray}}<!-- | + | -->{{#arrayreset: skillsArray|stuntsArray}}<!-- |
-->{{#hashreset: headerHash|skillsHash|stuntsHash}}<!-- | -->{{#hashreset: headerHash|skillsHash|stuntsHash}}<!-- | ||
-->}}<!-- end ifexpr | -->}}<!-- end ifexpr | ||
-->| modeNames }}<!-- | -->| modeNames }}<!-- | ||
+ | |||
+ | -->{{#arrayreset: modeNames}}<!-- | ||
+ | -->{{#hashreset: allModes}}<!-- | ||
--><nowiki/> | --><nowiki/> | ||
|}</onlyinclude> | |}</onlyinclude> |
Latest revision as of 19:47, 4 July 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. |
Example skill modes[edit]
Template:((#ask:
is a::skill mode mode type::default campaign::Humans are the Worst |
?mode name | ?includes skill | ?includes stunt | format |
---|---|---|---|---|
array | mainlabel=-
Template:)) = |