From GamingWiki
Jump to: navigation, search
 
(85 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="campaign"><!--
+
 
   --> {{#if: {{{campaign<includeonly>|</includeonly>}}}| [[{{{campaign}}}]] <includeonly>[[Category: {{{campaign}}}]]</includeonly>}} <!--
+
--><onlyinclude><!--
   --> {{#if: {{{player<includeonly>|</includeonly>}}}|<!--
+
 
    --> ([[{{{player}}}]]) <!--
+
-->{{#parameterstohash: paramsHash}}<!--
  -->}} <!--
+
 
--></div>}}
+
-->{{#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 ) }} }}<!--
 +
-->{{#vardefine:contentcols_r|{{#expr: ( {{#var: cols_r}} - 1 ) }} }}<!--
 +
 
 +
-->{{#vardefine:name|{{{charactername| {{{character name| {{{name}}} }}} }}} }}<!--
 +
-->{{#vardefine:campaign|{{{campaign<includeonly>|</includeonly>}}} }}<!--
 +
 
 +
-->
 +
{| class="infobox floatright {{{tableclass|}}}"
 +
! colspan="{{#var:cols}}" | {{#var:name}} <!--
 +
--><div class="campaign"><!--
 +
   --> {{#if: {{#var:campaign}}| [[{{#var:campaign}}]] }} <!--
 +
   --> {{#if: {{{player|}}}|([[User:{{{player}}}|{{{player}}}]]) }} <!--
 +
--></div>
 
|-<!--
 
|-<!--
  
Sections at the top of the sheet, such as High Concept and Trouble, in DFRPG.  
+
Sections at the top of the sheet, such as High Concept and Trouble.  
  
 
-->{{#hashdefine: topsectionhash }}<!--
 
-->{{#hashdefine: topsectionhash }}<!--
 
-->{{#forargs: top | keynum | value | <!--
 
-->{{#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}}<!--
 
   -->{{#hashreset: singlesection}}<!--
 
   -->{{#vardefine: key | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $1 }}}}<!--
 
   -->{{#vardefine: key | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $1 }}}}<!--
 
   -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }}}}<!--
 
   -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }}}}<!--
   -->{{#hashdefine: singlesection | {{#hashvalue: topsectionhash | {{#var:num}} }} | , | ; }}<!--
+
   -->{{#hashdefine: singlesection | {{#hashvalue: topsectionhash | {{#var:num}} }} | ,sec, | ;sec; }}<!--
 
   -->{{#hashinclude: singlesection | {{#var:key}} = {{#var:value}} }}<!--
 
   -->{{#hashinclude: singlesection | {{#var:key}} = {{#var:value}} }}<!--
 
   -->{{#if: {{#var: num}} | <!--
 
   -->{{#if: {{#var: num}} | <!--
       -->{{#hashinclude: topsectionhash | {{#var:num}} = {{#hashprint: singlesection | , | %%%% | @@@@ | %%%%;@@@@ }} }}<!--
+
       -->{{#hashinclude: topsectionhash | <!--
 +
        --> {{#var:num}} = {{#hashprint: singlesection | ,sec, | %%%% | @@@@ | %%%%;sec;@@@@ }} <!--
 +
      -->}}<!--
 
   -->}}<!--
 
   -->}}<!--
 
-->}}<!--
 
-->}}<!--
 
   Now each value of topsectionhash can be parsed into a new hash:
 
   Now each value of topsectionhash can be parsed into a new hash:
 
-->{{#hashprint: topsectionhash || %%%% | @@@@ | <!--
 
-->{{#hashprint: topsectionhash || %%%% | @@@@ | <!--
   -->{{#hashdefine: thetopsection | @@@@ }}<!--
+
   -->{{#hashdefine: thetopsection | @@@@ | ,sec, | ;sec; }}<!--
   -->{{Character sheet/section <!--
+
   -->{{Character sheet/section | columns = {{#var:cols}} <!--
       -->| label1 = {{#hashvalue: thetopsection | label }} <!--
+
      -->| llabel1 = {{#hashvalue: thetopsection | llabel }} <!--
       -->| data1 = {{#hashvalue: thetopsection | data  }} <!--
+
      -->| ldata1  = {{#hashvalue: thetopsection | ldata  }} <!--
 +
       -->| label1 = {{#hashvalue: thetopsection | label }} <!--
 +
       -->| data1   = {{#hashvalue: thetopsection | data }} <!--
 +
      -->| rlabel1 = {{#hashvalue: thetopsection | rlabel }} <!--
 +
      -->| rdata1  = {{#hashvalue: thetopsection | rdata }} <!--
 
   -->}}<!--
 
   -->}}<!--
 
-->}}<!--
 
-->}}<!--
Line 38: Line 64:
  
 
   ASPECTS
 
   ASPECTS
 
+
-->{{#hashtotemplate: {{{aspect section template | Character sheet/FATE/Aspect section}}} | paramsHash }}<!--
-->{{Character sheet/section
 
| subhead  = Aspects
 
| label1    =
 
| data1    = <!--
 
-->{{#if: {{{image|}}} | [[Image:{{{image}}}{{!}}thumb{{!}}{{{caption|}}}]]}}<!--
 
-->{{#arraydefine: aspectsarray | {{{aspects}}} | ;; }}<!--
 
-->{{#arrayprint:  aspectsarray || @@@@ | <nowiki />
 
* <span class="aspect">@@@@</span> }}
 
}}<!-- end section --><!--
 
  
 
   SKILLS
 
   SKILLS
 
+
-->{{#hashtotemplate: {{{skill section template | Character sheet/FATE/Skill section}}} | paramsHash }}<!--
  Define the types of skills available. These each have their own class, too.
 
-->{{#vardefine:   skillClass    | {{{skillclass|skill}}} }}<!--
 
-->{{#arraydefine: skilltypearray | {{{skilltypes|combat track}}} | /\s+/ }}<!--
 
-->{{#arraytohash: classhash      | skilltypearray | skilltypearray }}<!--
 
 
 
  We may have custom skill ranks.
 
-->{{#arraydefine: skilllevelarray | <!--
 
  -->{{{skillranks| Average (+1) :: Decent (+2) :: Good (+3) :: Great (+4) :: Superb (+5) }}} | :: }}<!--
 
-->{{#arraymerge: skilllevelsreverse | skilllevelarray }}<!--
 
-->{{#arraysort:  skilllevelsreverse | reverse }}<!--
 
-->{{#vardefine:  numSkLvl    | {{#arraysize: skilllevelarray}} }}<!--
 
 
 
  There are various skill markers that may be defined -- these go into a hash.
 
-->{{#hashdefine: skillmarkerhash | {{{skillmarkers|}}} | ;; | :: }}<!--
 
 
 
  Use a hash to store and then print the skills
 
-->{{#hashdefine: skillhash}}<!--
 
 
 
  We either have a long section of skills, or one entry per level.
 
-->{{#if: {{{skills|}}}|<!--
 
  One 'skills' section.
 
  Lines are listed in descending order of skill. Each line is of the form:
 
  ;; 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.
 
 
 
  -->{{#arraydefine: skillsbylevel | {{{skills}}}  | ;; }}<!--
 
  -->{{#arrayslice:  skillsbylevel | skillsbylevel | 0 }}<!--
 
  -->{{#arraytohash: skillhash    | skillsbylevel | skilllevelsreverse }}<!--
 
-->|<!--
 
  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.
 
 
 
  -->{{#forargs: skills | thelevel | theskilllist | <!--
 
      -->{{#rmatch: {{#var:thelevel}} | /^\d+$/ | <!--
 
        -->{{#hashinclude: skillhash | <!--
 
            -->{{#arrayindex: skilllevelarray | {{#expr:{{#var: thelevel}}-1}} }}={{#var:theskilllist}}<!--
 
        -->}}<!--
 
      -->}}<!--
 
  -->}}<!--
 
-->}}<!--
 
 
 
-->
 
{{Character sheet/section
 
| subhead  = Skills
 
| righthead = types: {{#hashprint: classhash | , | %%%% | @@@@ | <span class="{{#var:skillClass}} @@@@"> %%%%</span> }}
 
}}<!-- end section --><!--
 
 
 
-->{{#arraydefine: skillhashkeys | name, type, marker}}<!--
 
-->{{#hashprint: skillhash | ,  | %%%% | @@@@ | <nowiki />
 
{{!}}-
 
{{!}} class="label" {{!}} %%%%
 
{{!}} colspan="3" class="{{#var: skillClass }}" {{!}} <!--
 
  -->{{#arraydefine: skilllineary | @@@@ | :: }}<!--
 
  -->{{#arrayprint: skilllineary | ,&nbsp; | $theskill$ | <!--
 
      -->{{#arraydefine: theskillarray | $theskill$ | /\/\// }}<!--
 
      -->{{#arraytohash: theskillhash | theskillarray | skillhashkeys }}<!--
 
      --><span class="{{#var: skillClass}} {{#hashvalue: theskillhash | type }}"><!--
 
      -->{{#hashvalue: theskillhash | name | _____ }}<!--
 
      --></span> <!--
 
      -->{{#hashvalue: skillmarkerhash | {{#hashvalue: theskillhash | marker}} }}<!--
 
  -->}}<!--
 
-->}}<!--
 
  
 
   STUNTS
 
   STUNTS
 
+
-->{{#hashtotemplate: {{{stunt section template | Character sheet/FATE/Stunt 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}} }}<!--
 
  -->{{#vardefine: stunttext |<!--
 
      -->{{#explode:{{#var: thestunt}}|//| 0 }}<!--
 
      If the stunt has a description we put it on a new line.
 
      -->{{#if:{{#vardefineecho: stuntdesc | {{#explode:{{#var: thestunt}}|//| 2 }} }} |<!--
 
        --><br />''{{#var:stuntdesc}}''<!--
 
      -->}}<!--
 
  -->}}<!--
 
  If there is some qualifier to the stunt, we do three columns for
 
  the stunt name and one for the qualifier. Otherwise, four for
 
  the stunt name.
 
  -->{{#if: {{#vardefineecho: stuntmod |{{#explode:{{#var: thestunt}}|//| 1 }} }}<!--
 
  -->|<!-- The stunt has a modifier
 
      --><nowiki/>
 
{{!}} colspan="3" {{!}} {{#var: stunttext}} <!--
 
      -->
 
{{!}} {{#rmatch: {{#var: stuntmod}} |^\s*(\-?\d+)\s*$| [\1] | ({{#var: stuntmod}}) }}<!--
 
  -->|<!-- The stunt has no modifier
 
      --><nowiki/>
 
{{!}} colspan="4" {{!}} {{#var: stunttext}} <!--
 
  -->}}<!-- End stunt modifier detection --><nowiki />
 
{{!}}- <!--
 
-->}}<!-- end while stunts
 
  
 
Extra sections
 
Extra sections
Line 164: 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 184: 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
Stress and consequences
+
-->{{#hashtotemplate: {{{stress section template | Character sheet/FATE/Stress and Consequences section}}} | paramsHash }}<!--
  
We want to place stress and consequences side-by-side.
+
  FOOTER
  
-->
+
--><nowiki/>
 
|-
 
|-
| colspan="2" class="subhead" | Stress Tracks
+
| colspan="{{#var:cols}}" | {{navbar|{{{template name|Character sheet/FATE}}}|mini=1}}
| colspan="2" class="subhead" | Consequences <!--
+
|}<!--
 +
 
  
-->{{#vardefine: defaultstress | {{{defaultstress|5}}} }}<!--
 
-->{{#vardefine: scidx | 0 }}<!--
 
-->{{#while: | <!-- stress tracks and consequence types
 
  -->{{#vardefineecho: thetrack | {{#explode: {{{stresstracks|health//endurance::composure//resolve}}} |::| {{#var:scidx}} }} }}<!--
 
  --><!-- consequence types
 
  -->{{#vardefineecho: severity | {{#explode: {{{consequencetypes|mild moderate severe}}} | | {{#var:scidx}} }} }}<!--
 
-->|<!--
 
  -->{{#vardefine:trackname | {{#explode:{{#var: thetrack}}|//|0}} }}<!--
 
  -->{{#vardefine:trackskil | {{#explode:{{#var: thetrack}}|//|1}} }}<!--
 
  -->{{#vardefine:trackmod  | {{#expr: ceil(({{#var: skillValue{{#var:trackskil}}}} + 0) / 2)}} }}<!--
 
  -->{{#vardefine:defstress | {{#expr: {{#var:defaultstress}} + {{#var:trackmod}} }}}}<!--
 
  -->{{#vardefine:thestress | <!--
 
    -->{{#if:{{{ {{#var: trackname}}|}}}|{{{ {{#var: trackname}} }}}|{{#var:defstress}}//0}}<!--
 
  -->}}<!--
 
  -->{{#vardefine:totstress | {{#explode:{{#var: thestress}}|//|0}} }}<!--
 
  -->{{#vardefine:curstress | {{#explode:{{#var: thestress}}|//|1}} }}<!--
 
  --><nowiki />
 
{{!}}-
 
{{!}} class="shaded" {{!}} {{#var: trackname}} <!--
 
      --><!--({{#var:trackskil}} {{#var: skillValue{{#var:trackskil}}}} / {{#var:trackmod}}) --><!-- debug -->
 
{{!}} <!--
 
  -->{{#if:{{#var: trackname}} |<!--
 
    --><table class="fate stressbox"><!--
 
    --><tr>{{#loop: stressloop | 1 | {{#var:totstress}} | <!--
 
      --><td class="{{#ifexpr: {{#var: stressloop}} <= {{#var:curstress|0}} | full }}"><div>&nbsp;</div></td><!--
 
    -->}}</tr><!--
 
    --></table><!--
 
  -->}}<!--
 
  
  --><nowiki />
+
--><includeonly><!--
{{!}} class="label" {{!}} {{#var: severity}}
 
{{!}} <!--
 
  -->{{#if:{{#var: severity}} |<!--
 
    -->{{#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: scidx | {{#expr: {{#var: scidx}} + 1}} }}<!--
+
   Semantic MediaWiki keys and categories for any *page* using this template
-->}}<!-- end while stress tracks and consequence types
 
  
-->
+
-->{{#set: campaign      = {{{campaign}}}      }}<!-- @todo: remove this
|-
+
-->{{#set: is in campaign = {{{campaign}}}      }}<!--
| colspan="4" | {{navbar|{{{template name|Character Sheet/FATE}}}|mini=1}}  
+
-->{{#if:{{#var:name}}|{{#set: has name ={{#var:name}}}}}}<!--
|}<includeonly><!--
+
-->{{#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}}}        }}<!--
 
    -->[[Category: Player characters]]<!--
 
    -->}}<!--
 
-->{{#if:{{{campaign|}}}    |<!--
 
    -->{{#set: campaign      = {{{campaign}}}      }}<!--
 
    -->[[Category: {{{campaign}}}]]<!--
 
    -->}}<!--
 
-->{{#if:{{{blurb|}}}        |{{#set: blurb          = {{{blurb}}}        }}}}<!--
 
  
--></includeonly><!--
 
  
 
--><noinclude><!--
 
--><noinclude><!--
Line 280: 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