From GamingWiki
Jump to: navigation, search
(Improved handling of FP and refresh)
 
(151 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Documentation}}</noinclude>
 
{| class="infobox floatright"
 
! colspan="4" | {{{charactername}}} <!--
 
-->{{#if: {{{campaign}}}| <div class="infobox diaspora campaign">{{{campaign}}}</div> }}<!--
 
-->
 
|-<!--
 
 
Sections at the top of the sheet, such as High Concept and Trouble, in DFRPG.
 
 
-->{{#vardefine: topsectnum | 1}}<!--
 
-->{{#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
 
 
-->
 
|-
 
| class="subhead" colspan="4" | Aspects
 
|-
 
| class="shaded" |
 
| colspan="3" | {{
 
#if: {{{image|}}} | [[Image:{{{image}}}{{!}}thumb{{!}}{{{caption|}}}]]
 
}}{{Array Map | array = {{{aspects}}} | before = <nowiki />
 
* <span class="aspect"> | after = </span> }}
 
|-
 
| class="subhead" | Skills
 
| colspan="3" class="shaded" | <!--
 
 
Define the types of skills available. These each have their own class, too.
 
 
-->{{#vardefine: skillClass  | {{{skillclass|skill}}} }}<!--
 
-->{{#vardefine: stidx      | 0 }}<!--
 
-->{{#while: <!--
 
  -->| {{#vardefineecho: skilltype | {{#explode: {{{skilltypes|combat track}}} | | {{#var: stidx}} }} }}<!-- end vardefineecho
 
  -->| {{#vardefine: {{#var:skilltype}}Class | {{#var:skilltype}} }}<!--
 
    -->{{#ifeq:{{#var:stidx}}|0|types: |, }} <!--
 
    --><span class="{{#var: skillClass}} {{#var: {{#var:skilltype}}Class}}">{{#var:skilltype}}</span><!--
 
    -->{{#vardefine: stidx | {{#expr: {{#var: stidx}} + 1}} }}<!--
 
-->}}<!-- end while -->
 
|-
 
 
<!--
 
<!--
  
We may have custom skill ranks.
+
  @todo more sub-templates, like the skill block one
  
-->{{#vardefine: skillLevel  | {{{skillranks| Average Decent Good Great Superb }}} }}<!--
+
--><onlyinclude><!--
-->{{#vardefine: numSkLvl    | 0 }}<!--
 
-->{{#while: | {{#explode: {{#var:skillLevel}} | | {{#var:numSkLvl}} }} | <!--
 
  -->{{#vardefine: numSkLvl  | {{#expr: {{#var:numSkLvl}} + 1}} }}<!--
 
-->}}<!--
 
-->{{#vardefine: slidx      | {{#var:numSkLvl}} }}<!--
 
  
  Iterate over all defined skill levels, from highest to lowest:
+
-->{{#parameterstohash: paramsHash}}<!--
-->{{#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.
+
-->{{#vardefine:cols  |{{{columns|6}}}}}<!--
  -->{{#if: {{{skills|}}} <!--
+
-->{{#vardefine:cols_l|{{#expr: ceil( {{#var: cols}} / 2 ) }} }}<!--
 +
-->{{#vardefine:cols_r|{{#expr: ( {{#var: cols}} - {{#var: cols_l}} ) }} }}<!--
  
  -->|<!-- One 'skills' section.
+
-->{{#vardefine:contentcols  |{{#expr: ( {{#var: cols  }} - 1 ) }} }}<!--
  Lines are listed in descending order of skill. Each line is of the form:
+
-->{{#vardefine:contentcols_l|{{#expr: ( {{#var: cols_l}} - 1 ) }} }}<!--
;; SkillName//OpType//OpModifier :: SkillName//OpType//OpModifier ...
+
-->{{#vardefine:contentcols_r|{{#expr: ( {{#var: cols_r}} - 1 ) }} }}<!--
  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:
+
-->{{#vardefine:name|{{{charactername| {{{character name| {{{name}}} }}} }}} }}<!--
    -->{{#vardefine: skillrow | {{#explode:{{{skills|}}}|;;| {{#expr: -{{#var: slidx}}}} }} }}<!--
+
-->{{#vardefine:campaign|{{{campaign<includeonly>|</includeonly>}}} }}<!--
  
  -->|<!-- multiple sections: 'skills1', 'skills2', etc.
+
-->
  There are several parameters: skills1, skill2, and so on. Each corresponds
+
{| class="infobox floatright {{{tableclass|}}}"
  to a single skill rank, and each is of the form:
+
! colspan="{{#var:cols}}" | {{#var:name}} <!--
skillN = SkillName//OpType//OpModifier :: SkillName//OpType//OpModifier ...
+
--><div class="campaign"><!--
  as in the previous form. We no longer assume that all skill lines are
+
  --> {{#if: {{#var:campaign}}| [[{{#var:campaign}}]] }} <!--
  present; gaps may be left if desired.
+
  --> {{#if: {{{player|}}}|([[User:{{{player}}}|{{{player}}}]]) }} <!--
 +
--></div>
 +
|-<!--
  
    Skill row:
+
Sections at the top of the sheet, such as High Concept and Trouble.
    -->{{#vardefine: skillrow | {{{skills{{#var: slidx}}|}}} }}<!--
 
  
   -->}}<!-- end skills conditional
+
-->{{#hashdefine: topsectionhash }}<!--
 +
-->{{#forargs: top | keynum | value | <!--
 +
    We have arguments like "toplabel2 = My Label", which we split into the
 +
    key-number pair "keynum", in this case "label2", and the value. We want
 +
    to further split this up so we get the key and the number separately.
 +
  -->{{#hashreset: singlesection}}<!--
 +
  -->{{#vardefine: key | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $1 }}}}<!--
 +
  -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }}}}<!--
 +
  -->{{#hashdefine: singlesection | {{#hashvalue: topsectionhash | {{#var:num}} }} | ,sec, | ;sec; }}<!--
 +
  -->{{#hashinclude: singlesection | {{#var:key}} = {{#var:value}} }}<!--
 +
  -->{{#if: {{#var: num}} | <!--
 +
      -->{{#hashinclude: topsectionhash | <!--
 +
        --> {{#var:num}} = {{#hashprint: singlesection | ,sec, | %%%% | @@@@ | %%%%;sec;@@@@ }} <!--
 +
      -->}}<!--
 +
  -->}}<!--
 +
-->}}<!--
 +
  Now each value of topsectionhash can be parsed into a new hash:
 +
-->{{#hashprint: topsectionhash || %%%% | @@@@ | <!--
 +
  -->{{#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  }} <!--
 +
  -->}}<!--
 +
-->}}<!--
  
  TODO: allow for skills starting at +0?
+
  End top sections
  
  -->{{#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 }} }}<!--
 
 
 
      -->{{#ifeq: {{ #var: skidx }} | 0 ||, }} <span class="{{#var: skillClass }}"><!--
 
      --><span class="{{#var: {{#explode:{{#var: theskill}}|//| 1 }}Class }}"><!--
 
      -->{{#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}} }}<!--
+
  ASPECTS
    -->}}<!-- end while skill -->
+
-->{{#hashtotemplate: {{{aspect section template | Character sheet/FATE/Aspect section}}} | paramsHash }}<!--
{{!}}-<!--
 
  -->}}<!-- end if skills exist at this level
 
-->}}<!-- end while skill level
 
  
Stunts section
+
  SKILLS
 
+
-->{{#hashtotemplate: {{{skill section template | Character sheet/FATE/Skill section}}} | paramsHash }}<!--
-->
 
| 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
+
  STUNTS
|-
+
-->{{#hashtotemplate: {{{stunt section template | Character sheet/FATE/Stunt section}}} | paramsHash }}<!--
| class="shaded" |
 
| colspan="3" | {{Array Map | array={{{stunts|;;none}}} | before=<nowiki />
 
* }} --><!--
 
  
 
Extra sections
 
Extra sections
Line 181: 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 199: Line 98:
  
 
-->{{#vardefine: defaultrefresh | {{{defaultrefresh|5}}} }}<!--
 
-->{{#vardefine: defaultrefresh | {{{defaultrefresh|5}}} }}<!--
-->{{#vardefine: refresh | {{{refresh|{{#var:defaultrefresh}}}}} }}<!--
+
-->{{#vardefine: refresh       | {{#if:{{{refresh|}}}|{{{refresh}}}|{{#var:defaultrefresh}} }} }}<!--
--><nowiki />
+
-->{{#vardefine: fp            | {{#if:{{{fp|}}}|{{{fp}}}|{{#var:refresh}} }} }}<!--
|-
+
    -->{{Character sheet/section | columns = {{#var:cols}} <!--
| class="shaded" | FP      || {{{fp|{{#var:refresh}}}}}
+
        -->| llabel1  = FP <!--
| class="shaded" | Refresh || {{#var:refresh}}
+
        -->| ldata1  = {{#var: fp}} <!--
<!--
+
        -->| 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 282: 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