From GamingWiki
Line 1: | Line 1: | ||
{{Documentation}}<!-- | {{Documentation}}<!-- | ||
− | -->{{#if: {{#vardefineecho: debug | | + | -->{{#if: {{#vardefineecho: debug | }} | debug mode enabled <br />}}<!-- |
-->{{#vardefine: cols | {{{columns|6}}} }}<!-- | -->{{#vardefine: cols | {{{columns|6}}} }}<!-- | ||
Line 100: | Line 100: | ||
'''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}}<!-- | ||
+ | |||
+ | --></onlyinclude><!-- | ||
+ | -->{{#hashinclude: skillHash | Gunnery = {{#hashvalue: skillHash | Gunnery}}<MANY>{{#var:pointBuy}}<MANY>{{#var:pointBuy}} }}<!-- | ||
+ | -->{{#hashinclude: skillHash | Provoke = {{#hashvalue: skillHash | Provoke}}<MANY>{{#var:pointBuy}}<MANY>{{#var:pointBuy}} }}<!-- | ||
+ | -->{{#hashinclude: skillHash | Fight = {{#hashvalue: skillHash | Fight}}<MANY>{{#var:pointBuy}} }}<!-- | ||
+ | --><onlyinclude><!-- | ||
+ | |||
-->{{#arraydefine: skillArray | {{#hashprint: skillHash |,| <skillname> | <skillmodes> | <skillname><PROP><skillmodes>}} }}<!-- | -->{{#arraydefine: skillArray | {{#hashprint: skillHash |,| <skillname> | <skillmodes> | <skillname><PROP><skillmodes>}} }}<!-- | ||
Line 120: | Line 134: | ||
'''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 154: | ||
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 | {{# | + | -->{{#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 168: | ||
-->{{#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 176: | Line 203: | ||
}}<!-- | }}<!-- | ||
− | |||
− | |||
Line 245: | Line 270: | ||
-->{{#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> <!-- | ||
Line 286: | Line 311: | ||
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: | + | -->{{#vardefine:skillsAllowed|7}}<!-- |
− | |||
-->{{Character sheet/section | -->{{Character sheet/section | ||
| columns = {{#var:cols}} | | columns = {{#var:cols}} | ||
− | | llabel1 = | + | | llabel1 = bonus points | ldata1 = {{#var:skillsAllowed}} |
− | | label1 = | + | | label1 = used | data1 = {{#var:skillPointsUsed}} |
− | | rlabel1 = | + | | rlabel1 = remaining | rdata1 = {{#expr: {{#var:skillsAllowed}} - {{#var:skillPointsUsed}} }} |
}}<!-- end section | }}<!-- end section | ||
-->}}<!-- end if | -->}}<!-- end if |
Revision as of 21:47, 27 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. |
Skill modes | |||||
Banter | Space | Action | |||
Superb (+5) | Gunnery, Provoke | ||||
Great (+4) | Fight | ||||
Good (+3) | |||||
Fair (+2) | |||||
Average (+1) | |||||
bonus points | 7 | used | -2 | remaining | 9 |