|
|
(24 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <!-- | | <!-- |
| + | |
| + | @todo more sub-templates, like the skill block one |
| | | |
| --><onlyinclude><!-- | | --><onlyinclude><!-- |
| + | |
| + | -->{{#parameterstohash: paramsHash}}<!-- |
| + | |
| -->{{#vardefine:cols |{{{columns|6}}}}}<!-- | | -->{{#vardefine:cols |{{{columns|6}}}}}<!-- |
| -->{{#vardefine:cols_l|{{#expr: ceil( {{#var: cols}} / 2 ) }} }}<!-- | | -->{{#vardefine:cols_l|{{#expr: ceil( {{#var: cols}} / 2 ) }} }}<!-- |
Line 18: |
Line 23: |
| --><div class="campaign"><!-- | | --><div class="campaign"><!-- |
| --> {{#if: {{#var:campaign}}| [[{{#var:campaign}}]] }} <!-- | | --> {{#if: {{#var:campaign}}| [[{{#var:campaign}}]] }} <!-- |
− | --> {{#if: {{{player|}}}|([[{{{player}}}]]) }} <!-- | + | --> {{#if: {{{player|}}}|([[User:{{{player}}}|{{{player}}}]]) }} <!-- |
| --></div> | | --></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 }}<!-- |
Line 59: |
Line 64: |
| | | |
| ASPECTS | | ASPECTS |
− | | + | -->{{#hashtotemplate: {{{aspect section template | Character sheet/FATE/Aspect section}}} | paramsHash }}<!-- |
− | -->{{Character sheet/section | columns = {{#var:cols}}
| |
− | | subhead = Aspects
| |
− | | label1 = M_NUL
| |
− | | data1 = <!--
| |
− | -->{{#if: {{{image|}}} | [[Image:{{{image}}}{{!}}thumb{{!}}{{{caption|}}}]]}}<!-- | |
− | -->{{#arraydefine: aspectsarray | {{{aspects}}} | ;; }}<!--
| |
− | -->{{#arrayprint: aspectsarray || @@@@ | {{#if:@@@@|<nowiki />
| |
− | * <span class="aspect">@@@@</span> {{#set: has aspect = @@@@}} }} }}
| |
− | }}<!-- end section --><!--
| |
| | | |
| SKILLS | | SKILLS |
− | -->{{#ifeq:{{{skillblock|}}}|none|<!-- | + | -->{{#hashtotemplate: {{{skill section template | Character sheet/FATE/Skill section}}} | paramsHash }}<!-- |
− | --><!--{{Character sheet/section | columns = {{#var:cols}} | subhead = no skill block }}--><!--
| |
− | -->|<!--
| |
− | --><!--{{Character sheet/section | columns = {{#var:cols}} | subhead = upcoming skill block: }}--><!--
| |
− | We will pass a hash to a template.
| |
− | -->{{#parameterstohash: paramsHash}}<!--
| |
− | The following are the keys from the params to this template which
| |
− | we will pass through to the skill block template:
| |
− | -->{{#hashdefine: skillParamsKeys |
| |
− | skillblock, skillclass, skilltypes, skillmarkers, skillranks, defaultskillpoints
| |
− | }}<!--
| |
− | | |
− | -->{{#hashdefine: skillblocks | {{#if:{{{skillblock|}}}|{{{skillblock}}}|skills;Skills}} }}<!--
| |
− | -->{{#hashprint: skillblocks || @@@@ | %%%% |<!--
| |
− | -->{{#hashintersect: skillParamsHash | paramsHash | skillParamsKeys }}<!--
| |
− | -->{{#hashinclude: skillParamsHash
| |
− | | label = %%%%
| |
− | | skills = {{{@@@@ |}}}
| |
− | | skills1 = {{{@@@@1|M_NUL}}}
| |
− | | skills2 = {{{@@@@2|M_NUL}}}
| |
− | | skills3 = {{{@@@@3|M_NUL}}}
| |
− | | skills4 = {{{@@@@4|M_NUL}}}
| |
− | | skills5 = {{{@@@@5|M_NUL}}}
| |
− | }}<!--
| |
− | -->{{#hashinclude: skillParamsHash | columns = {{#var:cols}} }}<!--
| |
− | -->{{#hashtotemplate: Character sheet/FATE/Skill section | skillParamsHash }}<!--
| |
− | -->}}<!--
| |
− | | |
− | -->}}<!--
| |
− | END SKILLS
| |
| | | |
| STUNTS | | STUNTS |
− | | + | -->{{#hashtotemplate: {{{stunt section template | Character sheet/FATE/Stunt section}}} | paramsHash }}<!-- |
− | -->{{Character sheet/section | columns = {{#var:cols}} <!-- | |
− | -->| subhead = Stunts <!--
| |
− | -->}}<!--
| |
− | | |
− | -->{{#arraydefine: stuntsary | {{{stunts|}}} | ;; }}<!--
| |
− | -->{{#arrayprint: stuntsary || @@@@ | <!--
| |
− | -->{{Character sheet/FATE/Stunt line | @@@@ | columns = {{#var:cols}} }}<!--
| |
− | -->}}<!--
| |
− | -->{{#arrayreset: stuntsary }}<!--
| |
− | | |
| | | |
| Extra sections | | Extra sections |
Line 123: |
Line 80: |
| -->{{{data{{#var: sectnum}}|}}}<!-- | | -->{{{data{{#var: sectnum}}|}}}<!-- |
| -->|<!-- | | -->|<!-- |
− | -->{{#if:{{{header{{#var: sectnum}}|}}}|<!-- | + | -->{{#if:{{#vardefineecho:sectheader|{{{header{{#var: sectnum}}|}}}}}|<!-- |
− | Draw a header
| + | Draw a header |
− | -->{{Character sheet/section | columns = {{#var:cols}} <!-- | + | -->{{Character sheet/section subhead |{{#var:sectheader}}g| columns = {{#var:cols}} }}<!-- |
− | -->| header1 = {{{header{{#var: sectnum}}|}}} <!--
| + | --><!--{{Character sheet/section | columns = {{#var:cols}} --><!-- |
− | -->}}<!--
| + | --><!--| header1 = {{{header{{#var: sectnum}}|}}} --><!-- |
− | --><!-- <nowiki />
| + | --><!--}}--><!-- |
− | {{!}}-
| |
− | {{!}} colspan="{{#var:cols}}" class="subhead" {{!}} {{{header{{#var: sectnum}}|}}} --><!--
| |
| -->|<!-- if no header | | -->|<!-- if no header |
| -->{{Character sheet/section | columns = {{#var:cols}} <!-- | | -->{{Character sheet/section | columns = {{#var:cols}} <!-- |
− | -->| label1 = {{{label{{#var: sectnum}}|}}} <!-- | + | -->| label1 = {{{label{{#var: sectnum}}|}}}h <!-- |
− | -->| data1 = {{{data{{#var: sectnum}}|}}} <!-- | + | -->| data1 = {{{data{{#var: sectnum}}|}}}j <!-- |
| -->}}<!-- | | -->}}<!-- |
− | --><!-- <nowiki />
| |
− | {{!}}-
| |
− | {{!}} class="shaded" {{!}} {{{label{{#var: sectnum}}|}}}
| |
− | {{!}} colspan="{{#var:contentcols}}" {{!}} {{{data{{#var: sectnum}}|}}}
| |
− | --><!--
| |
| -->}}<!-- end if | | -->}}<!-- end if |
| -->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!-- | | -->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!-- |
Line 157: |
Line 107: |
| -->}}<!-- | | -->}}<!-- |
| | | |
− | Stress tracks
| + | STRESS AND CONSEQUENCES |
− | Stress and consequences
| + | -->{{#hashtotemplate: {{{stress section template | Character sheet/FATE/Stress and Consequences section}}} | paramsHash }}<!-- |
− | | |
− | -->{{{stress-beside-consequences}}}<!--
| |
− | | |
− | -->{{#var: cols }}-{{#var: cols_l}}-{{#var: cols_r}}<!-- debug --><!--
| |
− | -->{{#var: contentcols }}-{{#var: contentcols_l}}-{{#var: contentcols_r}}<!-- debug --><!--
| |
− | | |
− | -->{{#ifeq:{{{stress-beside-consequences|yes}}}|yes|<!-- | |
− | | |
− | We want to place stress and consequences side-by-side.
| |
− | | |
− | -->
| |
− | |-
| |
− | | colspan="{{#var: cols_l}}" class="subhead" | Stress Tracks
| |
− | | colspan="{{#var: cols_r}}" 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 -->
| |
− | {{!}} colspan="{{#var:contentcols_l}}" {{!}} <!--
| |
− | -->{{#if:{{#var: trackname}} |<!--
| |
− | --><table class="fate stressbox"><!--
| |
− | --><tr>{{#loop: stressloop | 1 | {{#var:totstress}} | <!--
| |
− | --><td class="{{#ifexpr: {{#var: stressloop}} <= {{#var:curstress|0}} | full }}"><div> </div></td><!--
| |
− | -->}}</tr><!--
| |
− | --></table><!--
| |
− | -->}}<!--
| |
− | | |
− | --><nowiki />
| |
− | {{!}} class="label" {{!}} {{#var: severity}}
| |
− | {{!}} colspan="{{#var:contentcols_r}}" {{!}} <!--
| |
− | -->{{#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 |, }}<!--
| |
− | -->{{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}} }}<!--
| |
− | -->}}<!-- end while stress tracks and consequence types
| |
− | | |
− | -->|<!-- else {{{stress-beside-consequences|yes}}} != yes
| |
| | | |
− | @todo: render stress above consequences
| + | FOOTER |
| | | |
− | -->
| + | --><nowiki/> |
− | |-
| |
− | | colspan="{{#var:cols}}" class="subhead" | Stress Tracks <!--
| |
− | | |
− | | |
− | -->{{#vardefine: defaultstress | {{{defaultstress|5}}} }}<!--
| |
− | -->{{#vardefine: scidx | 0 }}<!--
| |
− | | |
− | -->{{#arraydefine: stressary | {{{stresstracks|health//endurance::composure//resolve}}} | :: }}<!--
| |
− | -->{{#arrayprint: stressary || @@@@ | <!--
| |
− | -->{{Character sheet/FATE/Stress line | @@@@ | columns = {{#var:cols}} }}<!--
| |
− | | |
− | -->{{#vardefineecho: thetrack | @@@@ }}<!--
| |
− | -->{{#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 -->
| |
− | {{!}} colspan="{{#var:contentcols}}" {{!}} <!--
| |
− | -->{{#if:{{#var: trackname}} |<!--
| |
− | --><table class="fate stressbox"><!--
| |
− | --><tr>{{#loop: stressloop | 1 | {{#var:totstress}} | <!--
| |
− | --><td class="{{#ifexpr: {{#var: stressloop}} <= {{#var:curstress|0}} | full }}"><div> </div></td><!--
| |
− | -->}}</tr><!--
| |
− | --></table><!--
| |
− | -->}}<!--
| |
− | | |
− | -->}}<!--
| |
− | -->{{#arrayreset: stressary }}<!--
| |
− | | |
− | -->{{#while: | <!-- stress tracks
| |
− | -->{{#vardefineecho: thetrack | {{#explode: {{{stresstracks|health//endurance::composure//resolve}}} |::| {{#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 -->
| |
− | {{!}} colspan="{{#var:contentcols}}" {{!}} <!--
| |
− | -->{{#if:{{#var: trackname}} |<!--
| |
− | --><table class="fate stressbox"><!--
| |
− | --><tr>{{#loop: stressloop | 1 | {{#var:totstress}} | <!--
| |
− | --><td class="{{#ifexpr: {{#var: stressloop}} <= {{#var:curstress|0}} | full }}"><div> </div></td><!--
| |
− | -->}}</tr><!--
| |
− | --></table><!--
| |
− | -->}}<!--
| |
− | | |
− | -->{{#vardefine: scidx | {{#expr: {{#var: scidx}} + 1}} }}<!--
| |
− | -->}}<!-- end while stress tracks and consequence types
| |
− | | |
− | -->
| |
− | |-
| |
− | | colspan="{{#var:cols}}" class="subhead" | Consequences <!--
| |
− | | |
− | -->{{#vardefine: scidx | 0 }}<!--
| |
− | -->{{#while: | <!-- consequence types
| |
− | -->{{#vardefineecho: severity | {{#explode: {{{consequencetypes|mild moderate severe}}} | | {{#var:scidx}} }} }}<!--
| |
− | -->|<!--
| |
− | | |
− | --><nowiki />
| |
− | {{!}} class="label" {{!}} {{#var: severity}}
| |
− | {{!}} colspan="{{#var:contentcols_r}}" {{!}} <!--
| |
− | -->{{#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 |, }}<!--
| |
− | -->{{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}} }}<!--
| |
− | -->}}<!-- end while stress tracks and consequence types
| |
− | | |
− | -->}}<!-- end {{#ifeq:{{{stress-beside-consequences|yes}}}|yes
| |
− | | |
− | -->
| |
| |- | | |- |
| | colspan="{{#var:cols}}" | {{navbar|{{{template name|Character sheet/FATE}}}|mini=1}} | | | colspan="{{#var:cols}}" | {{navbar|{{{template name|Character sheet/FATE}}}|mini=1}} |
Line 337: |
Line 123: |
| Semantic MediaWiki keys and categories for any *page* using this template | | Semantic MediaWiki keys and categories for any *page* using this template |
| | | |
− | -->{{#set: campaign = {{{campaign}}} }}<!-- | + | -->{{#set: campaign = {{{campaign}}} }}<!-- @todo: remove this |
− | -->{{#if:{{#var:name}}|{{#set: name = {{#var:name}} }}}}<!-- | + | -->{{#set: is in campaign = {{{campaign}}} }}<!-- |
− | -->{{#if:{{{status|}}}|{{#set: status = {{{status}}} }}}}<!-- | + | -->{{#if:{{#var:name}}|{{#set: has name ={{#var:name}}}}}}<!-- |
| + | -->{{#if:{{{status|}}}|{{#set: has status ={{{status}}}}}}}<!-- |
| -->{{#ifeq:{{lc:{{{player}}}}} | npc <!-- | | -->{{#ifeq:{{lc:{{{player}}}}} | npc <!-- |
| -->|<!-- | | -->|<!-- |
Line 352: |
Line 139: |
| -->|<!-- | | -->|<!-- |
| no player name set at all | | no player name set at all |
− | -->[[Category: Characters in {{{campaign}}}]]<!-- | + | -->[[Category: Characters in {{#var:campaign}}]]<!-- |
| -->}}<!-- | | -->}}<!-- |
| -->}}<!-- | | -->}}<!-- |