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

@ -93,6 +93,11 @@
.charlevel { .charlevel {
.russoOne(17px); .russoOne(17px);
text-align: right; text-align: right;
input {
display: inline-block;
width: 42px;
height: auto;
}
} }
.experience { .experience {
@ -932,6 +937,9 @@
&>.panel { &>.panel {
grid-template-rows: 32px 24px 24px auto; grid-template-rows: 32px 24px 24px auto;
} }
h3.power-dc {
line-height: 24px;
}
.powercasting-ability { .powercasting-ability {
display: grid; display: grid;
grid-template-columns: 2fr 1fr 1fr; grid-template-columns: 2fr 1fr 1fr;
@ -991,4 +999,52 @@
} }
} }
} }
&.npc {
.swalt-sheet {
header {
h1.character-name {
align-self: auto;
}
.attributes {
grid-template-columns: repeat(3, 1fr);
footer {
&.proficiency {
margin-top: 0;
line-height: 24px;
text-align: center;
}
&.hit-points {
display: block;
}
}
}
}
nav.sheet-navigation {
grid-template-columns: repeat(4, 1fr);
}
.tab.attributes {
.traits-resources {
display: block;
.counter {
display: flex;
.counter-value {
margin-left: auto;
}
}
// section.traits {
// display:block;
// }
}
}
.tab.powerbook {
input.powercasting-level {
width: 48px;
}
}
.tab.biography.active {
display: block;
}
}
}
} }

View file

@ -404,4 +404,13 @@
} }
} }
} }
&.npc {
.swalt-sheet {
header {
.experience {
color: @actorProficiencyTextColor;
}
}
}
}
} }

View file

@ -17,7 +17,12 @@ export default class ActorSheet5eNPCNew extends ActorSheet5e {
return mergeObject(super.defaultOptions, { return mergeObject(super.defaultOptions, {
classes: ["sw5e", "sheet", "actor", "npc"], classes: ["sw5e", "sheet", "actor", "npc"],
width: 600, width: 600,
height: 680 width: 800,
tabs: [{
navSelector: ".root-tabs",
contentSelector: ".sheet-body",
initial: "attributes"
}],
}); });
} }

View file

@ -767,3 +767,6 @@ body.dark-theme .sw5e.sheet.actor .swalt-sheet .tab.notes section > input {
color: #E81111; color: #E81111;
border-bottom: 2px solid #0d99cc; border-bottom: 2px solid #0d99cc;
} }
body.dark-theme .sw5e.sheet.actor.npc .swalt-sheet header .experience {
color: #4f4f4f;
}

View file

@ -783,6 +783,11 @@ input[type="reset"]:disabled {
letter-spacing: 0.5px; letter-spacing: 0.5px;
text-align: right; text-align: right;
} }
.sw5e.sheet.actor .swalt-sheet header .level-experience .charlevel input {
display: inline-block;
width: 42px;
height: auto;
}
.sw5e.sheet.actor .swalt-sheet header .level-experience .experience { .sw5e.sheet.actor .swalt-sheet header .level-experience .experience {
font-family: 'Russo One'; font-family: 'Russo One';
font-size: 17px; font-size: 17px;
@ -1507,6 +1512,9 @@ input[type="reset"]:disabled {
.sw5e.sheet.actor .swalt-sheet .tab.powerbook > .panel { .sw5e.sheet.actor .swalt-sheet .tab.powerbook > .panel {
grid-template-rows: 32px 24px 24px auto; grid-template-rows: 32px 24px 24px auto;
} }
.sw5e.sheet.actor .swalt-sheet .tab.powerbook h3.power-dc {
line-height: 24px;
}
.sw5e.sheet.actor .swalt-sheet .tab.powerbook .powercasting-ability { .sw5e.sheet.actor .swalt-sheet .tab.powerbook .powercasting-ability {
display: grid; display: grid;
grid-template-columns: 2fr 1fr 1fr; grid-template-columns: 2fr 1fr 1fr;
@ -1567,6 +1575,38 @@ input[type="reset"]:disabled {
.sw5e.sheet.actor .swalt-sheet.limited .tab.biography { .sw5e.sheet.actor .swalt-sheet.limited .tab.biography {
grid-template-columns: 100%; grid-template-columns: 100%;
} }
.sw5e.sheet.actor.npc .swalt-sheet header h1.character-name {
align-self: auto;
}
.sw5e.sheet.actor.npc .swalt-sheet header .attributes {
grid-template-columns: repeat(3, 1fr);
}
.sw5e.sheet.actor.npc .swalt-sheet header .attributes footer.proficiency {
margin-top: 0;
line-height: 24px;
text-align: center;
}
.sw5e.sheet.actor.npc .swalt-sheet header .attributes footer.hit-points {
display: block;
}
.sw5e.sheet.actor.npc .swalt-sheet nav.sheet-navigation {
grid-template-columns: repeat(4, 1fr);
}
.sw5e.sheet.actor.npc .swalt-sheet .tab.attributes .traits-resources {
display: block;
}
.sw5e.sheet.actor.npc .swalt-sheet .tab.attributes .traits-resources .counter {
display: flex;
}
.sw5e.sheet.actor.npc .swalt-sheet .tab.attributes .traits-resources .counter .counter-value {
margin-left: auto;
}
.sw5e.sheet.actor.npc .swalt-sheet .tab.powerbook input.powercasting-level {
width: 48px;
}
.sw5e.sheet.actor.npc .swalt-sheet .tab.biography.active {
display: block;
}
@keyframes pause-spin { @keyframes pause-spin {
from { from {
transform: rotate(0deg); transform: rotate(0deg);

View file

@ -767,3 +767,6 @@ body.light-theme .sw5e.sheet.actor .swalt-sheet .tab.notes section > input {
color: #c40f0f; color: #c40f0f;
border-bottom: 2px solid #0d99cc; border-bottom: 2px solid #0d99cc;
} }
body.light-theme .sw5e.sheet.actor.npc .swalt-sheet header .experience {
color: #4f4f4f;
}

View file

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