From GamingWiki
Jump to: navigation, search
 
(146 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Documentation}}</noinclude>
+
<!--
{| class="infobox floatright"
+
 
! colspan="4" | {{{charactername}}} <!--
+
  @todo more sub-templates, like the skill block one
-->{{#if: {{{campaign<includeonly>|</includeonly>}}}{{{player<includeonly>|</includeonly>}}}|<div class="infobox diaspora campaign"><!--
 
  --> {{#if: {{{campaign<includeonly>|</includeonly>}}}| {{{campaign}}} }} <!--
 
  --> {{#if: {{{player<includeonly>|</includeonly>}}}| ({{{player}}}) }} <!--
 
--></div>}}<!--
 
-->
 
|-<!--
 
  
Sections at the top of the sheet, such as High Concept and Trouble, in DFRPG.
+
--><onlyinclude><!--
  
-->{{#vardefine: topsectnum | 1}}<!--
+
-->{{#parameterstohash: paramsHash}}<!--
-->{{#while: | <!-- want one of the following to be nonempty:
 
  -->{{{topheader{{#var: topsectnum}}|}}}<!--
 
  -->{{{toplabel{{#var: topsectnum}}|}}}<!--
 
  -->{{{topdata{{#var: topsectnum}}|}}}<!--
 
-->|<!--
 
  -->{{#if:{{{topheader{{#var: topsectnum}}|}}}|<!--
 
    Draw a header
 
  --><nowiki />
 
{{!}}-
 
{{!}} colspan="4" class="subhead" {{!}} {{{topheader{{#var: topsectnum}}|}}} <!--
 
  -->|<!-- if no header
 
    --><nowiki />
 
{{!}}-
 
{{!}} class="shaded" {{!}} {{{toplabel{{#var: topsectnum}}|}}}
 
{{!}} colspan="3"    {{!}} {{{topdata{{#var: topsectnum}}|}}}
 
    <!--
 
  -->}}<!-- end if
 
  -->{{#vardefine: topsectnum | {{#expr: {{#var: topsectnum}} + 1}} }}<!--
 
-->}}<!-- end while
 
  
  End top sections
+
-->{{#vardefine:cols  |{{{columns|6}}}}}<!--
 +
-->{{#vardefine:cols_l|{{#expr: ceil( {{#var: cols}} / 2 ) }} }}<!--
 +
-->{{#vardefine:cols_r|{{#expr: ( {{#var: cols}} - {{#var: cols_l}} ) }} }}<!--
  
-->
+
-->{{#vardefine:contentcols  |{{#expr: ( {{#var: cols  }} - 1 ) }} }}<!--
|-
+
-->{{#vardefine:contentcols_l|{{#expr: ( {{#var: cols_l}} - 1 ) }} }}<!--
| class="subhead" colspan="4" | Aspects
+
-->{{#vardefine:contentcols_r|{{#expr: ( {{#var: cols_r}} - 1 ) }} }}<!--
|-
 
| class="shaded" |
 
| colspan="3" | {{
 
#if: {{{image|}}} | [[Image:{{{image}}}{{!}}thumb{{!}}{{{caption|}}}]]
 
}}{{Array Map | array = {{{aspects}}} | before = <nowiki />
 
* <span class="aspect"> | after = </span> }} <!--
 
  
  SKILLS
+
-->{{#vardefine:name|{{{charactername| {{{character name| {{{name}}} }}} }}} }}<!--
 +
-->{{#vardefine:campaign|{{{campaign<includeonly>|</includeonly>}}} }}<!--
  
 
-->
 
-->
|-
+
{| class="infobox floatright {{{tableclass|}}}"
| class="subhead" | Skills
+
! colspan="{{#var:cols}}" | {{#var:name}} <!--
| colspan="3" class="shaded" | <!--
+
--><div class="campaign"><!--
 +
  --> {{#if: {{#var:campaign}}| [[{{#var:campaign}}]] }} <!--
 +
  --> {{#if: {{{player|}}}|([[User:{{{player}}}|{{{player}}}]]) }} <!--
 +
--></div>
 +
|-<!--
  
Define the types of skills available. These each have their own class, too.
+
Sections at the top of the sheet, such as High Concept and Trouble.  
  
-->{{#vardefine: skillClass  | {{{skillclass|skill}}} }}<!--
+
-->{{#hashdefine: topsectionhash }}<!--
-->{{#vardefine: skillClskey | {{#replace: {{#var: skillClass}} ||-}} }}<!--
+
-->{{#forargs: top | keynum | value | <!--
-->{{#vardefine: stidx      | 0 }}<!--
+
    We have arguments like "toplabel2 = My Label", which we split into the
-->{{#while: <!--
+
    key-number pair "keynum", in this case "label2", and the value. We want
  -->| {{#vardefineecho: skilltype | {{#explode: {{{skilltypes|combat track}}} | | {{#var: stidx}} }} }}<!-- end vardefineecho
+
    to further split this up so we get the key and the number separately.
  -->| {{#vardefine: {{#var:skilltype}}Class | {{#var:skilltype}} }}<!--
+
  -->{{#hashreset: singlesection}}<!--
    -->{{#ifeq:{{#var:stidx}}|0|types: |, }} <!--
+
  -->{{#vardefine: key | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $1 }}}}<!--
    --><span class="{{#var: skillClass}} {{#var: {{#var:skilltype}}Class}}">{{#var:skilltype}}</span><!--
+
  -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }}}}<!--
    -->{{#vardefine: stidx | {{#expr: {{#var: stidx}} + 1}} }}<!--
+
  -->{{#hashdefine: singlesection | {{#hashvalue: topsectionhash | {{#var:num}} }} | ,sec, | ;sec; }}<!--
-->}}<!-- end while -->
+
  -->{{#hashinclude: singlesection | {{#var:key}} = {{#var:value}} }}<!--
|-
+
  -->{{#if: {{#var: num}} | <!--
<!--
+
      -->{{#hashinclude: topsectionhash | <!--
 
+
        --> {{#var:num}} = {{#hashprint: singlesection | ,sec, | %%%% | @@@@ | %%%%;sec;@@@@ }} <!--
We may have custom skill ranks.
+
      -->}}<!--
 
+
  -->}}<!--
-->{{#vardefine: skillLevel  | {{{skillranks| Average Decent Good Great Superb }}} }}<!--
+
-->}}<!--
-->{{#vardefine: numSkLvl    | 0 }}<!--
+
  Now each value of topsectionhash can be parsed into a new hash:
-->{{#while: | {{#explode: {{#var:skillLevel}} | | {{#var:numSkLvl}} }} | <!--
+
-->{{#hashprint: topsectionhash || %%%% | @@@@ | <!--
  -->{{#vardefine: numSkLvl | {{#expr: {{#var:numSkLvl}} + 1}} }}<!--
+
  -->{{#hashdefine: thetopsection | @@@@ | ,sec, | ;sec; }}<!--
 +
  -->{{Character sheet/section | columns = {{#var:cols}} <!--
 +
      -->| llabel1 = {{#hashvalue: thetopsection | llabel }} <!--
 +
      -->| ldata1  = {{#hashvalue: thetopsection | ldata  }} <!--
 +
      -->| label1  = {{#hashvalue: thetopsection | label }} <!--
 +
      -->| data1  = {{#hashvalue: thetopsection | data }} <!--
 +
      -->| rlabel1 = {{#hashvalue: thetopsection | rlabel }} <!--
 +
      -->| rdata1  = {{#hashvalue: thetopsection | rdata  }} <!--
 +
  -->}}<!--
 
-->}}<!--
 
-->}}<!--
-->{{#vardefine: slidx      | {{#var:numSkLvl}} }}<!--
 
  
   Iterate over all defined skill levels, from highest to lowest:
+
   End top sections
-->{{#while: | <!-- while skill level
 
  -->{{#ifeq: {{#var:slidx}} | 0 | | 1 }}<!-- not yet zero
 
-->|<!--
 
  
We either have a long section of skills, or one entry per level.
+
-->
  -->{{#if: {{{skills|}}} <!--
+
|- <!--
  
   -->|<!-- One 'skills' section.
+
   ASPECTS
  Lines are listed in descending order of skill. Each line is of the form:
+
-->{{#hashtotemplate: {{{aspect section template | Character sheet/FATE/Aspect section}}} | paramsHash }}<!--
;; SkillName//OpType//OpModifier :: SkillName//OpType//OpModifier ...
 
  where SkillName is just what it says, OpType is an optional type to the
 
  skill (such as 'combat' or 'track' and OpModifier is an optional modifier
 
  such as 'MG'.
 
  Note: we assume that no skill lines are missing.
 
  
    Skill row:
+
  SKILLS
    -->{{#vardefine: skillrow | {{#explode:{{{skills|}}}|;;| {{#expr: -{{#var: slidx}}}} }} }}<!--
+
-->{{#hashtotemplate: {{{skill section template | Character sheet/FATE/Skill section}}} | paramsHash }}<!--
 
 
  -->|<!-- multiple sections: 'skills1', 'skills2', etc.
 
  There are several parameters: skills1, skill2, and so on. Each corresponds
 
  to a single skill rank, and each is of the form:
 
skillN = SkillName//OpType//OpModifier :: SkillName//OpType//OpModifier ...
 
  as in the previous form. We no longer assume that all skill lines are
 
  present; gaps may be left if desired.
 
  
    Skill row:
+
   STUNTS
    -->{{#vardefine: skillrow | {{{skills{{#var: slidx}}|}}} }}<!--
+
-->{{#hashtotemplate: {{{stunt section template | Character sheet/FATE/Stunt section}}} | paramsHash }}<!--
 
 
   -->}}<!-- end skills conditional
 
 
 
  TODO: allow for skills starting at +0?
 
 
 
  -->{{#vardefine: slidx | {{#expr: {{#var: slidx}} - 1}} }}<!--
 
    Skill level name:
 
  -->{{#vardefine: thelevel | {{#explode: {{#var: skillLevel}} | | {{#var: slidx}} }} }}<!--
 
 
 
    Get the right skill row, if it exists:
 
  -->{{#if:{{#var: skillrow}}<!--
 
  -->|<!-- There are skills defined at this level
 
    --><nowiki />
 
{{!}} class="label" {{!}} {{#var: thelevel}} (+{{#expr: {{#var: slidx}} + 1}})
 
{{!}} colspan="3" {{!}} <!--
 
    -->{{#vardefine: skidx      | 0 }}<!--
 
    -->{{#while: | <!-- while skill
 
      -->{{#vardefineecho: theskill | {{#explode:{{#var: skillrow}}|::| {{#var: skidx}} }} }}<!--
 
    -->|<!--
 
      -->{{#vardefine: skillname | {{#explode: {{#var: theskill}} |//| 0 }} }}<!--
 
      -->{{#vardefine: skillkey  | {{#replace: {{lc:{{#var: skillname}}}} ||-}} }}<!--
 
      -->{{#vardefine: skilltype | {{#explode: {{#var: theskill}} |//| 1 }} }}<!--
 
 
 
      -->{{#ifeq: {{ #var: skidx }} | 0 ||, }} <span class="{{#var: skillClass }}"><!--
 
      --><span class="{{#var: {{#var: skilltype}}Class }} {{#var: skillClskey }}-{{#var:skillkey}}"><!--
 
      -->{{#var: skillname | _____ }}<!--
 
      --></span> <!--
 
 
 
        Look for skill markers:
 
      -->{{#vardefine: smidx | 0 }}<!--
 
      -->{{#while: | <!-- while skill marker
 
        -->{{#vardefineecho: marker | {{#explode: {{{skillmarkers}}} | ;; | {{#var: smidx}} }} }}<!--
 
      -->|<!--
 
        -->{{#vardefine: markertag | {{#explode: {{#var: marker}} | // | 0 }} }}<!--
 
        -->{{#vardefine: markerHTML | {{#explode: {{#var: marker}} | // | 1 }} }}<!--
 
        -->{{#ifeq: {{#explode:{{#var: theskill}}|//| 2 }} | {{#var: markertag}} |{{#var: markerHTML}} }}<!--
 
        -->{{#vardefine: smidx | {{#expr: {{#var: smidx}} + 1}} }}<!--
 
      -->}}<!-- end while marker
 
      --></span> <!--
 
 
 
      -->{{#vardefine: skidx | {{#expr: {{#var: skidx}} + 1}} }}<!--
 
    -->}}<!-- end while skill -->
 
{{!}}-<!--
 
  -->}}<!-- end if skills exist at this level
 
-->}}<!-- end while skill level
 
 
 
Stunts section
 
 
 
-->
 
| colspan="4" class="subhead" | Stunts
 
|-
 
<!--
 
-->{{#vardefine: stidx | 1 }}<!--
 
-->{{#while: | <!-- loop over 'stunts' array
 
  -->{{#vardefineecho: thestunt | {{#explode:{{{stunts|}}}|;;| {{#var: stidx}} }} }}<!--
 
-->|<!--
 
  -->{{#vardefine: stidx | {{#expr: {{ #var: stidx }} + 1}} }}<!--
 
  --><nowiki />
 
{{!}} class="label" {{!}} <!--
 
  If there is some qualifier to the stunt, we do two columns for
 
  the stunt name and one for the qualifier. Otherwise, three for
 
  the stunt name.
 
  -->{{#if: {{#vardefineecho: stuntmod |{{#explode:{{#var: thestunt}}|//| 1 }} }}<!--
 
  -->|<!-- The stunt has a modifier
 
  --><nowiki/>
 
{{!}} colspan="2" {{!}} {{#explode:{{#var: thestunt}}|//| 0 }}
 
{{!}} {{#rmatch: {{#var: stuntmod}} |^\s*(\-?\d+)\s*$| [\1] | ({{#var: stuntmod}}) }}<!--
 
  -->|<!-- The stunt has no modifier
 
  --><nowiki/>
 
{{!}} colspan="3" {{!}} {{#var: thestunt}} <!--
 
  -->}}<!-- End stunt modifier detection --><nowiki />
 
{{!}}- <!--
 
-->}}<!-- end while stunts
 
 
 
| colspan="4" class="subhead" | Stunts
 
|-
 
| class="shaded" |
 
| colspan="3" | {{Array Map | array={{{stunts|;;none}}} | before=<nowiki />
 
* }} --><!--
 
  
 
Extra sections
 
Extra sections
Line 191: Line 80:
 
   -->{{{data{{#var: sectnum}}|}}}<!--
 
   -->{{{data{{#var: sectnum}}|}}}<!--
 
-->|<!--
 
-->|<!--
   -->{{#if:{{{header{{#var: sectnum}}|}}}|<!--
+
   -->{{#if:{{#vardefineecho:sectheader|{{{header{{#var: sectnum}}|}}}}}|<!--
    Draw a header
+
        Draw a header
  --><nowiki />
+
    -->{{Character sheet/section subhead |{{#var:sectheader}}g| columns = {{#var:cols}} }}<!--
{{!}}-
+
    --><!--{{Character sheet/section | columns = {{#var:cols}} --><!--
{{!}} colspan="4" class="subhead" {{!}} {{{header{{#var: sectnum}}|}}} <!--
+
        --><!--| header1 = {{{header{{#var: sectnum}}|}}} --><!--
 +
    --><!--}}--><!--
 
   -->|<!-- if no header
 
   -->|<!-- if no header
    --><nowiki />
+
    -->{{Character sheet/section | columns = {{#var:cols}} <!--
{{!}}-
+
        -->| label1 = {{{label{{#var: sectnum}}|}}}h <!--
{{!}} class="shaded" {{!}} {{{label{{#var: sectnum}}|}}}
+
        -->| data1  = {{{data{{#var: sectnum}}|}}}j <!--
{{!}} colspan="3"    {{!}} {{{data{{#var: sectnum}}|}}}
+
    -->}}<!--
    <!--
 
 
   -->}}<!-- end if
 
   -->}}<!-- end if
 
   -->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!--
 
   -->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!--
Line 211: Line 100:
 
-->{{#vardefine: refresh        | {{#if:{{{refresh|}}}|{{{refresh}}}|{{#var:defaultrefresh}} }} }}<!--
 
-->{{#vardefine: refresh        | {{#if:{{{refresh|}}}|{{{refresh}}}|{{#var:defaultrefresh}} }} }}<!--
 
-->{{#vardefine: fp            | {{#if:{{{fp|}}}|{{{fp}}}|{{#var:refresh}} }} }}<!--
 
-->{{#vardefine: fp            | {{#if:{{{fp|}}}|{{{fp}}}|{{#var:refresh}} }} }}<!--
--><nowiki />
+
    -->{{Character sheet/section | columns = {{#var:cols}} <!--
|-
+
        -->| llabel1  = FP <!--
| class="shaded" | FP     || {{#var:fp}}
+
        -->| ldata1  = {{#var: fp}} <!--
| class="shaded" | Refresh || {{#var:refresh}}
+
        -->| label1 = Refresh <!--
<!--
+
        -->| data1  = {{#var: refresh}} <!--
 +
    -->}}<!--
  
Stress tracks
+
  STRESS AND CONSEQUENCES
 +
-->{{#hashtotemplate: {{{stress section template | Character sheet/FATE/Stress and Consequences section}}} | paramsHash }}<!--
  
-->
+
  FOOTER
|-
 
| colspan="4" class="subhead" | Stress Tracks <!--
 
  
-->{{#vardefine: defaultstress | {{{defaultstress|5}}} }}<!--
+
--><nowiki/>
-->
 
 
|-
 
|-
| colspan="4" align="center" | <!--
+
| colspan="{{#var:cols}}" | {{navbar|{{{template name|Character sheet/FATE}}}|mini=1}}  
-->{{#vardefine: stidx | 0 }}<!--
+
|}<!--
-->{{#while: | <!-- stress tracks
 
  -->{{#vardefineecho: trackname | {{#explode: {{{stresstracks|health composure}}} | | {{#var:stidx}} }} }}<!--
 
-->|<!--
 
  -->{{#vardefine:thestress | {{{{{#var: trackname}}|{{#var:defaultstress}}//0}}} }}<!--
 
  -->{{#vardefine:totstress | {{#explode:{{#var: thestress}}|//|0}} }}<!--
 
  -->{{#vardefine:curstress | {{#explode:{{#var: thestress}}|//|1}} }}<!--
 
  
  --><table class="fate stressbox"><tr><th colspan="{{#var:totstress}}">{{#var: trackname}}</th></tr><!--
 
  --><tr>{{#loop: stressloop | 1 | {{#var:totstress}} | <!--
 
    --><td class="{{#ifexpr: {{#var: stressloop}} <= {{#var:curstress|0}} | full }}"><div>&nbsp;</div></td><!--
 
  -->}}</tr><!--
 
  --></table><!--
 
  
  -->{{#vardefine: stidx | {{#expr: {{#var: stidx}} + 1}} }}<!--
 
-->}}<!-- end while stress tracks
 
  
List of current consequences
+
--><includeonly><!--
  
-->
+
   Semantic MediaWiki keys and categories for any *page* using this template
|-
 
| colspan="4" class="subhead" | Consequences <!--
 
-->{{#vardefine: ctidx | 0 }}<!--
 
-->{{#while: | <!-- consequence types
 
   -->{{#vardefineecho: severity | {{#explode: {{{consequencetypes|mild moderate severe}}} | | {{#var:ctidx}} }} }}<!--
 
-->|<nowiki />
 
{{!}}-
 
{{!}} class="label" {{!}} {{#var: severity}}
 
{{!}} colspan="3"  {{!}} <!--
 
  -->{{#vardefine: conidx | 0 }}<!--
 
  -->{{#vardefine: cons | 0 }}<!--
 
  -->{{#while: | <!-- consequences
 
    -->{{#vardefineecho: consequence | {{#explode: {{{consequences|}}} | :: | {{#var:conidx}} }} }}<!--
 
  -->|<!--
 
    -->{{#ifeq: {{#explode: {{#var:consequence}} |//| 1}}| {{#var: severity}} |<!--
 
      -->{{#ifeq: {{ #var: cons }} | 1 |,&nbsp; }}<!--
 
      -->{{aspect |{{#explode: {{#var:consequence}} |//| 0}}}}<!--
 
      -->{{#vardefine: cons | 1 }}<!--
 
    -->}}<!-- end ifeq
 
    -->{{#vardefine: conidx | {{#expr: {{#var: conidx}} + 1}} }}<!--
 
  -->}}<!-- end while consequences
 
  -->{{#vardefine: ctidx | {{#expr: {{#var: ctidx}} + 1}} }}<!--
 
-->}}<!-- end while consequence types
 
  
-->
+
-->{{#set: campaign      = {{{campaign}}}      }}<!-- @todo: remove this
|}<includeonly><!--
+
-->{{#set: is in campaign = {{{campaign}}}      }}<!--
 +
-->{{#if:{{#var:name}}|{{#set: has name ={{#var:name}}}}}}<!--
 +
-->{{#if:{{{status|}}}|{{#set: has status ={{{status}}}}}}}<!--
 +
-->{{#ifeq:{{lc:{{{player}}}}} | npc <!--
 +
-->|<!--
 +
    -->{{#set: player        = NPC          | is a = NPC | NPC in campaign = {{#var:campaign}} }}<!--
 +
    -->[[Category: Non-player characters in {{#var:campaign}}]]<!--
 +
-->|<!--
 +
      player name is not "npc".
 +
  -->{{#if:{{{player|}}} <!--
 +
  -->|<!--
 +
      -->{{#set: player        = {{{player}}} | is a = PC  | PC in campaign = {{#var:campaign}}  }}<!--
 +
      -->[[Category: Player characters in {{#var:campaign}}]]<!--
 +
  -->|<!--
 +
      no player name set at all
 +
      -->[[Category: Characters in {{#var:campaign}}]]<!--
 +
  -->}}<!--
 +
-->}}<!--
 +
-->{{#if:{{{blurb|}}}        |{{#set: blurb          = {{{blurb}}}        }}}}<!--
  
  Semantic MediaWiki keys and category for any *page* using this template
+
  If we have relationships defined, save the information.
 +
-->{{#if: {{{relationships|}}} | <!--
 +
  -->{{#arraydefine: relationsarray | {{{relationships|}}} | ;; }}<!--
 +
  -->{{#arrayprint:  relationsarray | | @@@@ | <!--
 +
      -->{{#arraydefine: relationsfields | @@@@ | :: }}<!--
 +
      -->{{Relationship <!--
 +
        -->| {{#arrayindex: relationsfields | 1 }} <!--
 +
        -->| {{#arrayindex: relationsfields | 0 }} <!--
 +
      -->}}<!--
 +
  -->}}<!--
 +
-->}}<!--
  
-->[[Category:Character sheets]]<!--
+
--></includeonly><!--
 +
--></onlyinclude><!--
  
-->{{#if:{{{charactername|}}}|{{#set: character name = {{{charactername}}} }}}}<!--
 
-->{{#if:{{{player|}}}      |{{#set: player        = {{{player}}}        }}}}<!--
 
-->{{#if:{{{campaign|}}}    |{{#set: campaign      = {{{campaign}}}      }}}}<!--
 
-->{{#if:{{{blurb|}}}        |{{#set: blurb          = {{{blurb}}}        }}}}<!--
 
  
--></includeonly><!--
 
  
 
--><noinclude><!--
 
--><noinclude><!--
Line 293: Line 169:
 
-->{{#set: game system    = FATE            }}<!--
 
-->{{#set: game system    = FATE            }}<!--
 
-->{{#set: parent template = Template:Character_Sheet }}<!--
 
-->{{#set: parent template = Template:Character_Sheet }}<!--
 +
 +
-->{{Documentation}}<!--
  
 
--></noinclude><!--  
 
--></noinclude><!--  
  
 
-->
 
-->

Latest revision as of 17:39, 3 February 2016

{{{name}}}
[[{{{campaign}}}]]
Aspects
Skills
Stunts
FP 5 Refresh 5
health
 
 
 
 
 
composure
 
 
 
 
 
mild
moderate
severe

{{#set: game system = FATE }}{{#set: parent template = Template:Character_Sheet }}

[create]
Error creating thumbnail: File missing
Template documentation