Add npc sheet template + css adjustments

This commit is contained in:
Mandar
2020-12-15 20:28:42 +01:00
parent bee3be183e
commit 0c99a65e57
26 changed files with 390 additions and 132 deletions

View File

@@ -117,7 +117,9 @@
"status": "Status",
"ninjo": "Ninjo",
"giri": "Giri",
"titles": "Titles"
"titles": "Titles",
"advantages": "Distinctions et Passions",
"disadvantages": "Adversities et Anxieties"
},
"skills": {
"title": "Skills",
@@ -125,7 +127,7 @@
"title": "Artisan",
"aesthetics": "Aesthetics",
"composition": "Composition",
"Design": "Design",
"design": "Design",
"smithing": "Smithing",
"air": "Refine",
"earth": "Restore",

View File

@@ -117,7 +117,9 @@
"status": "Estatus",
"ninjo": "Ninjo",
"giri": "Giri",
"titles": "Títulos"
"titles": "Títulos",
"advantages": "Advantages",
"disadvantages": "Disadvantages"
},
"skills": {
"title": "Habilidades",

View File

@@ -117,7 +117,9 @@
"status": "Status",
"ninjo": "Ninjo",
"giri": "Giri",
"titles": "Titres"
"titles": "Titres",
"advantages": "Aptitudes et Passions",
"disadvantages": "Coups du sort et défaillances"
},
"skills": {
"title": "Compétences",

View File

@@ -1,6 +1,7 @@
export const PreloadTemplates = async function () {
const templatePaths = [
// Add paths to "systems/l5r5e/templates"
// actor
"systems/l5r5e/templates/sheets/actor/rings.html",
"systems/l5r5e/templates/sheets/actor/narrative.html",
"systems/l5r5e/templates/sheets/actor/identity.html",
@@ -13,6 +14,14 @@ export const PreloadTemplates = async function () {
"systems/l5r5e/templates/sheets/actor/feats.html",
"systems/l5r5e/templates/sheets/actor/experience.html",
"systems/l5r5e/templates/sheets/actor/acquisition.html",
// npc
"systems/l5r5e/templates/sheets/npc/identity.html",
"systems/l5r5e/templates/sheets/npc/narrative.html",
"systems/l5r5e/templates/sheets/npc/social.html",
"systems/l5r5e/templates/sheets/npc/rings.html",
"systems/l5r5e/templates/sheets/npc/attributes.html",
"systems/l5r5e/templates/sheets/npc/skill.html",
"systems/l5r5e/templates/sheets/npc/feats.html",
// items
"systems/l5r5e/templates/item/weapon-sheet.html",
"systems/l5r5e/templates/item/items.html",

View File

@@ -9,6 +9,7 @@
.l5r5e {
@import "../scss/dices";
@import "../scss/sheets";
@import "../scss/npc";
@import "../scss/nav";
@import "../scss/rings";
@import "../scss/skills";

File diff suppressed because one or more lines are too long

View File

@@ -84,9 +84,6 @@ fieldset {
margin: 0 0.25rem;
padding: 0.25rem 0.5rem;
border: 1px solid $l5r5e-title;
&:last-child {
margin: 0 0 0 0.5rem;
}
legend {
color: $l5r5e-label;
}

View File

@@ -0,0 +1,48 @@
&.npc {
.sheet-header {
fieldset {
flex: none;
min-height: 2rem;
width: 100%;
}
}
}
.npc-skill {
display: flex;
width: 100%;
line-height: 2rem;
font-size: 0.75rem;
text-align: center;
li {
flex: 1;
padding: 0.25rem;
text-transform: uppercase;
color: $white;
&:nth-child(1) {
background: $l5r5e-void;
}
&:nth-child(2) {
background: $l5r5e-earth;
}
&:nth-child(3) {
background: $l5r5e-fire;
}
&:nth-child(4) {
background: $l5r5e-air;
}
&:nth-child(5) {
flex: 1.25;
background: $l5r5e-water;
}
}
input[type="text"] {
float: right;
height: 2rem;
width: 1rem;
margin: 0;
padding: 0;
border: 0 none;
background: transparent;
color: $white;
}
}

View File

@@ -1,6 +1,27 @@
/** Sheets **/
&.sheet {
min-width: 600px;
&.actor {
.sheet-header {
height: 26.75rem;
}
.sheet-body {
height: calc(100% - 26.75rem);
}
}
&.item,
.feat,
.weapon,
.armor,
.advantages,
.disadvantages {
.sheet-header {
height: 10rem;
}
.sheet-body {
height: calc(100% - 10rem);
}
}
form {
display: flex;
flex-wrap: wrap;
@@ -8,18 +29,16 @@
.sheet-body {
flex: 0 0 100%;
align-items: flex-start;
height: calc(100% - 26.75rem);
}
.sheet-header {
flex: 0 0 100%;
align-items: flex-start;
height: 26.75rem;
input {
font-size: 1rem;
}
h1 {
flex: auto;
margin: 0 0.5rem 0.25rem;
margin: 0 0 0.25rem 1rem;
input {
flex: 0 0 100%;
font-size: 3rem;
@@ -95,12 +114,12 @@
.identity-wrapper {
display: flex;
flex-wrap: wrap;
flex: 0 0 calc(100% - 150px - 0.25rem);
flex: 0 0 calc(100% - 150px - 1.05rem);
.identity-content {
flex: 0 0 100%;
display: flex;
flex-wrap: wrap;
margin: 0.5rem;
margin: 0.5rem 0 0.5rem 1rem;
li {
flex: 33%;
&:nth-child(1),
@@ -310,4 +329,11 @@
}
}
}
.feats-wrapper {
fieldset {
&:last-child {
margin: 0 0 0 0.5rem;
}
}
}
}

View File

@@ -121,7 +121,7 @@
}
},
"Item": {
"types": ["item", "armor", "weapon", "feat", "quality", "xp-advancement"],
"types": ["item", "armor", "weapon", "feat", "quality", "advantage", "disadvantage", "advancement"],
"item": {
"description": "",
"properties": "",
@@ -168,7 +168,13 @@
"quality": {
"description": ""
},
"xp-advancement": {
"advantage": {
"description": ""
},
"disadvantage": {
"description": ""
},
"advancement": {
"description": "TODO"
}
}

View File

@@ -38,7 +38,7 @@
</fieldset>
<fieldset class="weapon-stats-content">
{{ localize 'l5r5e.armors.title' }}
<legend class="text-header">{{ localize 'l5r5e.armors.title' }}</legend>
<label class="attribute-label">
{{ localize 'l5r5e.armors.physical' }}
<input type="text" name="data.armor.physical" value="{{data.armor.physical}}" data-dtype="Number" placeholder="0"/>

View File

@@ -2,9 +2,9 @@
<ul class="item-header item-control">
<li class="item-img"><img src="{{item.img}}" title="{{item.name}}" width="32px" height="32px"/></li>
<li class="item-name">{{ item.name }} x{{ item.data.quantity }}</li>
<li class="item-edit" title="Edit Feat"><i class="fas fa-edit"></i></li>
<li class="item-delete" title="Delete Feat"><i class="fas fa-trash"></i></li>
<li class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></li>
<li class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></li>
</ul>
<div class="item-description">{{{ feat.data.description }}}</div>
<div class="item-properties">{{{ feat.data.properties }}}</div>
<div class="item-description">{{{ item.data.description }}}</div>
<div class="item-properties">{{{ item.data.properties }}}</div>
</li>

View File

@@ -1,7 +1,7 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="150" width="150"/>
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}"/>
<div class="header-fields identity-wrapper">
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
{{> 'systems/l5r5e/templates/sheets/actor/identity.html' }}

View File

@@ -11,6 +11,30 @@
<label class="attribute-label">{{ localize 'l5r5e.social.titles' }}</label>
<input type="text" name="data.social_standing.titles" value="{{data.social.titles}}"/>
</li>
<li>
<fieldset>
<legend class="text-block-header">{{ localize 'l5r5e.social.advantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#if item.isEquipment }}
{{> 'systems/l5r5e/templates/item/item-entry.html' item=item id=id }}
{{/if}}
{{/each}}
</ul>
</fieldset>
</li>
<li>
<fieldset>
<legend class="text-block-header">{{ localize 'l5r5e.social.disadvantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#if item.isEquipment }}
{{> 'systems/l5r5e/templates/item/item-entry.html' item=item id=id }}
{{/if}}
{{/each}}
</ul>
</fieldset>
</li>
</ul>
<fieldset>
<legend class="text-block-header">{{ localize 'l5r5e.notes' }}</legend>

View File

@@ -1,104 +1,38 @@
<form class="{{cssClass}}" autocomplete="off">
{{json this}}
{{!-- Sheet Header --}}
<header class="sheet-header">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="150" width="150"/>
<div class="header-fields identity-wrapper">
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
{{> 'systems/l5r5e/templates/sheets/npc/identity.html' }}
</div>
<fieldset>
<legend class="text-block-header">{{ localize 'l5r5e.notes' }}</legend>
{{ editor content=data.notes.value target="data.notes.value" button=true editable=editable }}
</fieldset>
<div class="header-fields">
{{> 'systems/l5r5e/templates/sheets/actor/social.html' }}
<h2>{{ localize 'l5r5e.attributes.title' }}</h2>
{{> 'systems/l5r5e/templates/sheets/actor/rings.html' }}
{{> 'systems/l5r5e/templates/sheets/actor/attributes.html' }}
{{> 'systems/l5r5e/templates/sheets/npc/social.html' }}
{{> 'systems/l5r5e/templates/sheets/npc/rings.html' }}
{{> 'systems/l5r5e/templates/sheets/npc/attributes.html' }}
</div>
</header>
<div>
conflict rank
<br>martial : <input type="text" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" placeholder="0"/>
<br>social : <input type="text" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" placeholder="0"/>
</div>
<div>
Npc Type
<br>
<!-- Npc Type (minion / adversary) -->
<select class="attribute-dtype" name="data.type">
{{#select data.type}}
{{#each data.types as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div>
attitude:
<input type="text" name="data.attitude" value="{{data.attitude}}" data-dtype="String" placeholder=""/>
</div>
<div>
Skills
<ul>
{{#each data.skills as |skillValue skillCatId|}}
<li>
{{localizeSkill skillCatId "title"}} :
<input type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
</li>
{{/each}}
</ul>
</div>
<div>
rings_affinities
<br>
strengths :
<select class="attribute-dtype" name="data.rings_affinities.strength.ring">
{{#select data.rings_affinities.strength.ring}}
{{#each data.stances as |stance|}}
<option value="{{stance}}">{{localizeRing stance}}</option>
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" placeholder="0"/>
<br>
weakness :
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
{{#select data.rings_affinities.weakness.ring}}
{{#each data.stances as |stance|}}
<option value="{{stance}}">{{localizeRing stance}}</option>
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" placeholder="0"/>
</div>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Skills Tab --}}
<article class="tab skills" data-group="primary" data-tab="skills">
<ul class="skills-wrapper">
{{#each data.skills as |category id|}}
{{> 'systems/l5r5e/templates/sheets/actor/category.html' category=category categoryId=id}}
{{/each}}
</ul>
{{> 'systems/l5r5e/templates/sheets/actor/feats.html' }}
{{> 'systems/l5r5e/templates/sheets/npc/skill.html' }}
<article>
{{> 'systems/l5r5e/templates/sheets/npc/feats.html' }}
</article>
{{> 'systems/l5r5e/templates/sheets/actor/narrative.html' }}
<article>
{{> 'systems/l5r5e/templates/sheets/npc/narrative.html' }}
</article>
<article>
{{> 'systems/l5r5e/templates/item/items.html' }}
</article>
<article>
{{> 'systems/l5r5e/templates/item/weapons.html' }}
</article>
<article>
{{> 'systems/l5r5e/templates/item/armors.html' }}
</article>
</section>
</form>

View File

@@ -0,0 +1,48 @@
<ul class="attributes-wrapper">
<li class="endurance-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.endurance' }}</strong>
<input class="centered-input" type="text" name="data.endurance" value="{{data.endurance}}" data-dtype="Number" disabled/>
</label>
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
<input class="centered-input" type="text" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number"/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
</li>
<li class="composure-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.composure' }}</strong>
<input class="centered-input" type="text" name="data.composure" value="{{data.composure}}" data-dtype="Number" disabled/>
</label>
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
<input class="centered-input" type="text" name="data.strife" value="{{data.strife}}" data-dtype="Number"/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
</li>
<li class="focus-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.focus' }}</strong>
<input class="centered-input" type="text" name="data.focus" value="{{data.focus}}" data-dtype="Number" disabled/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.focustip' }}</p>
</li>
<li class="vigilante-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.vigilante' }}</strong>
<input class="centered-input" type="text" name="data.vigilante" value="{{data.vigilante}}" data-dtype="Number" disabled/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.vigilantetip' }}</p>
</li>
<li class="void-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
<input class="centered-input" type="text" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number"/>
</label>
<label class="attribute-label">
<strong>{{ localize 'l5r5e.max' }}</strong>
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
</label>
</li>
</ul>

View File

@@ -0,0 +1,8 @@
<fieldset class="stances-content flexrow">
<legend class="section-header">{{ localize 'l5r5e.conflict.stance' }}</legend>
<ul>
{{#each data.rings as |ringValue ringId|}}
{{> 'systems/l5r5e/templates/sheets/actor/stance.html' stance=../data.stance ringId=ringId }}
{{/each}}
</ul>
</fieldset>

View File

@@ -0,0 +1,15 @@
<div class="feats-wrapper">
<fieldset class="section-header flexrow">
<legend class="feat-controls">
{{ localize 'l5r5e.feats' }}
<a class="feat-control feat-add" title="Add Item"><i class="fas fa-plus"></i></a>
</legend>
<ul class="item-list">
{{#each actor.items as |item id|}}
{{#if item.isFeat }}
{{> 'systems/l5r5e/templates/item/feat-entry.html' feat=item }}
{{/if}}
{{/each}}
</ul>
</fieldset>
</div>

View File

@@ -0,0 +1,19 @@
<ul>
<li>{{!-- Npc Type (minion / adversary) --}}
<select class="attribute-dtype" name="data.type">
{{#select data.type}}
{{#each data.types as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select>
</li>
{{!-- Martial --}}
<li>
<input type="text" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" placeholder="0"/>
</li>
{{!-- Social --}}
<li>
<input type="text" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" placeholder="0"/>
</li>
</ul>

View File

@@ -0,0 +1,20 @@
<fieldset class="narrative-content">
<legend class="text-block-header">{{ localize 'l5r5e.social.advantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#if item.isEquipment }}
{{> 'systems/l5r5e/templates/item/item-entry.html' item=item id=id }}
{{/if}}
{{/each}}
</ul>
</fieldset>
<fieldset class="narrative-content">
<legend class="text-block-header">{{ localize 'l5r5e.social.disadvantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#if item.isEquipment }}
{{> 'systems/l5r5e/templates/item/item-entry.html' item=item id=id }}
{{/if}}
{{/each}}
</ul>
</fieldset>

View File

@@ -0,0 +1,37 @@
<ul class="rings">
<li id="earth">
<label class="attribute-label earth centered-input">
<i class="i_earth"></i>
<strong>{{ localizeRing 'earth' }}</strong>
<input class="centered-input" type="text" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li id="air">
<label class="attribute-label air centered-input">
<i class="i_air"></i>
<strong>{{ localizeRing 'air' }}</strong>
<input class="centered-input" type="text" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li id="water">
<label class="attribute-label water centered-input">
<i class="i_water"></i>
<strong>{{ localizeRing 'water' }}</strong>
<input class="centered-input" type="text" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li id="fire">
<label class="attribute-label fire centered-input">
<i class="i_fire"></i>
<strong>{{ localizeRing 'fire' }}</strong>
<input class="centered-input" type="text" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li id="void">
<label class="attribute-label void centered-input">
<i class="i_void"></i>
<strong>{{ localizeRing 'void' }}</strong>
<input class="centered-input" type="text" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
</ul>

View File

@@ -0,0 +1,10 @@
<ul class="npc-skill">{{!-- Skills --}}
{{#each data.skills as |skillValue skillCatId|}}
<li>
<label>
{{localizeSkill skillCatId "title"}}
<input type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
{{/each}}
</ul>

View File

@@ -0,0 +1,43 @@
<ul class="social-content">
<li>
<label class="attribute-label centered-input">
{{ localize 'l5r5e.social.honor' }}
<input class="centered-input" type="text" name="data.social.honor" value="{{data.social.honor}}" placeholder="0"/>
</label>
</li>
<li>
<label class="attribute-label centered-input">
{{ localize 'l5r5e.social.glory' }}
<input class="centered-input" type="text" name="data.social.glory" value="{{data.social.glory}}" placeholder="0"/>
</label>
</li>
<li>
<label class="attribute-label centered-input">
{{ localize 'l5r5e.social.status' }}
<input class="centered-input" type="text" name="data.social.status" value="{{data.social.status}}" placeholder="0"/>
</label>
</li>
<li>
{{!-- Strength --}}
<select class="attribute-dtype" name="data.rings_affinities.strength.ring">
{{#select data.rings_affinities.strength.ring}}
{{#each data.stances as |stance|}}
<option value="{{stance}}">{{localizeRing stance}}</option>
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" placeholder="0"/>,
{{!-- Weakness --}}
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
{{#select data.rings_affinities.weakness.ring}}
{{#each data.stances as |stance|}}
<option value="{{stance}}">{{localizeRing stance}}</option>
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" placeholder="0"/>
{{!-- Attitude --}}
<input type="text" name="data.attitude" value="{{data.attitude}}" data-dtype="String" placeholder=""/>
<h2>{{ localize 'l5r5e.attributes.title' }}</h2>
</li>
</ul>

View File

@@ -0,0 +1,7 @@
<li class="stance-content">
<label for="stance_{{ringId}}" class="stance-title {{ringId}}">
{{ localizeRing ringId }}
<input id="stance_{{ringId}}" type="radio" name="data.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
</label>
<p class="quick-rules">{{ localizeStanceTip ringId }}</p>
</li>