From GamingWiki
(91 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | < | + | <!-- |
− | {| | + | |
− | ! | + | @todo more sub-templates, like the skill block one |
− | -->{{# | + | |
− | --> {{#if: {{ | + | --><onlyinclude><!-- |
− | --> {{#if: {{{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 | + | 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 | 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 }} <!-- |
-->}}<!-- | -->}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
Line 42: | Line 64: | ||
ASPECTS | ASPECTS | ||
− | + | -->{{#hashtotemplate: {{{aspect section template | Character sheet/FATE/Aspect section}}} | paramsHash }}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | -->{{# | ||
− | |||
− | |||
− | |||
− | |||
SKILLS | SKILLS | ||
+ | -->{{#hashtotemplate: {{{skill section template | Character sheet/FATE/Skill section}}} | paramsHash }}<!-- | ||
− | + | STUNTS | |
− | + | -->{{#hashtotemplate: {{{stunt section template | Character sheet/FATE/Stunt section}}} | paramsHash }}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | -->{{# | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Extra sections | Extra sections | ||
Line 221: | Line 80: | ||
-->{{{data{{#var: sectnum}}|}}}<!-- | -->{{{data{{#var: sectnum}}|}}}<!-- | ||
-->|<!-- | -->|<!-- | ||
− | -->{{#if:{{{header{{#var: sectnum}}|}}}|<!-- | + | -->{{#if:{{#vardefineecho:sectheader|{{{header{{#var: sectnum}}|}}}}}|<!-- |
− | + | Draw a header | |
− | + | -->{{Character sheet/section subhead |{{#var:sectheader}}g| columns = {{#var:cols}} }}<!-- | |
− | {{ | + | --><!--{{Character sheet/section | columns = {{#var:cols}} --><!-- |
− | {{ | + | --><!--| header1 = {{{header{{#var: sectnum}}|}}} --><!-- |
+ | --><!--}}--><!-- | ||
-->|<!-- if no header | -->|<!-- if no header | ||
− | + | -->{{Character sheet/section | columns = {{#var:cols}} <!-- | |
− | {{ | + | -->| label1 = {{{label{{#var: sectnum}}|}}}h <!-- |
− | + | -->| data1 = {{{data{{#var: sectnum}}|}}}j <!-- | |
− | + | -->}}<!-- | |
− | |||
-->}}<!-- end if | -->}}<!-- end if | ||
-->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!-- | -->{{#vardefine: sectnum | {{#expr: {{#var: sectnum}} + 1}} }}<!-- | ||
Line 241: | 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}} }} }}<!-- | ||
− | --> | + | -->{{Character sheet/section | columns = {{#var:cols}} <!-- |
− | |- | + | -->| llabel1 = FP <!-- |
− | | | + | -->| ldata1 = {{#var: fp}} <!-- |
− | | | + | -->| label1 = Refresh <!-- |
− | <!-- | + | -->| data1 = {{#var: refresh}} <!-- |
+ | -->}}<!-- | ||
− | + | STRESS AND CONSEQUENCES | |
− | Stress and | + | -->{{#hashtotemplate: {{{stress section template | Character sheet/FATE/Stress and Consequences section}}} | paramsHash }}<!-- |
− | + | FOOTER | |
− | --> | + | --><nowiki/> |
|- | |- | ||
− | | colspan=" | + | | colspan="{{#var:cols}}" | {{navbar|{{{template name|Character sheet/FATE}}}|mini=1}} |
− | | | + | |}<!-- |
+ | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | --><includeonly><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Semantic MediaWiki keys and categories for any *page* using this template | |
− | |||
− | --> | + | -->{{#set: campaign = {{{campaign}}} }}<!-- @todo: remove this |
− | |- | + | -->{{#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}}} }}}}<!-- | ||
− | + | If we have relationships defined, save the information. | |
+ | -->{{#if: {{{relationships|}}} | <!-- | ||
+ | -->{{#arraydefine: relationsarray | {{{relationships|}}} | ;; }}<!-- | ||
+ | -->{{#arrayprint: relationsarray | | @@@@ | <!-- | ||
+ | -->{{#arraydefine: relationsfields | @@@@ | :: }}<!-- | ||
+ | -->{{Relationship <!-- | ||
+ | -->| {{#arrayindex: relationsfields | 1 }} <!-- | ||
+ | -->| {{#arrayindex: relationsfields | 0 }} <!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
− | --> | + | --></includeonly><!-- |
+ | --></onlyinclude><!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
--><noinclude><!-- | --><noinclude><!-- | ||
Line 337: | 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 Editors can experiment in this template's sandbox (edit) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |