diff --git a/.idea/DSA41.iml b/.idea/DSA41.iml
new file mode 100644
index 00000000..24643cc3
--- /dev/null
+++ b/.idea/DSA41.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..2b554aa1
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/assets/boron.svg b/src/assets/boron.svg
new file mode 100644
index 00000000..1646d79f
--- /dev/null
+++ b/src/assets/boron.svg
@@ -0,0 +1,112 @@
+
+
+
+
diff --git a/src/assets/circle.svg b/src/assets/circle.svg
new file mode 100644
index 00000000..2289f746
--- /dev/null
+++ b/src/assets/circle.svg
@@ -0,0 +1,42 @@
+
+
diff --git a/src/assets/die.svg b/src/assets/die.svg
new file mode 100644
index 00000000..0c2d2f8a
--- /dev/null
+++ b/src/assets/die.svg
@@ -0,0 +1,85 @@
+
+
+
+
diff --git a/src/assets/kampftalent.svg b/src/assets/kampftalent.svg
new file mode 100644
index 00000000..b911e248
--- /dev/null
+++ b/src/assets/kampftalent.svg
@@ -0,0 +1,248 @@
+
+
+
+
diff --git a/src/assets/liturgie.svg b/src/assets/liturgie.svg
new file mode 100644
index 00000000..b9cc1989
--- /dev/null
+++ b/src/assets/liturgie.svg
@@ -0,0 +1,263 @@
+
+
+
+
diff --git a/src/assets/nachteil.svg b/src/assets/nachteil.svg
new file mode 100644
index 00000000..cb3187ab
--- /dev/null
+++ b/src/assets/nachteil.svg
@@ -0,0 +1,162 @@
+
+
+
+
diff --git a/src/assets/parchment.jpg b/src/assets/parchment.jpg
new file mode 100644
index 00000000..8e276c4e
Binary files /dev/null and b/src/assets/parchment.jpg differ
diff --git a/src/assets/rollable.svg b/src/assets/rollable.svg
new file mode 100644
index 00000000..673650eb
--- /dev/null
+++ b/src/assets/rollable.svg
@@ -0,0 +1,335 @@
+
+
+
+
diff --git a/src/assets/zauber.svg b/src/assets/zauber.svg
new file mode 100644
index 00000000..63c9cba0
--- /dev/null
+++ b/src/assets/zauber.svg
@@ -0,0 +1,327 @@
+
+
+
+
diff --git a/src/main.mjs b/src/main.mjs
index 3b5a1000..a5399ff0 100644
--- a/src/main.mjs
+++ b/src/main.mjs
@@ -6,6 +6,15 @@ import { SkillDataModel } from "./module/data/skill.mjs";
import { SpellDataModel } from "./module/data/spell.mjs";
import { Character } from "./module/documents/character.mjs";
+async function preloadHandlebarsTemplates () {
+ return loadTemplates([
+ // ui partials.
+ 'systems/DSA_4-1/templates/ui/partial-rollable-button.hbs',
+ 'systems/DSA_4-1/templates/ui/partial-attribute-button.hbs'
+ ]);
+};
+
+
Hooks.once("init", () => {
// Configure custom Document implementations.
@@ -40,4 +49,6 @@ Hooks.once("init", () => {
makeDefault: true,
label: 'DSA41.SpellLabels.Item',
});
+
+ return preloadHandlebarsTemplates();
})
\ No newline at end of file
diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs
index 44b29f88..e8ea7c66 100644
--- a/src/module/sheets/characterSheet.mjs
+++ b/src/module/sheets/characterSheet.mjs
@@ -37,66 +37,85 @@ export class CharacterSheet extends ActorSheet {
context.attributes = [
{
eigenschaft: "mu",
- name: "Mut",
+ name: "MU",
+ tooltip: "Mut",
wert: actorData.system.attribute.mu ?? 0,
},
{
eigenschaft: "kl",
- name: "Klugheit",
+ name: "KL",
+ tooltip: "Klugheit",
wert: actorData.system.attribute.kl ?? 0,
},
{
eigenschaft: "in",
- name: "Intuition",
+ name: "IN",
+ tooltip: "Intuition",
wert: actorData.system.attribute.in ?? 0,
},
{
eigenschaft: "ch",
- name: "Charisma",
+ name: "CH", tooltip: "Charisma",
wert: actorData.system.attribute.ch ?? 0,
},
{
eigenschaft: "ff",
- name: "Fingerfertigkeit",
+ name: "FF",
+ tooltip: "Fingerfertigkeit",
wert: actorData.system.attribute.ff ?? 0,
},
{
eigenschaft: "ge",
- name: "Geschicklichkeit",
+ name: "GE",
+ tooltip: "Geschicklichkeit",
wert: actorData.system.attribute.ge ?? 0,
},
{
eigenschaft: "ko",
- name: "Konstitution",
+ name: "KO",
+ tooltip: "Konstitution",
wert: actorData.system.attribute.ko ?? 0,
},
{
eigenschaft: "kk",
- name: "Körperkraft",
+ name: "KK",
+ tooltip: "Körperkraft",
wert: actorData.system.attribute.kk ?? 0,
},
];
- context.skills = [];
+ context.skills = {};
if ( context.system.talente?.length >= 0) {
context.system.talente.forEach(talent => {
- console.log(talent);
const taw = talent.taw;
+ console.log(taw);
const talentObjekt = game.items.get(talent.talent);
+ const talentGruppe = talentObjekt.system.gruppe;
const eigenschaften = Object.values(talentObjekt.system.probe);
- context.skills.push({
- talentName: talentObjekt.name,
- taw: taw,
- rollEigenschaft1: this.prepareEigenschaftRoll(actorData, eigenschaften[0]),
- rollEigenschaft2: this.prepareEigenschaftRoll(actorData, eigenschaften[1]),
- rollEigenschaft3: this.prepareEigenschaftRoll(actorData, eigenschaften[2]),
+ const werte = [
+ {name: eigenschaften[0], value: this.prepareEigenschaftRoll(actorData, eigenschaften[0])},
+ {name: eigenschaften[1], value: this.prepareEigenschaftRoll(actorData, eigenschaften[1])},
+ {name: eigenschaften[2], value: this.prepareEigenschaftRoll(actorData, eigenschaften[2])}
+ ]
+
+ if(context.skills[talentGruppe] == null) {
+ context.skills[talentGruppe] = [];
+ }
+
+ context.skills[talentGruppe].push({
+ type: "talent",
+ gruppe: talentGruppe,
+ name: talentObjekt.name,
+ taw: ""+taw,
+ werte,
+ rollEigenschaft1: werte[0].value,
+ rollEigenschaft2: werte[1].value,
+ rollEigenschaft3: werte[2].value,
probe: `(${eigenschaften.join("/")})`
});
})
}
- console.log(context);
-
return context;
}
diff --git a/src/style/_attributes.scss b/src/style/_attributes.scss
new file mode 100644
index 00000000..e085c5ce
--- /dev/null
+++ b/src/style/_attributes.scss
@@ -0,0 +1,47 @@
+.dsa41.sheet.actor.character {
+
+ .sheet-header {
+ position: relative;
+ .attribute {
+ position: absolute;
+ top: 8px;
+ right: 4px;
+ height: 48px;
+ display: inline-flex;
+ flex-direction: row;
+
+ .attribut.rollable {
+ width: 48px;
+ height: 48px;
+ position: relative;
+ svg {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ opacity: 0.5;
+ }
+
+ .attribut-wert {
+ font-weight: bold;
+ position: absolute;
+ left: 0;
+ width: 48px;
+ top: 0;
+ line-height: 36px;
+ vertical-align: middle;
+ text-align: center;
+ }
+ .attribut-name {
+ position: absolute;
+ left: 0;
+ right: 0;
+ line-height: 12px;
+ vertical-align: middle;
+ text-align: center;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/style/_character-sheet.scss b/src/style/_character-sheet.scss
new file mode 100644
index 00000000..85d3c48e
--- /dev/null
+++ b/src/style/_character-sheet.scss
@@ -0,0 +1,55 @@
+.dsa41.sheet.actor.character {
+
+ .window-header.flexrow.draggable.resizable {
+ }
+
+ $sidebar-width: 240px;
+ $attribute-height: 60px;
+ $tabs-height: 48px;
+
+ .window-content {
+ display: unset; /* we are on our own */
+ position: relative;
+
+ header.sheet-header {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: $attribute-height;
+ right: 0;
+ }
+
+ div.head-data {
+ position: absolute;
+ left: 0;
+ top: $attribute-height;
+ width: $sidebar-width;
+ bottom: 0;
+ margin: 8px;
+
+
+ .profile-img {
+ width: $sidebar-width - 16px;
+ }
+ }
+
+ nav.sheet-tabs.tabs {
+ position: absolute;
+ left: $sidebar-width;
+ top: $attribute-height;
+ right: 0;
+ height: $tabs-height;
+ }
+
+ section.sheet-body {
+ position: absolute;
+ top: $attribute-height+$tabs-height+4px;
+ left: $sidebar-width;
+ right: 0;
+ bottom: 0;
+ padding: 8px;
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/style/_colours.scss b/src/style/_colours.scss
new file mode 100644
index 00000000..aa6ca69b
--- /dev/null
+++ b/src/style/_colours.scss
@@ -0,0 +1,6 @@
+$nachteil-color: #555753ff;
+$liturgie-color: #edd400ff;
+$zauber-color: #3465a4ff;
+$talent-color: #f57900ff;
+$kampftalent-color: #cc0000ff;
+
diff --git a/src/style/_lists.scss b/src/style/_lists.scss
new file mode 100644
index 00000000..717d534c
--- /dev/null
+++ b/src/style/_lists.scss
@@ -0,0 +1,14 @@
+
+.dsa41.sheet.actor.character {
+ .tab.skills {
+
+ columns: 2;
+ column-gap: 20px;
+
+ ul {
+ list-style-type: none;
+ padding-left: 0;
+ }
+
+ }
+}
diff --git a/src/style/_numbers.scss b/src/style/_numbers.scss
new file mode 100644
index 00000000..58b691f5
--- /dev/null
+++ b/src/style/_numbers.scss
@@ -0,0 +1,5 @@
+$lighter_factor: 15%;
+$darken_factor: -15%;
+$start_gradient: 0.8;
+$end_gradient: 0.2;
+$direction_gradient: 90deg;
\ No newline at end of file
diff --git a/src/style/_rollable.scss b/src/style/_rollable.scss
new file mode 100644
index 00000000..86083bf6
--- /dev/null
+++ b/src/style/_rollable.scss
@@ -0,0 +1,178 @@
+@use 'sass:color';
+@use 'sass:map';
+@use "_colours" as colour;
+@use "_numbers" as numbers;
+
+
+$rollable_colours: (
+ "nachteil": colour.$nachteil-color,
+ "talent": colour.$talent-color,
+ "kampftalent": colour.$kampftalent-color,
+ "liturgie": colour.$liturgie-color,
+ "zauber": colour.$zauber-color,
+);
+.dsa41.sheet.actor.character {
+
+ .block.rollable {
+ display: block;
+ height: 32px;
+ width: 420px;
+ position: relative;
+ margin: 4px;
+ z-index: 2;
+
+ .die {
+ width: 32px;
+ height: 32px;
+ display: inline-block;
+ position: relative;
+
+ .border {
+ fill: #0000;
+ }
+
+ .value {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 32px;
+ line-height: 30px;
+ vertical-align: middle;
+ text-align: center;
+ display: inline-block;
+ font-size: 10pt;
+ font-weight: bold;
+
+ img {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: 6px;
+ top: 6px;
+ }
+ }
+ }
+
+ .container {
+ position: absolute;
+ right: 0;
+ left: 16px;
+ top: 0;
+ height: 32px;
+ z-index: -1;
+ padding-left: 24px;
+
+ span.name {
+ line-height: 32px;
+ vertical-align: middle;
+ }
+ }
+
+ .werte {
+ position: absolute;
+ right: 0;
+ height: 32px;
+
+ .eigenschaft {
+ display: inline-block;
+ height: 32px;
+ width: 32px;
+ position: relative;
+ top: -32px;
+
+ span.name {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 32px;
+ line-height: 14px;
+ text-align: center;
+ font-size: smaller;
+ color: #333;
+ }
+
+ span.value {
+ border-left: 1px solid black;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ width: 32px;
+ line-height: 24px;
+ text-align: center;
+ }
+ }
+ }
+ }
+
+ // interactivity
+ .block.rollable {
+ &:hover {
+
+ .die svg {
+ filter: drop-shadow(0px 0px 10px rgb(255 0 0));
+ }
+
+
+ }
+
+ &:active {
+
+ .die {
+ width: 28px;
+ height: 28px;
+ left: 2px;
+ top: 2px;
+
+ .value {
+ width: 28px;
+ height: 28px;
+ left: 0;
+ top: -2px;
+ scale: 0.8;
+
+ img {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: 4px;
+ top: 7px;
+ }
+ }
+ }
+ }
+ }
+}
+
+@mixin coloring($name) {
+ $color: map.get($rollable_colours, $name);
+ .#{$name}.rollable {
+ .die {
+ .center {
+ fill: $color;
+ }
+
+ .topleft, .bottomleft {
+
+ fill: color.adjust($color, $lightness: numbers.$lighter_factor);
+ }
+
+ .topright, .bottomright, .bottom {
+ fill: color.adjust($color, $lightness: numbers.$darken_factor);
+ }
+ }
+
+ .container {
+ background-image: linear-gradient(to right, rgba($color, numbers.$start_gradient), rgba($color, numbers.$end_gradient));
+ border-top-right-radius: 8px;
+ border-bottom-right-radius: 8px;
+ }
+ }
+}
+
+@include coloring("nachteil");
+@include coloring("liturgie");
+@include coloring("zauber");
+@include coloring("talent");
+@include coloring("kampftalent");
\ No newline at end of file
diff --git a/src/style/styles.scss b/src/style/styles.scss
index a2ba1b0c..71048dc3 100644
--- a/src/style/styles.scss
+++ b/src/style/styles.scss
@@ -1,6 +1,4 @@
-$bgcolor: FFF;
-
-html {
- background-color: $bgcolor;
-}
-
+@use "_rollable";
+@use "_lists";
+@use "_attributes";
+@use "_character-sheet";
\ No newline at end of file
diff --git a/src/templates/actor/actor-character-sheet.hbs b/src/templates/actor/actor-character-sheet.hbs
index 5a38a416..a43bee09 100644
--- a/src/templates/actor/actor-character-sheet.hbs
+++ b/src/templates/actor/actor-character-sheet.hbs
@@ -3,24 +3,20 @@
{{!-- Sheet Header --}}
+
+
+

+
+
{{!-- Sheet Tab Navigation --}}