completed NPC sheet

This commit is contained in:
Nathanael Phillips 2020-11-30 09:06:27 -07:00
parent 88b4e6dfc9
commit 27a53a9361
7 changed files with 235 additions and 130 deletions

View file

@ -17,136 +17,119 @@
</div>
</div>
<section class="header-details flexrow" style="display: none;">
<!-- <aside class="header-exp flexcol">
<div class="cr">
<label>{{ localize "SW5E.AbbreviationCR" }}</label>
<input name="data.details.cr" type="text" value="{{labels.cr}}" placeholder="1"/>
</div>
<div class="experience">
<span>{{data.details.xp.value}} XP</span>
</div>
</aside> -->
{{!-- Character Summary --}}
<ul class="summary flexrow">
<li>
<span>{{lookup config.actorSizes data.traits.size}}</span>
</li>
<li>
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}"
placeholder="{{ localize 'SW5E.Alignment' }}" />
</li>
<li>
<input type="text" name="data.details.type" value="{{data.details.type}}"
placeholder="{{ localize 'SW5E.Type' }}" />
</li>
<li>
<input type="text" name="data.details.source" value="{{data.details.source}}"
<div class="summary">
<span>{{lookup config.actorSizes data.traits.size}}</span>
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}"
placeholder="{{ localize 'SW5E.Alignment' }}" />
<input type="text" name="data.details.type" value="{{data.details.type}}"
placeholder="{{ localize 'SW5E.Type' }}" />
<input type="text" name="data.details.source" value="{{data.details.source}}"
placeholder="{{ localize 'SW5E.Source' }}" />
</li>
</ul>
</div>
<div class="attributes">
{{!-- ARMOR CLASS --}}
<section>
<h1>{{ localize "SW5E.ArmorClass" }}</h1>
<div class="attribute-value">
<input class="ac-display" name="data.attributes.ac.value" type="text"
value="{{data.attributes.ac.value}}" data-dtype="Number" placeholder="10" />
</div>
<footer class="attribute-footer proficiency">
{{ localize "SW5E.Proficiency" }}
{{numberFormat data.attributes.prof decimals=0 sign=true}}
</footer>
</section>
{{!-- Header Attributes --}}
<ul class="attributes flexrow">
<li class="attribute health">
<h4 class="attribute-name box-title rollable">{{ localize "SW5E.Health" }}</h4>
<div class="attribute-value multiple">
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
placeholder="10" data-dtype="Number" />
<span class="sep"> / </span>
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
placeholder="10" data-dtype="Number" />
</div>
<footer class="attribute-footer">
<input name="data.attributes.hp.formula" class="hpformula" type="text"
{{!-- HIT POINTS --}}
<section>
<h1>Hit Points</h1>
<div class="attribute-value multiple">
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
data-dtype="Number" placeholder="10" class="value-number" />
<span class="value-separator">/</span>
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
data-dtype="Number" placeholder="10" class="value-number" />
</div>
<footer class="attribute-footer hit-points">
<input name="data.attributes.hp.formula" class="hpformula" type="text"
placeholder="{{ localize 'SW5E.HealthFormula' }}" value="{{data.attributes.hp.formula}}" />
</footer>
</li>
<li class="attribute">
<h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4>
<div class="attribute-value">
<input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}"
placeholder="10" />
</div>
<footer class="attribute-footer">
<span>{{ localize "SW5E.Proficiency" }}</span>
<span>{{numberFormat data.attributes.prof decimals=0 sign=true}}</span>
</footer>
</li>
<li class="attribute">
<h4 class="attribute-name box-title">{{ localize "SW5E.Speed" }}</h4>
<div class="attribute-value">
<input name="data.attributes.speed.value" type="text" value="{{data.attributes.speed.value}}"
placeholder="0" />
</div>
<footer class="attribute-footer">
<input type="text" class="speed" name="data.attributes.speed.special"
value="{{data.attributes.speed.special}}"
placeholder="{{ localize 'SW5E.SpeedSpecial' }}" />
</footer>
</li>
</ul>
</section>
</footer>
</section>
<section>
<h1>{{ localize "SW5E.Speed" }}</h1>
<div class="attribute-value">
<input name="data.attributes.speed.value" type="text" value="{{data.attributes.speed.value}}"
placeholder="0" />
</div>
<footer class="attribute-footer speed">
<input type="text" class="speed" name="data.attributes.speed.special"
value="{{data.attributes.speed.special}}" placeholder="{{ localize 'SW5E.SpeedSpecial' }}" />
</footer>
</section>
</div>
</header>
{{!-- NPC Sheet Navigation --}}
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="attributes">{{ localize "SW5E.Attributes" }}</a>
<a class="item" data-tab="features">{{ localize "SW5E.Features" }}</a>
<a class="item" data-tab="powerbook">{{ localize "SW5E.Powerbook" }}</a>
<a class="item" data-tab="biography">{{ localize "SW5E.Biography" }}</a>
<nav class="sheet-navigation root-tabs" data-group="primary">
<button class="item active" data-tab="attributes">{{ localize "SW5E.Attributes" }}</button>
<button class="item" data-tab="features">{{ localize "SW5E.Features" }}</button>
<button class="item" data-tab="powerbook">{{ localize "SW5E.Powerbook" }}</button>
<button class="item" data-tab="biography">{{ localize "SW5E.Biography" }}</button>
</nav>
{{!-- NPC Sheet Body --}}
<section class="sheet-body">
<div class="tab attributes flexrow" data-group="primary" data-tab="attributes">
{{!-- Ability Scores --}}
<ul class="ability-scores flexrow">
{{#each data.abilities as |ability id|}}
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
<h4 class="ability-name box-title rollable">{{ability.label}}</h4>
<input class="ability-score" name="data.abilities.{{id}}.value" type="number"
value="{{ability.value}}" placeholder="10" />
<div class="ability-modifiers flexrow">
<span class="ability-mod"
title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}"
data-dtype="Number" />
<a class="proficiency-toggle ability-proficiency"
title="{{ localize 'SW5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save"
title="Saving Throw">{{numberFormat ability.save decimals=0 sign=true}}</span>
</div>
</li>
{{/each}}
</ul>
{{!-- Skills --}}
<ul class="skills-list">
{{#each data.skills as |skill s|}}
<li class="skill flexrow {{#if skill.value}}proficient{{/if}}" data-skill="{{s}}">
<input type="hidden" name="data.skills.{{s}}.value" value="{{skill.value}}" data-dtype="Number" />
<a class="proficiency-toggle skill-proficiency" title="{{skill.hover}}">{{{skill.icon}}}</a>
<h4 class="skill-name rollable">{{skill.label}}</h4>
<span class="skill-ability">{{skill.ability}}</span>
<span class="skill-mod">{{numberFormat skill.total decimals=0 sign=true}}</span>
<span class="skill-passive">({{skill.passive}})</span>
</li>
{{/each}}
</ul>
<section class="center-pane flexcol">
<section class="tab attributes core" data-group="primary" data-tab="attributes">
<section class="panel abilities">
{{!-- Ability Scores --}}
<section class="scores">
<h1>Ability Scores</h1>
<ol>
{{#each data.abilities as |ability id|}}
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
<h2 class="ability-name rollable">{{ability.label}}</h4>
<input class="ability-score" name="data.abilities.{{id}}.value" type="text"
value="{{ability.value}}" data-dtype="Number" placeholder="10" />
<div class="ability-modifiers">
<span class="ability-mod"
title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<input type="hidden" name="data.abilities.{{id}}.proficient"
value="{{ability.proficient}}" data-dtype="Number" />
<button class="proficiency-toggle ability-proficiency"
title="Proficiency">{{{ability.icon}}}</button>
<span class="ability-save"
title="Saving Throw">{{numberFormat ability.save decimals=0 sign=true}}</span>
</div>
</li>
{{/each}}
</ol>
</section>
{{!-- Skills --}}
<section class="skills">
<h1>Skills</h1>
<ol>
{{#each data.skills as |skill s|}}
<li class="skill {{#if skill.value}}proficient{{/if}}" data-skill="{{s}}">
<input type="hidden" name="data.skills.{{s}}.value" value="{{skill.value}}"
data-dtype="Number" />
<button class="proficiency-toggle skill-proficiency"
title="{{skill.hover}}">{{{skill.icon}}}</button>
<span class="skill-name rollable">{{skill.label}}</span>
<span class="skill-ability">{{skill.ability}}</span>
<span class="skill-mod">{{numberFormat skill.total decimals=0 sign=true}}</span>
{{!-- <input class="skill-bonus" name="data.skills.{{s}}.bonus" type="text" value="{{numberFormat skill.bonus decimals=0 sign=true}}" data-dtype="Number" placeholder="0" title="Misc. Modifier"/> --}}
{{!-- <span class="skill-passive">({{skill.passive}})</span> --}}
</li>
{{/each}}
</ol>
</section>
</section>
<section class="panel traits-resources">
{{!-- Legendary Actions --}}
<div class="counters">
<div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegAct" }}</h4>
<div class="counter legendary">
<strong>{{ localize "SW5E.LegAct" }}</strong>
<div class="counter-value">
<input name="data.resources.legact.value" type="number"
value="{{data.resources.legact.value}}" placeholder="0" />
@ -155,8 +138,8 @@
placeholder="0" />
</div>
</div>
<div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegRes" }}</h4>
<div class="counter legendary">
<strong>{{ localize "SW5E.LegRes" }}</strong>
<div class="counter-value">
<input name="data.resources.legres.value" type="number"
value="{{data.resources.legres.value}}" placeholder="0" />
@ -165,8 +148,8 @@
placeholder="0" />
</div>
</div>
<div class="counter flexrow lair">
<h4>{{ localize "SW5E.LairAct" }}</h4>
<div class="counter lair">
<strong>{{ localize "SW5E.LairAct" }}</strong>
<div class="counter-value">
<input name="data.resources.lair.value" type="checkbox"
value="{{data.resources.lair.value}}" data-dtype="Boolean"
@ -176,25 +159,31 @@
</div>
</div>
</div>
{{!-- Traits --}}
{{> "systems/sw5e/templates/actors/oldActor/parts/actor-traits.html"}}
<div class="core-traits">
{{> "systems/sw5e/templates/actors/newActor/parts/swalt-traits.html"}}
</div>
</section>
</div>
</section>
{{!-- Features Tab --}}
<div class="tab features flexcol" data-group="primary" data-tab="features">
{{> "systems/sw5e/templates/actors/oldActor/parts/actor-features.html" sections=features}}
{{> "systems/sw5e/templates/actors/newActor/parts/swalt-features.html" sections=features}}
</div>
{{!-- Powerbook Tab --}}
<div class="tab powerbook flexcol" data-group="primary" data-tab="powerbook">
{{> "systems/sw5e/templates/actors/oldActor/parts/actor-powerbook.html"}}
{{> "systems/sw5e/templates/actors/newActor/parts/swalt-powerbook.html"}}
</div>
{{!-- Biography Tab --}}
<div class="tab biography flexcol" data-group="primary" data-tab="biography">
{{editor content=data.details.biography.value target="data.details.biography.value" button=true owner=owner editable=editable}}
<div class="panel">
<section>
<h1>Biography</h1>
{{editor content=data.details.biography.value target="data.details.biography.value" button=true owner=owner editable=editable}}
</section>
</div>
</div>
</section>
</form>