From 0178e68bf798673fcb45614adb6743ea43853a2a Mon Sep 17 00:00:00 2001 From: U~man Date: Sun, 28 Jun 2020 18:33:03 +0200 Subject: [PATCH] WIP: Char fixes and monster base --- README.md | 10 +- src/lang/en.json | 10 ++ src/module/actor/monster-sheet.js | 6 +- src/scss/actor-base.scss | 34 +++++++ src/scss/character.scss | 32 ------ src/scss/monster.scss | 15 +++ src/template.json | 29 +++++- src/templates/actors/character-sheet.html | 8 +- src/templates/actors/monster-sheet.html | 33 +++++++ .../partials/character-attributes-tab.html | 15 ++- .../partials/monster-attributes-tab.html | 97 +++++++++++++++++++ .../actors/partials/monster-header.html | 40 ++++++++ 12 files changed, 281 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index dfbda13..9e04acf 100644 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ -### Old School Essentials System for Foundry VTT \ No newline at end of file +### Old School Essentials System for Foundry VTT + +## License +Old-School Essentials is a trademark of Necrotic Gnome. +This Foundry VTT system requires Old-School Essentials Core Rules and does not contain any copyright infringement material. + +## Contributions +This system is currently under heavy development. +Feel free to grab a TO DO issue from the gitlab board. You can then do a merge request on the `development` branch. \ No newline at end of file diff --git a/src/lang/en.json b/src/lang/en.json index c79392d..856f293 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -8,6 +8,10 @@ "OSE.Alignment": "Alignment", "OSE.Level": "Level", "OSE.Experience": "Experience", + "OSE.Treasure": "Treasure type", + "OSE.Size": "Size", + "OSE.Morale": "Morale", + "OSE.Appearing": "NA", "OSE.scores.str.long": "Strength", "OSE.scores.str.short": "STR", @@ -29,12 +33,18 @@ "OSE.saves.spells.short": "S", "OSE.Health": "Hit Points", + "OSE.HealthShort": "HP", "OSE.HitDice": "Hit Dice", + "OSE.HitDiceShort": "HD", "OSE.Movement": "Movement", + "OSE.MovementShort": "MOV", "OSE.SpecialMovement": "Special Movement", "OSE.ArmorClass": "Armor Class", + "OSE.ArmorClassShort": "AC", "OSE.SpellDC": "DC", + "OSE.Thac0": "THAC0", "OSE.Initiative": "Initiative", + "OSE.InitiativeShort": "INIT", "OSE.category.attributes": "Attributes", diff --git a/src/module/actor/monster-sheet.js b/src/module/actor/monster-sheet.js index d4f08a9..61e51af 100644 --- a/src/module/actor/monster-sheet.js +++ b/src/module/actor/monster-sheet.js @@ -18,9 +18,9 @@ export class OseActorSheetMonster extends ActorSheet { return mergeObject(super.defaultOptions, { classes: ["ose", "sheet", "monster", "actor"], template: "systems/ose/templates/actors/monster-sheet.html", - width: 520, - height: 580, - resizable: false, + width: 450, + height: 560, + resizable: true, tabs: [ { navSelector: ".tabs", diff --git a/src/scss/actor-base.scss b/src/scss/actor-base.scss index fb802e5..1556662 100644 --- a/src/scss/actor-base.scss +++ b/src/scss/actor-base.scss @@ -8,6 +8,23 @@ padding: 0; } + .panel { + border: 1px solid $colorDark; + .panel-title { + color: whitesmoke; + background: $colorDark; + line-height: 14px; + height: 20px; + text-align: center; + margin: 0; + padding: 4px; + } + .panel-content { + margin: 0; + padding: 0; + } + } + /* Header Summary Details */ .header-details { h1 { @@ -75,6 +92,7 @@ .attribute-name { color: whitesmoke; padding: 2px; + margin: 0; background: $colorDark; text-align: center; } @@ -85,6 +103,22 @@ } } } + .attribute-group { + .attributes { + .attribute { + display: flex; + flex-direction: row; + .attribute-name { + width: 40px; + margin: 0; + line-height: 28px; + } + } + } + } + .editor { + height: 300px; + } .inventory { .item-entry { padding: 0; diff --git a/src/scss/character.scss b/src/scss/character.scss index 65313d5..bdb073b 100644 --- a/src/scss/character.scss +++ b/src/scss/character.scss @@ -18,40 +18,8 @@ /* Sheet Body */ /* ----------------------------------------- */ .sheet-body { - .attribute-group { - .attributes { - .attribute { - display: flex; - flex-direction: row; - .attribute-name { - width: 40px; - margin: 0; - line-height: 28px; - } - } - } - } - .editor { - height: 300px; - } } - .panel { - border: 1px solid $colorDark; - .panel-title { - color: whitesmoke; - background: $colorDark; - line-height: 14px; - height: 20px; - text-align: center; - margin: 0; - padding: 4px; - } - .panel-content { - margin: 0; - padding: 0; - } - } .abilities { .panel-content { diff --git a/src/scss/monster.scss b/src/scss/monster.scss index e69de29..e5fb811 100644 --- a/src/scss/monster.scss +++ b/src/scss/monster.scss @@ -0,0 +1,15 @@ +.ose.actor.monster { + min-height: 565px; + min-width: 460px; + .sheet-body { + .editor { + height: 300px; + } + } + .abilities { + .panel-content { + height: 230px; + overflow: auto; + } + } +} diff --git a/src/template.json b/src/template.json index 869b76a..929159e 100644 --- a/src/template.json +++ b/src/template.json @@ -74,7 +74,7 @@ "value": 0, "mod": 0 }, - "thaco": { + "thac0": { "value": 19, "mod": 0 }, @@ -101,6 +101,8 @@ "alignment": "", "xp": 0, "treasure": "", + "size": "", + "appearing": "", "morale": 0 }, "saves": { @@ -110,7 +112,7 @@ "B": 10, "S": 10 }, - "thaco": { + "thac0": { "value": 19, "mod": 0 }, @@ -126,6 +128,29 @@ "movement": { "base": 0, "encounter": 0 + }, + "spells": { + "dc": 0, + "lvl1": { + "value": 0, + "max": 0 + }, + "lvl2": { + "value": 0, + "max": 0 + }, + "lvl3": { + "value": 0, + "max": 0 + }, + "lvl4": { + "value": 0, + "max": 0 + }, + "lvl5": { + "value": 0, + "max": 0 + } } } }, diff --git a/src/templates/actors/character-sheet.html b/src/templates/actors/character-sheet.html index f182d40..a878aa4 100644 --- a/src/templates/actors/character-sheet.html +++ b/src/templates/actors/character-sheet.html @@ -22,11 +22,7 @@ {{! Sheet Body }}
{{! Attributes Tab }} -
+
{{> "systems/ose/templates/actors/partials/character-attributes-tab.html"}}
@@ -40,4 +36,4 @@ button=true owner=owner editable=editable}}
- + \ No newline at end of file diff --git a/src/templates/actors/monster-sheet.html b/src/templates/actors/monster-sheet.html index e69de29..9786ce7 100644 --- a/src/templates/actors/monster-sheet.html +++ b/src/templates/actors/monster-sheet.html @@ -0,0 +1,33 @@ +
+ {{! Sheet Header }} +
+ {{> "systems/ose/templates/actors/partials/monster-header.html"}} +
+ + {{! Sheet Tab Navigation }} + + {{! Sheet Body }} +
+ {{! Attributes Tab }} +
+ {{> "systems/ose/templates/actors/partials/monster-attributes-tab.html"}} +
+
+ {{> "systems/ose/templates/actors/partials/character-spells-tab.html"}} +
+
+ {{editor content=data.details.biography target="data.details.biography" + button=true owner=owner editable=editable}} +
+
+
\ No newline at end of file diff --git a/src/templates/actors/partials/character-attributes-tab.html b/src/templates/actors/partials/character-attributes-tab.html index 860e1d6..a65e22e 100644 --- a/src/templates/actors/partials/character-attributes-tab.html +++ b/src/templates/actors/partials/character-attributes-tab.html @@ -1,7 +1,7 @@