add base info to character sheet

This commit is contained in:
Johannes Loher 2020-12-30 00:35:18 +01:00
parent 59fb033db8
commit e7219ab81e
5 changed files with 80 additions and 38 deletions

View file

@ -78,6 +78,6 @@
"DS4.BaseInfoRacialAbilities": "Racial Abilites",
"DS4.ProgressionLevel": "Level",
"DS4.ProgressionExperiencePoints": "Experience Points",
"DS4.ProgressionTalentPoints": "Tylent Points",
"DS4.ProgressionTalentPoints": "Talent Points",
"DS4.ProgressionProgressPoints": "Progress Points"
}

View file

@ -30,7 +30,7 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
return mergeObject(super.defaultOptions, {
classes: ["ds4", "sheet", "actor"],
template: "systems/ds4/templates/actor/actor-sheet.hbs",
width: 600,
width: 725,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
});

View file

@ -58,6 +58,12 @@ Hooks.once("setup", function () {
"armorTypesAbbr",
"armorMaterialTypes",
"armorMaterialTypesAbbr",
"armorMaterialTypes",
"attributes",
"traits",
"combatValues",
"baseInfo",
"progression",
];
// Exclude some from sorting where the default order matters

View file

@ -5,7 +5,7 @@
$header-top-margin: 5px;
header.sheet-header {
flex: 0 0 210px;
flex: 0 0 auto;
overflow: hidden;
display: flex;
flex-direction: row;
@ -23,6 +23,10 @@ header.sheet-header {
flex: 1;
}
.base-infos {
flex: 0 0 100%;
}
h1.charname {
height: 50px;
padding: 0px;

View file

@ -4,45 +4,77 @@
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
{{!-- The grid classes are defined in scss/global/_grid.scss. To use, use both the "grid" and "grid-Ncol"
class where "N" can be any number from 1 to 12 and will create that number of columns. --}}
<div class="resources grid grid-2col">
{{!-- "flex-group-center" is also defined in the _grid.scss file and it will add a small amount of
padding, a border, and will center all of its child elements content and text. --}}
<div class="resource flex-group-center">
<label for="data.health.value" class="resource-label">Health</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="data.health.value" value="{{data.health.value}}" data-dtype="Number" />
<span> / </span>
<input type="text" name="data.health.max" value="{{data.health.max}}" data-dtype="Number" />
</div>
</div>
{{!-- The grid classes are defined in scss/global/_grid.scss. To use, use both the "grid" and "grid-Ncol"
class where "N" can be any number from 1 to 12 and will create that number of columns. --}}
<div class="base-infos grid grid-3col">
{{!-- "flex-group-center" is also defined in the _grid.scss file and it will add a small amount of
padding, a border, and will center all of its child elements content and text. --}}
<div class="base-info flex-group-center">
<label for="data.baseInfo.race" class="base-info-label">{{config.baseInfo.race}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.baseInfo.race" value="{{data.baseInfo.race}}" data-dtype="String" />
</div>
<div class="resource flex-group-center">
<label for="data.power.value" class="resource-label">Power</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="data.power.value" value="{{data.power.value}}" data-dtype="Number" />
<span> / </span>
<input type="text" name="data.power.max" value="{{data.power.max}}" data-dtype="Number" />
</div>
<div class="base-info flex-group-center">
<div class="grid grid-3col">
<div class="base-info flex-group-center">
<label for="data.progression.level" class="base-info-label">{{config.progression.level}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.progression.level" value="{{data.progression.level}}"
data-dtype="Number" />
</div>
</div>
<div class="base-info flex-group-center">
<label for="data.progression.progressPoints"
class="base-info-label">{{config.progression.progressPoints}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.progression.progressPoints.used"
value="{{data.progression.progressPoints.used}}" data-dtype="Number" /><span> /
</span><input type="text" name="data.progression.progressPoints.total"
value="{{data.progression.progressPoints.total}}" data-dtype="Number" />
</div>
</div>
<div class="base-info flex-group-center">
<label for="data.progression.talentPoints"
class="base-info-label">{{config.progression.talentPoints}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.progression.talentPoints.used"
value="{{data.progression.talentPoints.used}}" data-dtype="Number" /><span> /
</span><input type="text" name="data.progression.talentPoints.total"
value="{{data.progression.talentPoints.total}}" data-dtype="Number" />
</div>
</div>
</div>
</div>
{{!-- The grid classes are defined in scss/global/_grid.scss. To use, use both the "grid" and "grid-Ncol"
class where "N" can be any number from 1 to 12 and will create that number of columns. --}}
<div class="abilities grid grid-3col">
{{#each data.abilities as |ability key|}}
<div class="ability flexrow flex-group-center">
<label for="data.abilities.{{key}}.value" class="resource-label">{{key}}</label>
<input
type="text"
name="data.abilities.{{key}}.value"
value="{{ability.value}}"
data-dtype="Number"
/>
<span class="ability-mod rollable" data-roll="d20+@abilities.{{key}}.mod" data-label="{{key}}"
>{{numberFormat ability.mod decimals=0 sign=true}}</span
>
<div class="base-info flex-group-center">
<label for="data.baseInfo.class" class="base-info-label">{{config.baseInfo.class}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.baseInfo.class" value="{{data.baseInfo.class}}" data-dtype="String" />
</div>
</div>
<div class="base-info flex-group-center">
<label for="data.baseInfo.racialAbilities"
class="base-info-label">{{config.baseInfo.racialAbilities}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.baseInfo.racialAbilities" value="{{data.baseInfo.racialAbilities}}"
data-dtype="String" />
</div>
</div>
<div class="base-info flex-group-center">
<label for="data.progression.experiencePoints"
class="base-info-label">{{config.progression.experiencePoints}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.progression.experiencePoints"
value="{{data.progression.experiencePoints}}" data-dtype="Number" />
</div>
</div>
<div class="base-info flex-group-center">
<label for="data.baseInfo.heroClass" class="base-info-label">{{config.baseInfo.heroClass}}</label>
<div class="base-info-content flexrow flex-center flex-between">
<input type="text" name="data.baseInfo.heroClass" value="{{data.baseInfo.heroClass}}"
data-dtype="String" />
</div>
{{/each}}
</div>
</div>
</header>
@ -63,4 +95,4 @@
{{!-- Items Tab --}}
{{> systems/ds4/templates/actor/partials/items.hbs}}
</section>
</form>
</form>