From GamingWiki
Jump to: navigation, search
Line 4: Line 4:
 
{| class="infobox"
 
{| class="infobox"
 
<onlyinclude><!--
 
<onlyinclude><!--
 +
 +
-->{{#tag:pre|Starting skill section}}<!--
  
 
-->{{#vardefine: cols | {{{columns|6}}} }}<!--
 
-->{{#vardefine: cols | {{{columns|6}}} }}<!--
Line 48: Line 50:
 
   -->{{#forargs: skills | thelevel | theskilllist | <!--
 
   -->{{#forargs: skills | thelevel | theskilllist | <!--
 
       -->{{#ifeq: {{#var:theskilllist}} | M_NUL ||<!--
 
       -->{{#ifeq: {{#var:theskilllist}} | M_NUL ||<!--
      -->{{#rmatch: {{#var:thelevel}} | /^\d+$/ | <!--
+
        -->{{#rmatch: {{#var:thelevel}} | /^\d+$/ | <!--
        -->{{#hashinclude: skillhash | {{#var: thelevel}}={{#var:theskilllist}} }}<!--
+
            -->{{#hashinclude: skillhash | {{#var: thelevel}}={{#var:theskilllist}} }}<!--
      -->}}<!--
+
        -->}}<!--
 
       -->}}<!--
 
       -->}}<!--
 
   -->}}<!--
 
   -->}}<!--
-->}}<!--
+
-->}}<!-- end if
  
 
-->{{#tag:pre|<!--
 
-->{{#tag:pre|<!--
Line 63: Line 65:
 
| subhead  = {{{label|Skills}}}
 
| subhead  = {{{label|Skills}}}
 
| righthead = {{#if:{{{skilltypes|}}}|<!--
 
| righthead = {{#if:{{{skilltypes|}}}|<!--
   -->types: {{#hashprint: classhash | , | %%%% | @@@@ | <span class="{{#var:skillClass}} @@@@"> %%%%</span> }}<!--
+
   -->skill types: {{#hashprint: classhash | , | %%%% | @@@@ | <span class="{{#var:skillClass}} @@@@"> %%%%</span> }}<!--
 
   -->}}
 
   -->}}
}}<!-- end section --><!--
+
}}<!-- end section  
  
 
-->{{#arraydefine: skillhashkeys | name, marker}}<!--
 
-->{{#arraydefine: skillhashkeys | name, marker}}<!--
-->{{#hashprint: skillhash || %%%% | @@@@ | <!--
+
-->{{#hashprint: skillhash || $key$ | @@@@ | <!--
 
   -->{{#arraydefine: skilllineary | @@@@ | :: }}<!--
 
   -->{{#arraydefine: skilllineary | @@@@ | :: }}<!--
 
   -->{{#if:@@@@|<!--
 
   -->{{#if:@@@@|<!--
 
       -->{{Character sheet/section<!--
 
       -->{{Character sheet/section<!--
       -->| label1 = {{#arrayindex: skilllevelarray | {{#expr:%%%%-1}} }}<!--
+
      -->| labelclass1 = label <!--
 +
      -->| dataclass1  = {{#var: skillClass }} <!--
 +
       -->| label1 = {{#arrayindex: skilllevelarray | {{#expr:($key$)-1}} }}<!--
 
       -->| data1  = <!--
 
       -->| data1  = <!--
 
         -->{{#arrayprint: skilllineary | ,&nbsp; | $theskill$ | <!--
 
         -->{{#arrayprint: skilllineary | ,&nbsp; | $theskill$ | <!--
Line 85: Line 89:
 
             -->{{#hashreset: theskillhash}}<!--
 
             -->{{#hashreset: theskillhash}}<!--
 
         -->}}<!--
 
         -->}}<!--
      -->| labelclass1 = label <!--
 
      -->| dataclass1  = {{#var: skillClass }} <!--
 
 
       -->}}<!--
 
       -->}}<!--
 
   -->}}<!--
 
   -->}}<!--
Line 94: Line 96:
 
-->{{#hashreset: skillhash | skillmarkerhash | classhash }}<!--
 
-->{{#hashreset: skillhash | skillmarkerhash | classhash }}<!--
 
-->{{#arrayreset: skilltypearray, skilllevelarray, skilllevelsreverse, skillhashkeys }}<!--
 
-->{{#arrayreset: skilltypearray, skilllevelarray, skilllevelsreverse, skillhashkeys }}<!--
 +
 +
-->{{#tag:pre|ending skill section}}<!--
  
 
--></onlyinclude>
 
--></onlyinclude>
 
|}
 
|}

Revision as of 07:27, 4 April 2011

Draw a section in a character sheet for skills. This template is unforgiving: all of its parameters are required (but may be empty).

Starting skill section
skillhash: 

Skills