From GamingWiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Documentation}}<!--
 
{{Documentation}}<!--
  
-->{{#if: {{#vardefineecho: debug | }} | debug mode enabled <br />}}<!--
+
-->{{#if: {{#vardefineecho: debug | }} | debug mode enabled <br />}}<!--
  
 
-->{{#vardefine: cols | {{{columns|6}}} }}<!--
 
-->{{#vardefine: cols | {{{columns|6}}} }}<!--
Line 31: Line 31:
 
   * Level: skill level, i.e, untrained, trained, focused or specialized
 
   * Level: skill level, i.e, untrained, trained, focused or specialized
  
-->{{#vardefine:modeGood|{{{mode good|Banter}}}}}<!--
+
-->{{#vardefine:modeGood|{{{skill mode good|Banter}}}}}<!--
-->{{#vardefine:modeFair|{{{mode fair|Space}}}}}<!--
+
-->{{#vardefine:modeFair|{{{skill mode fair|Space}}}}}<!--
-->{{#vardefine:modeAverage|{{{mode average|Action}}}}}<!--
+
-->{{#vardefine:modeAverage|{{{skill mode average|Action}}}}}<!--
 +
 
 +
--><includeonly><!--
 +
  -->{{#set:
 +
      | has good skill mode = {{#var:modeGood}}
 +
      | has fair skill mode = {{#var:modeFair}}
 +
      | has average skill mode = {{#var:modeAverage}}
 +
      }}<!--
 +
--></includeonly><!--
  
 
-->{{#if: {{#var: debug}} |
 
-->{{#if: {{#var: debug}} |
Line 100: Line 108:
 
   '''debug''' skillHash: {{#hashprint: skillHash | | <skillname> | <skillmodes> | <skillname>=<skillmodes><br/>}}
 
   '''debug''' skillHash: {{#hashprint: skillHash | | <skillname> | <skillmodes> | <skillname>=<skillmodes><br/>}}
 
}}<!--
 
}}<!--
 +
 +
 +
  Apply skill point bumps
 +
  @todo: The next step is to apply spent skill points. We'll do some error-checking here.
 +
 +
-->{{#vardefine:skillPointsUsed|0}}<!--
 +
-->{{#vardefine:pointBuy|point buy}}<!--
 +
 +
-->{{#vardefine: skillBumps | {{{skill bump|}}} }}<!--
 +
 +
--></onlyinclude><!--
 +
-->{{#vardefine: skillBumps | Gunnery, Gunnery, Will, Notice, Fight, Notice }}<!--
 +
--><onlyinclude><!--
 +
 +
-->{{#arraydefine: skillBumpArray | {{#var:skillBumps}} }}<!--
 +
-->{{#arrayprint: skillBumpArray ||<skill>|<!--
 +
      -->{{#hashinclude: skillHash | <skill> = {{#hashvalue: skillHash | <skill>}}<MANY>{{#var:pointBuy}} }}<!--
 +
-->}}<!--
  
 
-->{{#arraydefine: skillArray | {{#hashprint: skillHash |,| <skillname> | <skillmodes> | <skillname><PROP><skillmodes>}} }}<!--
 
-->{{#arraydefine: skillArray | {{#hashprint: skillHash |,| <skillname> | <skillmodes> | <skillname><PROP><skillmodes>}} }}<!--
Line 120: Line 146:
 
   '''debug''' currentSkillName: {{#var: currentSkillName }}
 
   '''debug''' currentSkillName: {{#var: currentSkillName }}
 
}}<!--
 
}}<!--
 +
 
       First we create an array containing all the modes the current skill  
 
       First we create an array containing all the modes the current skill  
 
       belongs to. Then we use that array as a filter so we end up with the  
 
       belongs to. Then we use that array as a filter so we end up with the  
Line 139: Line 166:
 
       highest-ranked mode for this skill.
 
       highest-ranked mode for this skill.
 
   -->{{#vardefine: currentSkillPrimaryMode | {{#arrayindex: currentSkillModes | -1 }} }}<!--
 
   -->{{#vardefine: currentSkillPrimaryMode | {{#arrayindex: currentSkillModes | -1 }} }}<!--
   -->{{#vardefine: currentSkillLevel      | {{#arrayindex: levelArray | {{#arraysize: currentSkillModes}} }} }}<!--
+
  -->{{#vardefine: synergySkillLevel      | {{#arraysize: currentSkillModes}} }}<!--
 +
  -->{{#vardefine: totalSkillLevel        | {{#arraysize: currentSkillAllModes}} }}<!--
 +
  -->{{#ifexpr: {{#var: totalSkillLevel}} > 3 | {{#vardefine: totalSkillLevel | 3}} }}<!--
 +
  -->{{#vardefine: pointBuyBumps          | {{#expr: {{#var:totalSkillLevel}} - {{#var:synergySkillLevel}} }} }}<!--
 +
  -->{{#vardefine: pointsSpent            | {{#expr: {{#var:synergySkillLevel}} * {{#var:pointBuyBumps}} + {{#var:pointBuyBumps}} * ( {{#var:pointBuyBumps}} - 1 ) / 2 }} }}<!--
 +
  -->{{#vardefine: skillPointsUsed        | {{#expr: {{#var:skillPointsUsed}} + {{#var:pointsSpent}} }} }}<!--
 +
   -->{{#vardefine: currentSkillLevel      | {{#arrayindex: levelArray | {{#var: totalSkillLevel}} }} }}<!--
  
 
       Hash of all the levels of the primary mode, keyed by level name. We're  
 
       Hash of all the levels of the primary mode, keyed by level name. We're  
Line 147: Line 180:
 
-->{{#if: {{#var: debug}} |<nowiki />
 
-->{{#if: {{#var: debug}} |<nowiki />
 
   '''debug''' currentSkillPrimaryMode: {{#var: currentSkillPrimaryMode }}
 
   '''debug''' currentSkillPrimaryMode: {{#var: currentSkillPrimaryMode }}
 +
  '''debug''' synergySkillLevel: {{#var: synergySkillLevel }}
 +
  '''debug''' totalSkillLevel: {{#var: totalSkillLevel }}
 +
  '''debug''' pointBuyBumps: {{#var: pointBuyBumps }}
 +
  '''debug''' pointsSpent: {{#var: pointsSpent }}
 +
  '''debug''' skillPointsUsed: {{#var: skillPointsUsed }}
 +
  '''debug''' currentSkillLevel: {{#var: currentSkillLevel }}
 
   '''debug''' levelsOfPrimaryMode: {{#hashprint: levelsOfPrimaryMode | <br/> | <level> | <skills> | <level> = <skills> }}
 
   '''debug''' levelsOfPrimaryMode: {{#hashprint: levelsOfPrimaryMode | <br/> | <level> | <skills> | <level> = <skills> }}
 
}}<!--
 
}}<!--
Line 173: Line 212:
  
 
-->{{#if: {{#var: debug}} |<nowiki />
 
-->{{#if: {{#var: debug}} |<nowiki />
 +
 
   modeHash: {{#hashprint: modeHash | | <modename> | <levels> | <br/> <modename> = <levels> }}
 
   modeHash: {{#hashprint: modeHash | | <modename> | <levels> | <br/> <modename> = <levels> }}
 
}}<!--
 
}}<!--
  
 
  @todo: The next step is to apply spent skill points. We'll do some error-checking here.
 
  
  
Line 224: Line 262:
 
-->{{#if: {{#var: debug}} |<nowiki />
 
-->{{#if: {{#var: debug}} |<nowiki />
  
 +
  currentModeName: {{#var: currentModeName}}
 
   currentLevel: {{#var: currentLevel }}
 
   currentLevel: {{#var: currentLevel }}
 
}}<!--
 
}}<!--
Line 245: Line 284:
 
             -->{{#arraydefine: levelSkillsPrintable | <!--
 
             -->{{#arraydefine: levelSkillsPrintable | <!--
 
               -->{{#arrayprint: levelSkills | , | <skillname> | <!--
 
               -->{{#arrayprint: levelSkills | , | <skillname> | <!--
                   -->{{#arraydefine: currentSkillAllModes | {{#hashvalue: skillHash | <skillname> }} | <MANY> }}<!--
+
                   -->{{#arraydefine: currentSkillAllModes | {{#hashvalue: skillHash | <skillname> }} | <MANY> | unique }}<!--
 
                   -->{{#ifeq: {{#arraysize: currentSkillAllModes}} | 1 <!--
 
                   -->{{#ifeq: {{#arraysize: currentSkillAllModes}} | 1 <!--
 
                     -->| <skillname> <!--
 
                     -->| <skillname> <!--
 
                     -->| <abbr title="{{#arrayprint:currentSkillAllModes}}"><skillname></abbr> <!--
 
                     -->| <abbr title="{{#arrayprint:currentSkillAllModes}}"><skillname></abbr> <!--
 
                   -->}}<!--
 
                   -->}}<!--
 +
                  --><includeonly><!--
 +
                    -->{{#set: has {{#var: currentLevel }} skill = <skillname> }}<!--
 +
                  --></includeonly><!--
 
               -->}}<!--
 
               -->}}<!--
 
             -->}}<!--
 
             -->}}<!--
Line 286: Line 328:
 
   Print the section footer. This contains a summary of advancement points available and spent.
 
   Print the section footer. This contains a summary of advancement points available and spent.
  
-->{{#vardefine:skillsused|0}}<!--
+
-->{{#vardefine:skillsAllowed|7}}<!--
-->{{#vardefine:skillsallowed|7}}<!--
 
 
-->{{Character sheet/section  
 
-->{{Character sheet/section  
 
| columns  = {{#var:cols}}
 
| columns  = {{#var:cols}}
| llabel1  = Points used  | ldata1    = {{#var:skillsused}}
+
| llabel1  = bonus points  | ldata1    = {{#var:skillsAllowed}}
| label1    = remaining    | data1    = {{#expr: {{#var:skillsallowed}} - {{#var:skillsused}} }}
+
| label1    = used          | data1    = {{#var:skillPointsUsed}}
| rlabel1  = total        | rdata1    = {{#var:skillsallowed}}
+
| rlabel1  = remaining    | rdata1    = {{#expr: {{#var:skillsAllowed}} - {{#var:skillPointsUsed}} }}
 
}}<!-- end section  
 
}}<!-- end section  
 
-->}}<!-- end if
 
-->}}<!-- end if

Latest revision as of 02:36, 29 July 2014

[create]
Error creating thumbnail: File missing
Template documentation

Skill modes
  Banter Space Action
Superb (+5) Gunnery, Notice    
Great (+4) Fight, Will    
Good (+3)      
Fair (+2)      
Average (+1)      
bonus points 7 used -4 remaining 11