diff --git a/README.md b/README.md index 4222e363..9b502a47 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ npm test ## Contributing Code and content contributions are accepted. Please feel free to submit issues -to the issue tracker or submit merge requests for code changes. +to the issue tracker or submit merge requests for code changes. To create an issue send a mail to [git+dungeonslayers-ds4-155-issue-@git.f3l.de](mailto:git+dungeonslayers-ds4-155-issue-@git.f3l.de). ## Licensing diff --git a/src/ds4.scss b/src/ds4.scss index b69bbd1f..db46a09a 100644 --- a/src/ds4.scss +++ b/src/ds4.scss @@ -21,4 +21,5 @@ @import "scss/components/character_values"; @import "scss/components/attributes_traits"; @import "scss/components/combat_values"; + @import "scss/components/character_progression"; } diff --git a/src/lang/en.json b/src/lang/en.json index c77f7b2b..84c7d542 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -5,6 +5,7 @@ "DS4.HeadingDetails": "Details", "DS4.HeadingEffects": "Effects", "DS4.HeadingItems": "Items", + "DS4.HeadingProfile": "Profile", "DS4.HeadingTalents": "Talents & Abilities", "DS4.AttackType": "Attack Type", "DS4.AttackTypeAbbr": "AT", @@ -80,6 +81,7 @@ "DS4.BaseInfoClass": "Class", "DS4.BaseInfoHeroClass": "Hero Class", "DS4.BaseInfoRacialAbilities": "Racial Abilites", + "DS4.BaseInfoCulture": "Culture", "DS4.ProgressionLevel": "Level", "DS4.ProgressionExperiencePoints": "Experience Points", "DS4.ProgressionTalentPoints": "Talent Points", @@ -88,5 +90,16 @@ "DS4.TalentRankBase": "Acquired Ranks", "DS4.TalentRankMax": "Maximum Ranks", "DS4.TalentRankMod": "Additional Ranks", - "DS4.TalentRankTotal": "Total Ranks" + "DS4.TalentRankTotal": "Total Ranks", + "DS4.LanguageLanguages": "Languages", + "DS4.LanguageAlphabets": "Alphabets", + "DS4.ProfileGender": "Gender", + "DS4.ProfileBirthday": "Birthday", + "DS4.ProfileBirthplace": "Birthplace", + "DS4.ProfileAge": "Age", + "DS4.ProfileHeight": "Height", + "DS4.ProfilHairColor": "Hair Color", + "DS4.ProfileWeight": "Weight", + "DS4.ProfileEyeColor": "Eye Color", + "DS4.ProfileSpecialCharacteristics": "Special Characteristics" } diff --git a/src/module/actor/actor-data.ts b/src/module/actor/actor-data.ts index 93385b65..746ae439 100644 --- a/src/module/actor/actor-data.ts +++ b/src/module/actor/actor-data.ts @@ -4,6 +4,8 @@ export interface DS4ActorDataType { combatValues: DS4ActorDataCombatValues; baseInfo: DS4ActorDataBaseInfo; progression: DS4ActorDataProgression; + language: DS4ActorDataLanguage; + profile: DS4ActorDataProfile; } interface DS4ActorDataAttributes { @@ -55,6 +57,7 @@ interface DS4ActorDataBaseInfo { class: string; heroClass: string; racialAbilities: string; + culture: string; } interface DS4ActorDataProgression { @@ -63,3 +66,20 @@ interface DS4ActorDataProgression { talentPoints: UsableResource; progressPoints: UsableResource; } + +interface DS4ActorDataLanguage { + languages: string; + alphabets: string; +} + +interface DS4ActorDataProfile { + gender: string; + birthday: string; + birthplace: string; + age: number; + height: number; + hairColor: string; + weight: number; + eyeColor: string; + specialCharacteristics: string; +} diff --git a/src/module/config.ts b/src/module/config.ts index 502927ef..c98f3d41 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -136,10 +136,11 @@ export const DS4 = { class: "DS4.BaseInfoClass", heroClass: "DS4.BaseInfoHeroClass", racialAbilities: "DS4.BaseInfoRacialAbilities", + culture: "DS4.BaseInfoCulture", }, /** - * Definme the progression info of a character + * Define the progression info of a character */ progression: { level: "DS4.ProgressionLevel", @@ -147,4 +148,42 @@ export const DS4 = { talentPoints: "DS4.ProgressionTalentPoints", progressPoints: "DS4.ProgressionProgressPoints", }, + + /** + * Define the language info of a character + */ + language: { + languages: "DS4.LanguageLanguages", + alphabets: "DS4.LanguageAlphabets", + }, + + /** + * Define the profile info of a character + */ + profile: { + gender: "DS4.ProfileGender", + birthday: "DS4.ProfileBirthday", + birthplace: "DS4.ProfileBirthplace", + age: "DS4.ProfileAge", + height: "DS4.ProfileHeight", + hairColor: "DS4.ProfilHairColor", + weight: "DS4.ProfileWeight", + eyeColor: "DS4.ProfileEyeColor", + specialCharacteristics: "DS4.ProfileSpecialCharacteristics", + }, + + /** + * Define the profile info types for hanndlebars of a character + */ + profileDTypes: { + gender: "String", + birthday: "String", + birthplace: "String", + age: "Number", + height: "Number", + hairColor: "String", + weight: "Number", + eyeColor: "String", + specialCharacteristics: "String", + }, }; diff --git a/src/module/ds4.ts b/src/module/ds4.ts index f8d88667..6fe0aa7a 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -42,6 +42,8 @@ async function registerHandlebarsPartials() { "systems/ds4/templates/actor/partials/overview-control-buttons.hbs", "systems/ds4/templates/actor/partials/attributes-traits.hbs", "systems/ds4/templates/actor/partials/combat-values.hbs", + "systems/ds4/templates/actor/partials/profile.hbs", + "systems/ds4/templates/actor/partials/character-progression.hbs", ]; return loadTemplates(templatePaths); } @@ -69,6 +71,8 @@ Hooks.once("setup", function () { "combatValues", "baseInfo", "progression", + "language", + "profile", ]; // Exclude some from sorting where the default order matters diff --git a/src/scss/components/_attributes_traits.scss b/src/scss/components/_attributes_traits.scss index 19cef982..09cb469b 100644 --- a/src/scss/components/_attributes_traits.scss +++ b/src/scss/components/_attributes_traits.scss @@ -8,7 +8,6 @@ } .attribute-value { border: 2px groove $c-border-groove; - line-height: $default-input-height; font-size: 1.5em; text-align: center; padding-left: 2px; @@ -17,6 +16,7 @@ input, .attribute-value-total { grid-column: span 2; + line-height: $default-input-height; } } } @@ -32,7 +32,6 @@ .trait-value { border: 2px groove $c-border-groove; font-size: 1.5em; - line-height: $default-input-height; text-align: center; padding-left: 2px; padding-right: 2px; @@ -40,6 +39,7 @@ input, .trait-value-total { grid-column: span 2; + line-height: $default-input-height; } } } diff --git a/src/scss/components/_basic_property.scss b/src/scss/components/_basic_property.scss index c253964e..40978da4 100644 --- a/src/scss/components/_basic_property.scss +++ b/src/scss/components/_basic_property.scss @@ -1,8 +1,11 @@ .basic-properties { flex: 0 0 100%; + gap: 2px; .basic-property { display: grid; align-content: end; + padding-left: 1px; + padding-right: 1px; & > label { font-weight: bold; @@ -13,6 +16,10 @@ width: 100%; } + .input-divider { + text-align: center; + } + @include mark-invalid-or-disabled-input; } } diff --git a/src/scss/components/_character_progression.scss b/src/scss/components/_character_progression.scss new file mode 100644 index 00000000..c2b3fdcd --- /dev/null +++ b/src/scss/components/_character_progression.scss @@ -0,0 +1,28 @@ +.progression { + .progression-entry { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + + padding-right: 3px; + h2.progression-label { + font-family: $font-heading; + display: block; + height: 50px; + padding: 0px; + color: $c-light-grey; + border: none; + line-height: 50px; + margin: $header-top-margin 0; + text-align: right; + //flex: 0; + } + input.progression-value { + margin-left: 5px; + flex: 0 0 40px; + text-align: left; + } + } +} diff --git a/src/scss/global/_flex.scss b/src/scss/global/_flex.scss index 271c64b3..3f23d105 100644 --- a/src/scss/global/_flex.scss +++ b/src/scss/global/_flex.scss @@ -18,6 +18,9 @@ .flex1 { flex: 1; } + .flex125 { + flex: 1.25; + } .flex15 { flex: 1.5; } @@ -51,6 +54,9 @@ .flex1 { flex: 1; } + .flex125 { + flex: 1.25; + } .flex15 { flex: 1.5; } diff --git a/src/scss/global/_grid.scss b/src/scss/global/_grid.scss index 8498a314..b8903f70 100644 --- a/src/scss/global/_grid.scss +++ b/src/scss/global/_grid.scss @@ -28,8 +28,8 @@ } .grid-6col { - grid-column: span 5 / span 5; - grid-template-columns: repeat(5, minmax(0, 1fr)); + grid-column: span 6 / span 6; + grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid-7col { diff --git a/src/scss/global/_window.scss b/src/scss/global/_window.scss index bbe12083..36985d71 100644 --- a/src/scss/global/_window.scss +++ b/src/scss/global/_window.scss @@ -1,5 +1,12 @@ .window-app { font-family: $font-primary; + input[type="text"], + input[type="number"], + input[type="password"], + input[type="date"], + input[type="time"] { + width: 100%; + } } .rollable { diff --git a/src/template.json b/src/template.json index 39b96699..f4aef42d 100644 --- a/src/template.json +++ b/src/template.json @@ -83,7 +83,8 @@ "race": "", "class": "", "heroClass": "", - "racialAbilities": "" + "racialAbilities": "", + "culture": "" }, "progression": { "level": 0, @@ -96,6 +97,21 @@ "total": 0, "used": 0 } + }, + "language": { + "languages": "", + "alphabets": "" + }, + "profile": { + "gender": "", + "birthday": "", + "birthplace": "", + "age": 0, + "height": 0, + "hairColor": "", + "weight": 0, + "eyeColor": "", + "specialCharacteristics": "" } } }, diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index be40d1fd..05a62038 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -2,89 +2,57 @@ {{!-- Sheet Header --}}
-
+

-
-
- {{!-- 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. --}} -
- {{!-- "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. --}} -
- -
- + {{> systems/ds4/templates/actor/partials/character-progression.hbs}} + +
+
+ + +
+
+ + +
+
+ +
+ / +
-
-
-
- -
- -
-
-
- -
- / - -
-
-
- -
- / - -
-
+
+ +
+ / +
-
- -
- -
+
+ +
-
- -
- -
-
-
- -
- -
-
-
- -
- -
+
+ +
- +
+
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}} {{> systems/ds4/templates/actor/partials/combat-values.hbs}} -
@@ -92,6 +60,7 @@ @@ -102,6 +71,9 @@ {{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}} + {{! Profile Tab --}} + {{> systems/ds4/templates/actor/partials/profile.hbs}} + {{!-- Talents Tab --}} {{> systems/ds4/templates/actor/partials/talents-overview.hbs}} diff --git a/src/templates/actor/partials/character-progression.hbs b/src/templates/actor/partials/character-progression.hbs new file mode 100644 index 00000000..f22376f0 --- /dev/null +++ b/src/templates/actor/partials/character-progression.hbs @@ -0,0 +1,15 @@ +
+
+

+

+ +
+
+

+

+ +
+
diff --git a/src/templates/actor/partials/profile.hbs b/src/templates/actor/partials/profile.hbs new file mode 100644 index 00000000..b0034128 --- /dev/null +++ b/src/templates/actor/partials/profile.hbs @@ -0,0 +1,13 @@ +
+
+ {{#each data.profile as |profile-data-value profile-data-key|}} +
+ + +
+ {{/each}} +
+
\ No newline at end of file