add basic creature sheet
This commit is contained in:
parent
d416c14cbd
commit
17d0213e62
11 changed files with 120 additions and 20 deletions
|
@ -10,6 +10,7 @@
|
|||
"DS4.HeadingProfile": "Profil",
|
||||
"DS4.HeadingTalents": "Talente & Fähigkeiten",
|
||||
"DS4.HeadingSpells": "Zaubersprüche",
|
||||
"DS4.HeadingDescription": "Beschreibung",
|
||||
"DS4.AttackType": "Angriffs Typ",
|
||||
"DS4.AttackTypeAbbr": "AT",
|
||||
"DS4.WeaponBonus": "Waffen Bonus",
|
||||
|
@ -130,6 +131,7 @@
|
|||
"DS4.TalentRankTotal": "Gesamter Rang",
|
||||
"DS4.CharacterLanguageLanguages": "Sprachen",
|
||||
"DS4.CharacterLanguageAlphabets": "Schriftzeichen",
|
||||
"DS4.CharacterProfileBiography": "Biographie",
|
||||
"DS4.CharacterProfileGender": "Geschlecht",
|
||||
"DS4.CharacterProfileBirthday": "Geburtstag",
|
||||
"DS4.CharacterProfileBirthplace": "Geburtsort",
|
||||
|
@ -156,6 +158,7 @@
|
|||
"DS4.CreatureBaseInfoCreatureType": "Kreaturengruppe",
|
||||
"DS4.CreatureBaseInfoSizeCategory": "Größenkategorie",
|
||||
"DS4.CreatureBaseInfoExperiencePoints": "Erfahrungspunkte",
|
||||
"DS4.CreatureBaseInfoDescription": "Beschreibung",
|
||||
"DS4.WarningManageActiveEffectOnOwnedItem": "Das Verwalten von aktiven Effekten innerhalb eines besessen Items wird derzeit nicht unterstützt und wird in einem nachfolgenden Update hinzugefügt.",
|
||||
"DS4.ErrorDiceCritOverlap": "Es gibt eine Überlappung zwischen Patzern und Immersiegen.",
|
||||
"DS4.ErrorExplodingRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten.",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"DS4.HeadingProfile": "Profile",
|
||||
"DS4.HeadingTalents": "Talents & Abilities",
|
||||
"DS4.HeadingSpells": "Spells",
|
||||
"DS4.HeadingDescription": "Description",
|
||||
"DS4.AttackType": "Attack Type",
|
||||
"DS4.AttackTypeAbbr": "AT",
|
||||
"DS4.WeaponBonus": "Weapon Bonus",
|
||||
|
@ -130,6 +131,7 @@
|
|||
"DS4.TalentRankTotal": "Total Ranks",
|
||||
"DS4.CharacterLanguageLanguages": "Languages",
|
||||
"DS4.CharacterLanguageAlphabets": "Alphabets",
|
||||
"DS4.CharacterProfileBiography": "Biography",
|
||||
"DS4.CharacterProfileGender": "Gender",
|
||||
"DS4.CharacterProfileBirthday": "Birthday",
|
||||
"DS4.CharacterProfileBirthplace": "Birthplace",
|
||||
|
@ -156,6 +158,7 @@
|
|||
"DS4.CreatureBaseInfoCreatureType": "Creature Type",
|
||||
"DS4.CreatureBaseInfoSizeCategory": "Size Category",
|
||||
"DS4.CreatureBaseInfoExperiencePoints": "Experience Points",
|
||||
"DS4.CreatureBaseInfoDescription": "Description",
|
||||
"DS4.WarningManageActiveEffectOnOwnedItem": "Managing Active Effects within an Owned Item is not currently supported and will be added in a subsequent update.",
|
||||
"DS4.ErrorDiceCritOverlap": "There's an overlap between Fumbles and Coups",
|
||||
"DS4.ErrorExplodingRecursionLimitExceeded": "Maximum recursion depth for exploding dice roll exceeded",
|
||||
|
|
|
@ -75,6 +75,7 @@ interface DS4ActorDataCharacterLanguage {
|
|||
}
|
||||
|
||||
interface DS4ActorDataCharacterProfile {
|
||||
biography: string;
|
||||
gender: string;
|
||||
birthday: string;
|
||||
birthplace: string;
|
||||
|
@ -100,4 +101,5 @@ interface DS4ActorDataCreatureBaseInfo {
|
|||
creatureType: CreatureType;
|
||||
sizeCategory: SizeCategory;
|
||||
experiencePoints: number;
|
||||
description: string;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,24 @@ import { DS4ActorDataType } from "./actor-data";
|
|||
* @extends {ActorSheet}
|
||||
*/
|
||||
export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4ItemDataType> {
|
||||
/** @override */
|
||||
static get defaultOptions(): FormApplicationOptions {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["ds4", "sheet", "actor"],
|
||||
width: 745,
|
||||
height: 600,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "inventory" }],
|
||||
});
|
||||
}
|
||||
|
||||
/** @override */
|
||||
get template(): string {
|
||||
const path = "systems/ds4/templates/actor";
|
||||
return `${path}/${this.actor.data.type}-sheet.hbs`;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* This method returns the data for the template of the actor sheet.
|
||||
* It explicitly adds the items of the object sorted by type in the
|
||||
|
@ -25,17 +43,6 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
|
|||
return data;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions(): FormApplicationOptions {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["ds4", "sheet", "actor"],
|
||||
template: "systems/ds4/templates/actor/actor-sheet.hbs",
|
||||
width: 745,
|
||||
height: 600,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "inventory" }],
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
|
|
|
@ -187,6 +187,7 @@ export const DS4 = {
|
|||
* Define the profile info of a character
|
||||
*/
|
||||
characterProfile: {
|
||||
biography: "DS4.CharacterProfileBiography",
|
||||
gender: "DS4.CharacterProfileGender",
|
||||
birthday: "DS4.CharacterProfileBirthday",
|
||||
birthplace: "DS4.CharacterProfileBirthplace",
|
||||
|
@ -202,6 +203,7 @@ export const DS4 = {
|
|||
* Define the profile info types for hanndlebars of a character
|
||||
*/
|
||||
characterProfileDTypes: {
|
||||
biography: "String",
|
||||
gender: "String",
|
||||
birthday: "String",
|
||||
birthplace: "String",
|
||||
|
@ -246,6 +248,7 @@ export const DS4 = {
|
|||
creatureType: "DS4.CreatureBaseInfoCreatureType",
|
||||
sizeCategory: "DS4.CreatureBaseInfoSizeCategory",
|
||||
experiencePoints: "DS4.CreatureBaseInfoExperiencePoints",
|
||||
description: "DS4.CreatureBaseInfoDescription",
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,7 +87,8 @@
|
|||
"foeFactor": 1,
|
||||
"creatureType": "humanoid",
|
||||
"sizeCategory": "normal",
|
||||
"experiencePoints": 0
|
||||
"experiencePoints": 0,
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"character": {
|
||||
|
@ -111,6 +112,7 @@
|
|||
}
|
||||
},
|
||||
"profile": {
|
||||
"biography": "",
|
||||
"gender": "",
|
||||
"birthday": "",
|
||||
"birthplace": "",
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
|
||||
<div class="flexrow basic-properties">
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.race">{{config.characterBaseInfo.race}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.race">{{config.characterBaseInfo.race}}</label>
|
||||
<input type="text" name="data.baseInfo.race" value="{{data.baseInfo.race}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.culture">{{config.characterBaseInfo.culture}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.culture">{{config.characterBaseInfo.culture}}</label>
|
||||
<input type="text" name="data.baseInfo.culture" value="{{data.baseInfo.culture}}"
|
||||
data-dtype="String" />
|
||||
</div>
|
||||
|
@ -39,7 +41,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.class">{{config.characterBaseInfo.class}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.class">{{config.characterBaseInfo.class}}</label>
|
||||
<input type="text" name="data.baseInfo.class" value="{{data.baseInfo.class}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
|
@ -81,7 +84,8 @@
|
|||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="biography">
|
||||
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
|
||||
{{editor content=data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</form>
|
74
src/templates/actor/creature-sheet.hbs
Normal file
74
src/templates/actor/creature-sheet.hbs
Normal file
|
@ -0,0 +1,74 @@
|
|||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100" />
|
||||
<div class="header-fields flexrow">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
|
||||
<div class="flexrow basic-properties">
|
||||
<div class="basic-property">
|
||||
<label>{{config.creatureBaseInfo.creatureType}}</label>
|
||||
<select name="data.baseInfo.creatureType" data-type="String">
|
||||
{{#select data.baseInfo.creatureType}}
|
||||
{{#each config.creatureTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.loot">{{config.creatureBaseInfo.loot}}</label>
|
||||
<input type="text" name="data.baseInfo.loot" value="{{data.baseInfo.loot}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.foeFactor">{{config.creatureBaseInfo.foeFactor}}</label>
|
||||
<input type="text" name="data.baseInfo.foeFactor" value="{{data.baseInfo.foeFactor}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label>{{config.creatureBaseInfo.sizeCategory}}</label>
|
||||
<select name="data.baseInfo.sizeCategory" data-type="String">
|
||||
{{#select data.baseInfo.sizeCategory}}
|
||||
{{#each config.creatureSizeCategories as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.experiencePoints">{{config.creatureBaseInfo.experiencePoints}}</label>
|
||||
<input type="text" name="data.baseInfo.experiencePoints" value="{{data.baseInfo.experiencePoints}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="character-values">
|
||||
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/combat-values.hbs}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
|
@ -1,6 +1,7 @@
|
|||
<div class="tab profile" data-group="primary" data-tab="profile">
|
||||
<div class="grid grid-2col">
|
||||
{{#each data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (neq profile-data-key 'biography')}}
|
||||
<div class="profile-entry">
|
||||
<label for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.characterProfile profile-data-key}}
|
||||
|
@ -8,6 +9,7 @@
|
|||
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
|
||||
data-dtype="{{lookup ../config/characterProfileDTypes profile-data-key}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="description">{{localize "DS4.HeadingDescription"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.HeadingEffects"}}</a>
|
||||
{{#if isPhysical}}
|
||||
<a class="item" data-tab="details">{{localize "DS4.HeadingDetails"}}</a>
|
||||
|
|
|
@ -31,7 +31,7 @@ Additional elements of the side-properties div can be handed over via the @parti
|
|||
{{/if}}
|
||||
{{> @partial-block}}
|
||||
</div>
|
||||
<div class="description" title="{{localize 'DS4.Description'}}">
|
||||
<div class="description" title="{{localize 'DS4.HeadingDescription'}}">
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue