diff --git a/src/main.mjs b/src/main.mjs index 89239448..ddfa2dd7 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -133,6 +133,19 @@ Hooks.once("init", () => { label: 'DSA41.ActiveEffectLabels.ActiveEffect' }) + game.settings.register('DSA_4-1', 'optional_colorfuldice', { + name: "Optional: Farbige Würfel nach Paramanthus", + hint: "Färbt die Würfel je nach Attribut ein", + scope: "client", + config: true, + type: Boolean, + default: false, + onChange: value => { + }, + requiresReload: false + }) + + game.settings.register('DSA_4-1', 'optional_trefferzonen', { name: "Optional: Trefferzonen", hint: "Ersetzt das Wundensystem aus dem BRW durch das Trefferzonensystem aus WdH", diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index 464663ab..c322ade3 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -144,6 +144,59 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { context.zonenruestung = game.settings.get("DSA_4-1", "optional_ruestungzonen") context.trefferzonen = game.settings.get("DSA_4-1", "optional_trefferzonen") context.ausdauer = game.settings.get("DSA_4-1", "optional_ausdauer") + context.colorfulDice = game.settings.get('DSA_4-1', 'optional_colorfuldice') + + context.attributes = [ + { + eigenschaft: "mu", + name: "MU", + tooltip: "Mut", + wert: context.derived.attribute.mu.aktuell ?? 0, + }, + { + eigenschaft: "kl", + name: "KL", + tooltip: "Klugheit", + wert: context.derived.attribute.kl.aktuell ?? 0, + }, + { + eigenschaft: "in", + name: "IN", + tooltip: "Intuition", + wert: context.derived.attribute.in.aktuell ?? 0, + }, + { + eigenschaft: "ch", + name: "CH", + tooltip: "Charisma", + wert: context.derived.attribute.ch.aktuell ?? 0, + }, + { + eigenschaft: "ff", + name: "FF", + tooltip: "Fingerfertigkeit", + wert: context.derived.attribute.ff.aktuell ?? 0, + }, + { + eigenschaft: "ge", + name: "GE", + tooltip: "Geschicklichkeit", + wert: context.derived.attribute.ge.aktuell ?? 0, + }, + { + eigenschaft: "ko", + name: "KO", + tooltip: "Konstitution", + wert: context.derived.attribute.ko.aktuell ?? 0, + }, + { + eigenschaft: "kk", + name: "KK", + tooltip: "Körperkraft", + wert: context.derived.attribute.kk.aktuell ?? 0, + }, + ] + break; case "meta": Meta._prepareContext(context, this.object) diff --git a/src/style/atoms/_colours.scss b/src/style/atoms/_colours.scss index 4fc2e42f..a352d9b1 100644 --- a/src/style/atoms/_colours.scss +++ b/src/style/atoms/_colours.scss @@ -35,8 +35,31 @@ $dice-box-shadow: rgba(0, 0, 0, 0.25); $pill-box-shadow: rgba(0, 0, 0, 0.3); $attribute-die-border-color: #000; + $attribute-die-color: #F00; $attribute-die-label-color: #FFF; + +$attribute-die-co-color: #b3241a; +$attribute-die-sm-color: #8259a3; +$attribute-die-in-color: #388834; +$attribute-die-ch-color: #0d0d0d; + +$attribute-die-dx-color: #688ec4; +$attribute-die-ag-color: #d5b467; +$attribute-die-bd-color: #a3a3a3; +$attribute-die-st-color: #d6a878; + +$attribute-die-co-text-color: #fff; +$attribute-die-sm-text-color: #fff; +$attribute-die-in-text-color: #fff; +$attribute-die-ch-text-color: #fff; + +$attribute-die-dx-text-color: #000; +$attribute-die-ag-text-color: #000; +$attribute-die-bd-text-color: #000; +$attribute-die-st-text-color: #000; + + $attribute-label-color: #FFF; $attribute-label-background-color: #0008; diff --git a/src/style/molecules/_attributes.scss b/src/style/molecules/_attributes.scss index 12830c1f..5bcbd8ed 100644 --- a/src/style/molecules/_attributes.scss +++ b/src/style/molecules/_attributes.scss @@ -29,49 +29,24 @@ svg { position: absolute; - left: 4px; - top: 4px; - bottom: 4px; - right: 4px; - } + left: -6px; + top: -6px; + bottom: -6px; + right: -6px; - .border { - fill: rgba(0, 0, 0, 0); - stroke: colours.$attribute-die-border-color; - } - - .center { - fill: colours.$attribute-die-color; - stroke: colours.$attribute-die-border-color; - } - - .topleft { - fill: color.adjust(colours.$attribute-die-color, $lightness: numbers.$lighter_factor); - stroke: colours.$attribute-die-border-color; - } - - .bottomleft { - fill: color.adjust(colours.$attribute-die-color, $lightness: numbers.$lightest_factor); - stroke: colours.$attribute-die-border-color; - } - - .topright { - fill: color.adjust(colours.$attribute-die-color, $lightness: numbers.$darken_factor); - stroke: colours.$attribute-die-border-color; - } - - .bottomright, .bottom { - fill: color.adjust(colours.$attribute-die-color, $lightness: numbers.$darkest_factor); - stroke: colours.$attribute-die-border-color; + path { + fill: colours.$attribute-die-color; + } } } .wert { font-weight: bold; position: absolute; - left: 0; + left: -2px; width: 48px; - top: 0; + top: -2px; + font-size: smaller; line-height: 48px; vertical-align: middle; text-align: center; @@ -90,6 +65,99 @@ background-color: colours.$attribute-label-background-color; } } + + &.colorfulDice { + + &.Mut { + + .die svg path { + fill: colours.$attribute-die-co-color; + } + + .wert { + color: colours.$attribute-die-co-text-color; + } + } + + .Klugheit { + + .die svg path { + fill: colours.$attribute-die-sm-color; + } + + .wert { + color: colours.$attribute-die-sm-text-color; + } + } + + .Intuition { + + .die svg path { + fill: colours.$attribute-die-in-color; + } + + .wert { + color: colours.$attribute-die-in-text-color; + } + } + + .Charisma { + + .die svg path { + fill: colours.$attribute-die-ch-color; + } + + .wert { + color: colours.$attribute-die-ch-text-color; + } + } + + .Geschicklichkeit { + + .die svg path { + fill: colours.$attribute-die-dx-color; + } + + .wert { + color: colours.$attribute-die-dx-text-color; + } + } + + .Fingerfertigkeit { + + .die svg path { + fill: colours.$attribute-die-ag-color; + } + + .wert { + color: colours.$attribute-die-ag-text-color; + } + } + + .Konstitution { + + .die svg path { + fill: colours.$attribute-die-bd-color; + } + + .wert { + color: colours.$attribute-die-bd-text-color; + } + } + + .Körperkraft { + + .die svg path { + fill: colours.$attribute-die-st-color; + } + + .wert { + color: colours.$attribute-die-st-text-color; + } + } + + } + } } } diff --git a/src/style/organisms/_character-sheet.scss b/src/style/organisms/_character-sheet.scss index 14ae4631..60f938fb 100644 --- a/src/style/organisms/_character-sheet.scss +++ b/src/style/organisms/_character-sheet.scss @@ -14,7 +14,7 @@ display: unset; /* we are on our own */ position: relative; - header.sheet-header { + .header-fields { position: absolute; top: 0; left: 0; @@ -44,7 +44,7 @@ height: $tabs-height; } - section.sheet-body { + section.tab { position: absolute; top: $attribute-height+$tabs-height+$tabs-spacing+4px; left: $sidebar-width; diff --git a/src/templates/actor/character/main-sheet.hbs b/src/templates/actor/character/main-sheet.hbs index d034f3a8..089a3ae1 100644 --- a/src/templates/actor/character/main-sheet.hbs +++ b/src/templates/actor/character/main-sheet.hbs @@ -4,7 +4,7 @@
{{!-- Header stuff goes here --}}
-
+
{{#each attributes}} {{> "systems/DSA_4-1/templates/ui/partial-attribute-button.hbs" this}} {{/each}} diff --git a/src/templates/ui/partial-attribute-button.hbs b/src/templates/ui/partial-attribute-button.hbs index ae542d07..2fce6caa 100644 --- a/src/templates/ui/partial-attribute-button.hbs +++ b/src/templates/ui/partial-attribute-button.hbs @@ -1,4 +1,5 @@ -
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} diff --git a/src/templates/ui/partial-die.hbs b/src/templates/ui/partial-die.hbs index dfb408fc..8b86f709 100644 --- a/src/templates/ui/partial-die.hbs +++ b/src/templates/ui/partial-die.hbs @@ -1,43 +1,8 @@ - - + + + - - - - - - + fill="#000000" + d="m 379.93,375.668 c -0.57,0.019 -1.226,0.228 -1.585,0.731 l -80.673,96.527 c -1.342,1.681 -1.433,2.056 0.366,2.073 l 161.59,-0.427 c 2.221,-0.182 2.23,-0.07 0.792,-1.951 l -79.27,-96.527 c -0.164,-0.254 -0.649,-0.44 -1.22,-0.426 z m 15.489,8.598 72.746,88.478 c 0.974,1.182 1.212,1.249 2.927,0.427 l 38.354,-17.562 c 2.513,-1.134 2.165,-1.366 0.487,-2.5 z m -33.965,3.232 c -0.034,-0.072 -0.625,0.37 -1.952,1.281 l -105.612,69.513 33.05,15.001 c 1.724,0.568 2.239,0.599 3.354,-0.793 l 69.698,-83.234 c 0.981,-1.137 1.495,-1.696 1.462,-1.768 z m 153.602,72.258 c -0.328,0.023 -0.846,0.212 -1.646,0.548 l -39.392,17.989 c -1.398,0.635 -1.311,1.49 -0.792,2.561 l 45.793,116.162 -3.292,-135.309 c -0.101,-1.479 -0.123,-1.99 -0.671,-1.951 z m -264.154,3.598 -4.208,131.651 38.782,-113.907 c 0.573,-1.682 0.559,-1.767 -0.61,-2.317 z m 210.859,17.073 -165.249,0.427 c -2.361,-0.035 -2.264,-0.033 -1.098,1.89 l 83.905,141.529 c 1.417,2.159 1.265,2.092 2.744,-0.121 L 462.675,482.38 c 0.708,-1.127 1.212,-1.914 -0.914,-1.953 z m 6.586,3.72 c -0.152,0.064 -0.318,0.639 -0.793,1.524 l -81.16,142.809 c -0.887,1.508 -1.097,2.048 1.036,1.708 l 128.845,-17.744 c 2.044,-0.467 1.982,-1.197 1.281,-3.232 l -48.6,-123.479 c -0.321,-1.183 -0.456,-1.65 -0.609,-1.586 z m -178.176,1.342 c -0.158,0.113 -0.3,0.715 -0.609,1.585 l -41.16,121.162 c -0.701,2.573 -0.78,3.541 1.829,4.024 l 123.113,17.805 c 2.328,0.351 2.03,-0.822 1.463,-1.951 L 291.024,486.769 c -0.526,-1.067 -0.695,-1.394 -0.853,-1.28 z m -32.013,133.845 120.796,68.538 c 1.564,0.949 1.929,0.604 1.707,-1.036 l -2.561,-48.05 c -0.07,-1.551 -0.28,-2.183 -1.89,-2.439 z m 249.764,0.121 -122.625,16.952 c -1.618,0.238 -1.326,1.032 -1.342,2.195 l 2.622,48.903 c 0.135,1.483 0.091,2.017 1.89,1.098 z"/> - + \ No newline at end of file