From ca29af6b6193676a98567fcaa41c305a4475928d Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 18 Jan 2021 17:46:39 +0100 Subject: [PATCH] Initial system development --- lang/en.json | 18 + module/actor-sheet.js | 6 +- module/actor.js | 1 - module/sos-main.js | 14 +- module/sos-utility.js | 10 +- styles/simple.css | 1371 +++++++++++++++++++++++++++++++ system.json | 16 +- template.json | 13 +- templates/actor-sheet.html | 24 +- templates/stat-option-list.html | 11 + 10 files changed, 1446 insertions(+), 38 deletions(-) create mode 100644 lang/en.json create mode 100644 styles/simple.css create mode 100644 templates/stat-option-list.html diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..8959dd5 --- /dev/null +++ b/lang/en.json @@ -0,0 +1,18 @@ +{ + "SHEET.TabStats": "Stats", + "SHEET.TabSkills": "Skills", + "SHEET.TabFight": "Fight", + "SHEET.TabGears": "Gears", + "SHEET.TabDescription": "Description", + + "STATS.physical": "physical", + "STATS.mental": "mental", + "STATS.strength": "Strength", + "STATS.dexterity": "Dextrity", + "STATS.speed": "Speed", + "STATS.endurance": "Endurance", + "STATS.intelligence": "Intelligence", + "STATS.perception": "Perception", + "STATS.charisma": "Charisma", + "STATS.determination": "Determination" +} \ No newline at end of file diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 97d1bea..c58ff9c 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -24,6 +24,10 @@ export class SoSActorSheet extends ActorSheet { getData() { let data = super.getData(); + console.log("stats", data); + //data.stats = duplicate(this.actor.stats); + //data.scores = duplicate(this.actor.scores); + return data; } @@ -37,7 +41,7 @@ export class SoSActorSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); - HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM); + //HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM); // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; diff --git a/module/actor.js b/module/actor.js index 927ed37..9b26bc8 100644 --- a/module/actor.js +++ b/module/actor.js @@ -32,7 +32,6 @@ export class SoSActor extends Actor { return actor; } - return super.create(data, options); } diff --git a/module/sos-main.js b/module/sos-main.js index 7bbfc76..7e20e96 100644 --- a/module/sos-main.js +++ b/module/sos-main.js @@ -11,9 +11,7 @@ import { SoSActor } from "./actor.js"; import { SoSItemSheet } from "./item-sheet.js"; import { SoSActorSheet } from "./actor-sheet.js"; -import { SoSUtility } from "./rdd-utility.js"; -//import { SoSTokenHud } from "./rdd-token-hud.js"; -//import { SoSCommands } from "./rdd-commands.js"; +import { SoSUtility } from "./sos-utility.js"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -36,7 +34,7 @@ Hooks.once("init", async function () { // preload handlebars templates SoSUtility.preloadHandlebarsTemplates(); // Create useful storage space - game.system.sos = { TMRUtility: TMRUtility } + game.system.sos = { } /* -------------------------------------------- */ // Set an initiative formula for the system @@ -59,9 +57,9 @@ Hooks.once("init", async function () { /* -------------------------------------------- */ // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet("foundryvtt-reve-de-dragon", SoSActorSheet, { types: ["character"], makeDefault: true }); + Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true }); Items.unregisterSheet("core", ItemSheet); - Items.registerSheet("foundryvtt-reve-de-dragon", SoSItemSheet, { makeDefault: true }); + Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true }); // Patch the initiative formula _patch_initiative(); @@ -70,7 +68,7 @@ Hooks.once("init", async function () { /* -------------------------------------------- */ function welcomeMessage() { - ChatUtility.removeMyChatMessageContaining('
'); + //ChatUtility.removeMyChatMessageContaining('
'); ChatMessage.create({ user: game.user._id, whisper: [game.user._id], @@ -112,6 +110,6 @@ Hooks.on("chatMessage", (html, content, msg) => { /* -------------------------------------------- */ Hooks.on("getCombatTrackerEntryContext", (html, options) => { - RdDUtility.pushInitiativeOptions(html, options); + //SoS.pushInitiativeOptions(html, options); } ) diff --git a/module/sos-utility.js b/module/sos-utility.js index ee8ae73..71deede 100644 --- a/module/sos-utility.js +++ b/module/sos-utility.js @@ -3,11 +3,13 @@ export class SoSUtility { /* -------------------------------------------- */ static async preloadHandlebarsTemplates() { + const templatePaths = [ - 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html', - 'systems/foundryvtt-reve-de-dragon/templates/editor-notes-gm.html', - 'systems/foundryvtt-reve-de-dragon/templates/item-shet.html' + 'systems/foundryvtt-shadows-over-sol/templates/actor-sheet.html', + 'systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html', + 'systems/foundryvtt-shadows-over-sol/templates/stat-option-list.html', + 'systems/foundryvtt-shadows-over-sol/templates/item-sheet.html' ] + return loadTemplates(templatePaths); } - } \ No newline at end of file diff --git a/styles/simple.css b/styles/simple.css new file mode 100644 index 0000000..661669f --- /dev/null +++ b/styles/simple.css @@ -0,0 +1,1371 @@ + /* ==================== (A) Fonts ==================== */ + @font-face { + font-family: "GoudyAcc"; + src: url('../fonts/goudyacc.ttf') format("truetype"); + } + @font-face { + font-family: "MedievalSharp"; + src: url('../fonts/MedievalSharp.ttf') format("truetype"); + } + @font-face { + font-family: "GrenzeGotisch"; + src: url('../fonts/GrenzeGotisch-Regular.ttf') format("truetype"); + } + @font-face { + font-family: "Fondamento"; + src: url('../fonts/Fondamento.ttf') format("truetype"); + } + @font-face { + font-family: "CaslonAntique"; + src: url('../fonts/CaslonAntique.ttf') format("truetype"); + } + @font-face { + font-family: "heures Draconiques"; + src: url('../fonts/heures_draconiques.ttf') format("truetype"); + } + + :root { + /* =================== 1. ACTOR SHEET FONT STYLES =========== */ + --window-header-title-font-family: CaslonAntique; + --window-header-title-font-size: 1.5rem; + --window-header-title-font-weight: normal; + --window-header-title-color: #f5f5f5; + + --major-button-font-family: CaslonAntique; + --major-button-font-size: 1.25rem; + --major-button-font-weight: normal; + --major-button-color: #dadada; + + --tab-header-font-family: CaslonAntique; + --tab-header-font-size: 1.2rem; + --tab-header-font-weight: 700; + --tab-header-color: #403f3e; + --tab-header-color-active: #4a0404; + + --actor-input-font-family: CaslonAntique; + --actor-input-font-size: 1.2rem; + --actor-input-font-weight: 500; + --actor-input-color: black; + + --actor-label-font-family: CaslonAntique; + --actor-label-font-size: 1.2rem; + --actor-label-font-weight: 700; + --actor-label-color: #464331c4; + + /* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ + --debug-background-color-red: #ff000054; + --debug-background-color-blue: #1d00ff54; + --debug-background-color-green: #54ff0054; + + --debug-box-shadow-red: inset 0 0 2px red; + --debug-box-shadow-blue: inset 0 0 2px blue; + --debug-box-shadow-green: inset 0 0 2px green; + } + +/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ +/* Global styles & Font */ +.window-app { + font-family: CaslonAntique; + text-align: justify; + font-size: 16px; + letter-spacing: 1px; +} + +/* Fonts */ +.sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item {font-family: "GoudyAcc"} /* For title, sidebar character and scene */ +.sheet nav.sheet-tabs {font-family: "CaslonAntique";} /* For nav and title */ +.window-app input, .foundryvtt-reve-de-dragon .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { + font-family: "CaslonAntique"; /* For sheet parts */ +} + +.window-header{ + background: rgba(0,0,0,0.75); +} + +.window-app.sheet .window-content { + margin: 0; + padding: 0; +} +.strong-text{ + font-weight: bold; +} + +.tabs .item.active, .blessures-list li ul li:first-child:hover, a:hover { + text-shadow: 1px 0px 0px #ff6600; +} + +.rollable:hover, .rollable:focus { + color: #000; + text-shadow: 0 0 10px red; + cursor: pointer; +} + +table {border: 1px solid #7a7971;} + +.grid, .grid-2col { + display: grid; + grid-column: span 2 / span 2; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 10px; + margin: 10px 0; + padding: 0; +} + +.grid-3col { + grid-column: span 3 / span 3; + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.grid-4col { + grid-column: span 4 / span 4; + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.grid-5col { + grid-column: span 5 / span 5; + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.grid-6col { + grid-column: span 5 / span 5; + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.grid-7col { + grid-column: span 7 / span 7; + grid-template-columns: repeat(7, minmax(0, 1fr)); +} + +.grid-8col { + grid-column: span 8 / span 8; + grid-template-columns: repeat(8, minmax(0, 1fr)); +} + +.grid-9col { + grid-column: span 9 / span 9; + grid-template-columns: repeat(9, minmax(0, 1fr)); +} + +.grid-10col { + grid-column: span 10 / span 10; + grid-template-columns: repeat(10, minmax(0, 1fr)); +} + +.grid-11col { + grid-column: span 11 / span 11; + grid-template-columns: repeat(11, minmax(0, 1fr)); +} + +.grid-12col { + grid-column: span 12 / span 12; + grid-template-columns: repeat(12, minmax(0, 1fr)); +} + +.flex-group-center, +.flex-group-left, +.flex-group-right { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + text-align: center; + padding: 5px; +} + +.flex-group-left { + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + text-align: left; +} + +.flex-group-right { + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; + text-align: right; +} + +.flex-center { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + text-align: center; +} + +.flex-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} +.flex-shrink { + flex: 'flex-shrink' ; +} + +/* Styles limited to foundryvtt-reve-de-dragon sheets */ + +.foundryvtt-reve-de-dragon .sheet-header { + -webkit-box-flex: 0; + -ms-flex: 0 0 210px; + flex: 0 0 210px; + overflow: hidden; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + margin-bottom: 10px; +} + +.foundryvtt-reve-de-dragon .sheet-header .profile-img { + -webkit-box-flex: 0; + -ms-flex: 0 0 128px; + flex: 0 0 128px; + height: 128px; + width: 128px; + margin-right: 10px; + object-fit: cover; + object-position: 50% 0; +} + +.button-img { + vertical-align: baseline; + width: 8%; + height: 8%; + max-height: 48px; + border-width: 0; +} + +.button-effect-img { + vertical-align: baseline; + width: 16px; + max-height: 16px; + height: 16; + border-width: 0; +} + +.small-button-container { + height: 16px; + width: 16px; + border: 0; + vertical-align: bottom; +} + +.foundryvtt-reve-de-dragon .sheet-header .header-fields { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; +} + +.foundryvtt-reve-de-dragon .sheet-header h1.charname { + height: 50px; + padding: 0px; + margin: 5px 0; + border-bottom: 0; +} + +.foundryvtt-reve-de-dragon .sheet-header h1.charname input { + width: 100%; + height: 100%; + margin: 0; +} + +.foundryvtt-reve-de-dragon .sheet-tabs { + -webkit-box-flex: 0; + -ms-flex: 0; + flex: 0; +} + +.foundryvtt-reve-de-dragon .sheet-body, +.foundryvtt-reve-de-dragon .sheet-body .tab, +.foundryvtt-reve-de-dragon .sheet-body .tab .editor { + height: 100%; +} + +.editor { + border: 2; + height: 300px; + padding: 0 3px; +} + +.medium-editor { + border: 2; + height: 240px; + padding: 0 3px; +} + +.small-editor { + border: 2; + height: 150px; + padding: 0 3px; +} + +.foundryvtt-reve-de-dragon .tox .tox-editor-container { + background: #fff; +} + +.foundryvtt-reve-de-dragon .tox .tox-edit-area { + padding: 0 8px; +} + +.foundryvtt-reve-de-dragon .resource-label { + font-weight: bold; + text-transform: uppercase; +} + +.foundryvtt-reve-de-dragon .tabs { + height: 40px; + border-top: 1px solid #AAA; + border-bottom: 1px solid #AAA; +} + +.foundryvtt-reve-de-dragon .tabs .item { + line-height: 40px; + font-weight: bold; +} + +.foundryvtt-reve-de-dragon .tabs .item.active { + text-decoration: underline; + text-shadow: none; +} + +.foundryvtt-reve-de-dragon .items-list { + list-style: none; + margin: 7px 0; + padding: 0; + overflow-y: auto; +} + +.foundryvtt-reve-de-dragon .items-list .item-header { + font-weight: bold; +} + +.foundryvtt-reve-de-dragon .items-list .item { + height: 30px; + line-height: 24px; + padding: 3px 0; + border-bottom: 1px solid #BBB; +} + +.foundryvtt-reve-de-dragon .items-list .item .item-image { + -webkit-box-flex: 0; + -ms-flex: 0 0 24px; + flex: 0 0 24px; + margin-right: 5px; +} + +.foundryvtt-reve-de-dragon .items-list .item img { + display: block; +} + +.foundryvtt-reve-de-dragon .items-list .item-name { + margin: 0; +} + +.foundryvtt-reve-de-dragon .items-list .item-controls { + -webkit-box-flex: 0; + -ms-flex: 0 0 86px; + flex: 0 0 86px; + text-align: right; +} + +.rdddialog .dialog-roll-sort s{ + width: 600px; + height: 430px; + z-index: 9999; + display: block; +} +.rdd-roll-part{ + align-items: center; + border-radius: 6px; padding: 3px; + background:linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3)); +} +.rdd-roll-sign{ + border-radius: 6px; padding: 3px; + background:linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3)); +} +.rdd-roll-norm{ + border-radius: 6px; padding: 3px; + background:linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3)); +} +.rdd-roll-echec{ + border-radius: 6px; padding: 3px; + background-image: linear-gradient(150deg, rgba(255, 0, 0, 0.3), rgba(255, 200, 128, 0.05),rgba(255, 200, 128, 0.1), rgba(255,10,0,0.3)); +} +.rdd-roll-epart{ + border-radius: 6px; padding: 3px; + background:linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6)); +} +.rdd-roll-etotal{ + border-radius: 6px; padding: 3px; + background:linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7)); +} +.rdd-diviseur{ + border-radius: 6px; padding: 3px; + background:linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2)); +} + +.table-resolution-carac { + background-color: yellow; +} + +.table-resolution-target { + font-weight: bold; + background-color: lightblue; +} + +#tableProbaReussite{ + font-size: 0.8rem; + padding: 5px; +} + +/* ======================================== */ +/* Sheet */ +.window-app.sheet .window-content .sheet-header{ + background: #011d33 url("img/bg_header.webp") no-repeat left top; + color: rgba(255, 255, 255, 1); +} + +.window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] { + color: rgba(255, 255, 255, 0.75); + background: rgba(255, 255, 255, 0.05); + border: 0 none; + margin-bottom: 0.25rem; +} + +.window-app .window-content, .window-app.sheet .window-content .sheet-body{ + background: rgb(245,245,240) url("img/bg_left.jpg") no-repeat left top; +} + +section.sheet-body{padding: 0.25rem 0.5rem;} + +.sheet header.sheet-header .profile-img { + object-fit: cover; + object-position: 50% 0; + margin: 0.5rem 0 0.5rem 0.5rem; + padding: 0; +} + +.sheet nav.sheet-tabs { + font-size: 0.65rem; + font-weight: bold; + height: 5rem; + flex: 0 0 5rem; + margin: 0; + padding: 0 0 0 0.25rem; + text-align: center; + text-transform: uppercase; + line-height: 2.5rem; + border-top: 0 none; + border-bottom: 0 none; + color: rgba(52, 52, 52, 0.95); + background: rgb(245,245,240) url("img/bg_menu.jpg") no-repeat left top; +} + +nav.sheet-tabs .item { + position: relative; + padding: 0 0.25rem; +} + +nav.sheet-tabs .item:after { + content: ""; + position: absolute; + top: 0; + right: 0; + height: 2rem; + width: 1px; + border-right: 1px dashed rgba(52, 52, 52, 0.25); +} + +.sheet .tab[data-tab] { + padding: 0; +} + +section.sheet-body:after { + content: ""; + display: block; + clear: both; +} + +.sheet header.sheet-header .flex-compteurs {text-align: right;} +.sheet header.sheet-header .resource-content {width: 2rem;} + +.ctn-vie span, .ctn-endu span, .ctn-fatigue span, .ctn-reve span { + display: inline-block; + text-align: left; + width: 2rem; +} +.select-diff { + display: inline-block; + text-align: left; + width: 50px; +} + +#vie-plus, #vie-moins, #endurance-plus, #endurance-moins, #fatigue-plus, #fatigue-moins, #ptreve-actuel-plus, #ptreve-actuel-moins, .monnaie-plus, .monnaie-moins { + display: inline-block; + width: 1.25rem; + background: rgba(30, 25, 20, 1); + text-align: center; + border: 1px solid rgba(72, 46, 28, 1); + border-radius: 0.25rem; + line-height: 1.25rem; + color: rgba(255, 255, 255, 0.5); +} + +.alchimie-tache { + font-weight: bold; + background: rgb(182, 180, 179); + border: 1px solid rgba(72, 46, 28, 1); + border-radius: 0.25rem; + color: rgba(212, 27, 27, 0.5); +} + +.window-app.sheet .window-content .tooltip:hover .tooltiptext { + top: 2rem; + left: 2rem; + margin: 0; + padding: 0.25rem; +} + +.window-app.sheet .window-content .stat-value, .window-app.sheet .window-content .competence-xp { + margin: 0.05rem; + flex-basis: 3rem; + text-align: center; +} + +/* ======================================== */ +/* Global UI elements */ + +/* ======================================== */ + +h1, h2, h3, h4 { + font-weight: bold; +} + +ul, ol { + margin: 0; + padding: 0; +} +ul, li { + list-style-type: none; +} + +.sheet li { + margin: 0.125rem; + padding: 0.25rem; +} +.header-fields li { + margin: 0; + padding: 0; +} + +.alternate-list > .list-item:hover { + background: rgba(100, 100, 50, 0.25); +} +.alternate-list > .list-item:nth-child(even) { + background: rgba(80, 60, 0, 0.10); +} +.alternate-list > .list-item:nth-child(odd) { + background: rgb(160, 130, 100, 0.05); +} +.xp-level-up { + margin: 0.125rem; + box-shadow: inset 0px 0px 1px #00000096; + border-radius: 0.25rem; + padding: 0.125rem; + flex: 1 1 5rem; + background: rgba(195, 152, 22, 0.5); +} + +.blessures-list ul { + display: flex; +} +.blessures-list li { + flex: 1; + flex-basis: auto; +} +.blessures-list li ul li:first-child { + flex: 0; + align-items: center; + justify-content: center; + padding: 0.5rem; + cursor: pointer; +} +.stat-label { + font-weight: bold; +} +.list-item { + margin: 0.125rem; + box-shadow: inset 0px 0px 1px #00000096; + border-radius: 0.25rem; + padding: 0.125rem; + flex: 1 1 5rem; +} +.item-display-show { + display: block; +} +.item-display-hide { + display: none; +} +.conteneur-type { + background: rgb(200, 10, 100, 0.25); +} + +.item-quantite { + margin-left: 0.5rem; +} + +.list-item-margin1 { + margin-left: 1rem; +} +.list-item-margin2 { + margin-left: 2rem; +} +.list-item-margin3 { + margin-left: 3rem; +} +.list-item-margin4 { + margin-left: 4rem; +} + +.sheet-competence-img { + width: 24px; + height: 24px; + flex-grow: 0; + margin-right: 0.25rem; +} +.competence-column { + flex-direction: column; + align-content: flex-start; + justify-content: flex-start; + flex-grow: 0; + flex-basis: 1; +} +.competence-header { + align-content: flex-start; + justify-content: flex-start; + font-weight: bold; + flex-grow: 0; +} +.arme-label, +.generic-label, +.competence-label, +.astrologie-label, +.tache-label, +.subacteur-label, +.description-label { + flex-grow: 2; +} +.attribut-value, +.stat-value { + flex-grow: 0; + flex-basis: 64px; + margin-right: 4px; + margin-left: 4px; +} +.sante-value, +.competence-value { + flex-grow: 0; + flex-basis: 2rem; + margin-right: 0.25rem; + margin-left: 0.25rem; +} +.description-value { + flex-grow: 0; + flex-basis: 4rem; + margin-right: 0.25rem; + margin-left: 0.25rem; +} +.competence-xp { + flex-grow: 0; + flex-basis: 2rem; + margin-right: 0.25rem; + margin-left: 0.25rem; +} +.blessures-title { + font-weight: bold; +} +.alchimie-title { + font-weight: bold; +} +.blessure-data { + flex-direction: row; + align-content: flex-start; + justify-content: flex-start; +} +.blessures-soins { + flex-grow: 0; + flex-basis: 32px; + margin-right: 4px; + margin-left: 4px; +} +.blessures-loc { + flex-grow: 0; + flex-basis: 96px; + margin-right: 4px; + margin-left: 4px; +} +.pointsreve-value { + flex-grow: 0; + flex-basis: 64px; + margin-right: 4px; + margin-left: 4px; +} +.input-sante-header, +.stress-style { + flex-grow: 0; + flex-basis: 64px; + margin-right: 4px; + margin-left: 4px; +} + +/* ======================================== */ +.table-nombres-astraux { + border:1; + font-size: 0.75rem; +} +.table-nombres-astraux td { + border: 1px solid black; + text-align: center; + vertical-align: top; +} + +/* ======================================== */ +.tokenhudext { + display: flex; + flex: 0 !important; + font-family: CaslonPro; + font-weight: 600; +} +.tokenhudext.left { + justify-content: flex-start; + flex-direction: column; + position: absolute; + top: 2.75rem; + right: 4rem; +} +.tokenhudext.right { + justify-content: flex-start; + flex-direction: column; + position: absolute; + top: 2.75rem; + left: 4rem; +} +.control-icon.tokenhudicon { + width: fit-content; + height: fit-content; + min-width: 6rem; + flex-basis: auto; + padding: 0; + line-height: 1rem; + margin: 0.25rem; +} +.control-icon.tokenhudicon.right { + margin-left: 8px; +} +.rdd-hud-menu label { + font-size: 0.75rem; +} +#token-hud .status-effects.active{ + z-index: 2; +} +/* ======================================== */ +.item-checkbox { + height: 25px; + border: 1px solid #736953a6; + border-left: none; + font-weight: 500; + font-size: 1rem; + color: black; + padding-top: 5px; + margin-right: 0px; + width: 45px; + position: relative; + left: 0px; + text-align: center; +} + +/* ======================================== */ +/* Fatigue CSS */ +.table-fatigue { + table-layout: fixed; + padding: 0; + margin: 0; +} +.table-fatigue td { + table-layout: fixed; + width: 2px; + height: 2px; + padding: 0; +} +.table-fatigue .fatigue-used { + background-color: DarkRed; + border: 1px solid #999; +} +.table-fatigue .fatigue-none { + background-color: Grey; + border: 1px solid #999; +} +.table-fatigue .fatigue-free { + border: 1px solid #999; +} +.table-fatigue .fatigue-malus { + font-size: 0.8rem; +} + .flex-actions-bar { + flex-grow: 2; +} + +/* ======================================== */ +/* Sidebar CSS */ +#sidebar { + font-size: 1rem; + background: rgb(105,85,65) url("img/bg_sid_dark.jpg") no-repeat right bottom; + background-position: 100%; + color: rgba(220,220,220,0.75); +} + +#sidebar-tabs > .collapse, #chat-controls .chat-control-icon { + color: rgba(220,220,220,0.75); + text-shadow: 1px 1px 0 rgba(0,0,0,0.75); +} + +.sidebar-tab .directory-list .entity { + border-top: 1px dashed rgba(0,0,0,0.25); + border-bottom: 0 none; + padding: 0.25rem 0; +} + +.sidebar-tab .directory-list .entity:hover { + background: rgba(0,0,0,0.05); + cursor: pointer; +} + +.chat-message { + background: rgba(220,220,210,0.5); + font-size: 1rem; +} + +.chat-message.whisper { + background: rgba(220,220,210,0.75); + border: 2px solid #545469; +} +.chat-message .chat-icon { + border: 0; + float: left; +} + +#sidebar-tabs { + flex: 0 0 32px; + box-sizing: border-box; + margin: 0 0 5px; + border-bottom: 1px solid rgba(0,0,0,0); + box-shadow: inset 0 0 2rem rgba(0,0,0,0.5); +} + +#sidebar-tabs > .item.active { + border: 1px solid rgba(114,98,72,1); + background: rgba(30, 25, 20, 0.75); + box-shadow: 0 0 6px inset rgba(114,98,72,1); +} + +#sidebar #sidebar-tabs i{ + width: 25px; + height: 25px; + display: inline-block; + background-position:center; + background-size:cover; + text-shadow: 1px 1px 0 rgba(0,0,0,0.75); + +} + +#sidebar #sidebar-tabs i.fa-comments:before, #sidebar #sidebar-tabs i.fa-fist-raised:before, #sidebar #sidebar-tabs i.fa-users:before, #sidebar #sidebar-tabs i.fa-map:before, #sidebar #sidebar-tabs i.fa-suitcase:before, #sidebar #sidebar-tabs i.fa-book-open:before, #sidebar #sidebar-tabs i.fa-th-list:before, #sidebar #sidebar-tabs i.fa-music:before, #sidebar #sidebar-tabs i.fa-atlas:before, #sidebar #sidebar-tabs i.fa-cogs:before {content: "";} +#sidebar #sidebar-tabs i.fa-comments {background: url("img/ui/icon_sidebar_chat.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-fist-raised {background: url("img/ui/icon_sidebar_fight.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-users {background: url("img/ui/icon_sidebar_actor.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-map {background: url("img/ui/icon_sidebar_scene.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-suitcase {background: url("img/ui/icon_sidebar_item.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-book-open {background: url("img/ui/icon_sidebar_journal.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-th-list {background: url("img/ui/icon_sidebar_rolltable.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-music {background: url("img/ui/icon_sidebar_music.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-atlas {background: url("img/ui/icon_sidebar_compendium.svg") no-repeat;} +#sidebar #sidebar-tabs i.fa-cogs {background: url("img/ui/icon_sidebar_settings.svg") no-repeat;} + +#combat #combat-controls { + box-shadow: inset 0 0 2rem rgba(0,0,0,0.5); +} + +/*--------------------------------------------------------------------------*/ +/* Control, Tool, hotbar & navigation */ + +#controls .scene-control, #controls .control-tool { + box-shadow: 0 0 3px #000; + margin: 0 0 8px; + border-radius: 0; + background: rgba(30, 25, 20, 1); + background-origin: padding-box; + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; +} + +#controls .scene-control.active, #controls .control-tool.active, #controls .scene-control:hover, #controls .control-tool:hover { + background: rgba(72, 46, 28, 1); + background-origin: padding-box; + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; + box-shadow: 0 0 3px #ff6400; +} + +#hotbar #action-bar #macro-list { + border: 1px solid rgba(72, 46, 28, 1); + box-shadow: 2px 2px 5px #000000; +} + +#hotbar #action-bar .macro { + border-image: url(img/ui/bg_control.jpg) 21 repeat; + border-image-slice: 6 6 6 6 fill; + border-image-width: 6px 6px 6px 6px; + border-image-outset: 0px 0px 0px 0px; + border-radius: 0px; +} + +#hotbar .bar-controls { + background: rgba(30, 25, 20, 1); + border: 1px solid rgba(72, 46, 28, 1); +} + +#players { + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; + background: rgba(30, 25, 20, 1); +} + +#navigation #scene-list .scene.nav-item.active { + background: rgba(72, 46, 28, 1); +} + +#navigation #scene-list .scene.nav-item { + background: rgba(30, 25, 20, 1); + background-origin: padding-box; + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; +} + +#navigation #scene-list .scene.view, #navigation #scene-list .scene.context { + background: rgba(72, 46, 28, 1); + background-origin: padding-box; + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; + box-shadow: 0 0 3px #ff6400; +} + +#navigation #nav-toggle { + background: rgba(30, 25, 20, 1); + background-origin: padding-box; + border-image: url(img/ui/footer-button.png) 10 repeat; + border-image-width: 4px; + border-image-outset: 0px; +} + +/*--------------------------------------------------------------------------*/ +/* CALENDAR STUFF */ +#calendar-time-container{ + position: absolute; + display: block; +} +#calendar{ + min-width: 150px; + grid-row: 1; + grid-column: 1; + width: fit-content; + height: 84px; + margin: 0; + padding: 0; + border: 1px solid #000; + border-radius: 3%; + background: rgba(0, 0, 0, 0.5); + font-family: "GoudyAcc"; + z-index: 100; +} +#calendar-hdr{ + display: grid; + font-size: 1rem; + margin: 3px; + padding: 4px; + height: 25px; + width: fit-content; + min-width: 200px; + border-bottom: 1px solid #111; + color: #CCC; + float: left; +} +.calendar-date-rdd { + font-family: "GoudyAcc"; + color: #CCC; + font-weight: bold; + font-size: 1.10rem; + opacity: 90; +} +#calendar--move-handle { + font-family: "GoudyAcc"; + font-size: 13px; + line-height: 1; + text-align: center; + padding: 0; + margin: 0; + border: none; + flex: 1; +} +#calendar-date{ + grid-row: 1; + grid-column: 2; + float: left; + text-align: center; + padding-top: 0px; + padding-bottom: 0px; + margin-bottom: 5px; + color: #CCC; + cursor: pointer; +} +#calendar-date, +#calendar-date-num { + transition: 0.2s; +} +#calendar-date-num { + grid-row: 1; + grid-column: 2; + float: left; + text-align: center; + padding-top: 0px; + padding-bottom: 0px; + margin-bottom: 5px; + color: #CCC; + opacity: 0; + cursor: pointer; +} +#calendar-heure-img{ + width: 24px; + height: 24px; + flex-grow: 0; + border-width: 0; + opacity: 90; + color: #CCC; +} +#calendar-hdr:hover #calendar-date { + opacity: 0; +} +#calendar-hdr:hover #calendar-date-num{ + opacity: 1; +} +.calendar-container{ + padding-top: 3px; + padding-bottom: 20px; +} +.calendar-btn-container-left{ + width: 20%; + display: grid; + float: left; + margin: 2px; + grid-row-gap: 3px; + color: rgba(0, 0, 0, 0.5); +} +.calendar-btn-container-right{ + width: 20%; + display: grid; + float: right; + margin: 2px; + grid-row-gap: 3px; +} +#astrologie-btn-edit, +#calendar-btn-edit{ + grid-row: 1; + grid-column: 1; + margin: auto; + color: rgba(0, 0, 0, 0.5); +} +#astrologie-btn-edit:hover, +#calendar-btn-edit:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} +#calendar-btn-1min{ + grid-row: 1; + grid-column: 1; + margin: auto; + color: rgba(0, 0, 0, 0.7); +} +#calendar-btn-5min{ + grid-row: 1; + grid-column: 2; + margin: auto; + color: rgba(0, 0, 0, 0.7); +} +#calendar-btn-10min{ + grid-row: 2; + grid-column: 1; + margin-left: 10px; + color: rgba(0, 0, 0, 0.7); +} + +#calendar-btn-20min{ + grid-row: 2; + grid-column: 2; + margin-left: 10px; + color: rgba(0, 0, 0, 0.7); +} + +#calendar-btn-lyre{ + grid-row: 1; + grid-column: 1; + height: fit-content; + text-align: center; + vertical-align: center; + color: rgba(0, 0, 0, 0.7); +} + +#calendar-btn-vaisseau{ + grid-row: 1; + grid-column: 2; + height: fit-content; + text-align: center; + vertical-align: center; + color: rgba(0, 0, 0, 0.7); +} + +#calendar-btn-30min{ + grid-row: 2; + grid-column: 1; + height: fit-content; + text-align: center; + vertical-align: center; + color: rgba(0, 0, 0, 0.7); +} +#calendar-btn-1heure{ + grid-row: 2; + grid-column: 2; + height: fit-content; + text-align: center; + vertical-align: center; + color: rgba(0, 0, 0, 0.7); +} +#calendar-btn-container-left:hover{ + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} +#calendar-btn-1min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-5min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-10min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-20min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-30min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-1heure:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-vaisseau:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-lyre:hover{ + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +.calendar-weekday-time{ + display: grid; + float: left; + width: 55%; + padding-top: 0px; + padding-bottom: 0px; + margin: auto; + color: #CCC; +} +#calendar-weekday{ + grid-column: 1; + grid-row: 1; + text-align: center; + margin: auto; + border-bottom: 1px solid #111; +} +.calendar-time{ + grid-column: 1; + grid-row: 2; + font-size: 1.10rem; + text-align: center; + margin: auto; + cursor: pointer; + display: inline-flex; +} +.calendar-nombre-astral{ +grid-column: 2; +grid-row: 2; +font-size: 1.10rem; +text-align: right; +margin: auto; +cursor: pointer; +display: inline-flex; +} +.calendar-time-disp{ + position: relative; + bottom: 6px; +} + +/* Tooltip container */ +.tooltip { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ +} + +/* Tooltip text */ +.tooltip .tooltiptext { + text-align: center; + + /* Position the tooltip text */ + top: 20px; + position: absolute; + z-index: 1; + + /* Fade in tooltip */ + visibility: hidden; + opacity: 0; + transition: opacity 0.3s; +} + +.tooltip .ttt-fatigue{ + width: 360px; + + background: rgba(30, 25, 20, 0.9); + border-image: url(img/ui/bg_control.jpg) 21 repeat; + border-image-slice: 6 6 6 6 fill; + border-image-width: 6px 6px 6px 6px; + border-image-outset: 0px 0px 0px 0px; + border-radius: 0px; + + font-size: 0.8rem; + padding: 3px 0; +} + +.tooltip .ttt-ajustements { + width: 150px; + background: rgba(220,220,210,0.95); + border-radius: 6px; + font-size: 0.9rem; + padding: 3px 0; +} + +.tooltip-nobottom { + border-bottom: unset; /* If you want dots under the hoverable text */ +} +.tooltip .ttt-xp { + width: 250px; + background: rgba(220,220,210,0.95); + border-radius: 6px; + font-size: 0.9rem; + padding: 3px 0; +} + +/* Show the tooltip text when you mouse over the tooltip container */ +.tooltip:hover .tooltiptext { + visibility: visible; + opacity: 1; +} + +.chat-card-button { + box-shadow: inset 0px 1px 0px 0px #a6827e; + background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%); + background-color: #7d5d3b00; + border-radius: 3px; + border: 2px ridge #846109; + display: inline-block; + cursor: pointer; + color: #ffffff; + font-family: CaslonPro; + font-size: 14px; + padding: 4px 12px 0px 12px; + text-decoration: none; + text-shadow: 0px 1px 0px #4d3534; + position: relative; + margin:5px; +} + +.chat-card-button:hover { + background: linear-gradient(to bottom, #800000 5%, #3e0101 100%); + background-color: red; +} +.chat-card-button:active { + position:relative; + top:1px; +} + +/*************************************************************/ +#pause +{ + font-family: CaslonAntique; + font-size: 2rem; +} +#pause > h3 +{ + color: #CCC +} +#pause > img { + content: url(img/rdd_pause.png); + height: 256px; + width: 256px; + top: -75px; + left: calc(50% - 132px); +} + +#logo { + content : url(img/logo.png); + width: 80px; + height: 68px; +} \ No newline at end of file diff --git a/system.json b/system.json index 8d275f1..07d8b5b 100644 --- a/system.json +++ b/system.json @@ -2,11 +2,11 @@ "name": "foundryvtt-shadows-over-sol", "title": "Shadows over Sol", "description": "Shadows over Sol for FoundryVTT", - "version": "0.0.1", + "version": "0.0.4", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.9", - "templateVersion": 1, + "templateVersion": 4, "author": "LeRatierBretonnien", "esmodules": [ "module/sos-main.js" ], "styles": ["styles/simple.css"], @@ -15,11 +15,17 @@ "packs": [ ], "library": false, - "languages": [], + "languages": [ + { + "lang": "en", + "name": "English", + "path": "lang/en.json" + } + ], "gridDistance": 5, "gridUnits": "ft", - "primaryTokenAttribute": "attributes.life", - "secondaryTokenAttribute": "attributes.endurance", + "primaryTokenAttribute": "", + "secondaryTokenAttribute": "", "socket": true, "url": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/", "manifest": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/raw/system.json", diff --git a/template.json b/template.json index 4089670..01f2b30 100644 --- a/template.json +++ b/template.json @@ -2,10 +2,6 @@ "Actor": { "types": ["character", "npc"], "templates": { - "description": { - "description": "Description ...", - "gmnotes": "GM notes" - }, "subactors": { "subactors": { "followers": [], @@ -115,11 +111,11 @@ "eyes": "", "hair": "", "weight": "", - "sex": "", - "corp": "", + "genre": "", "age": 0 - }, - "personnage": { + } + }, + "character": { "templates": [ "background", "common", "subactors" ] }, "npc": { @@ -160,5 +156,4 @@ "price": 0 } } - } } diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 895c266..9fd7c81 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -13,11 +13,11 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -34,16 +34,20 @@ {{#each data.stats as |stat key|}} {{#if stat.isLevelUp}}
  • - + - {{localize STAT.levelUp}} + {{localize 'STAT.levelUp'}} {{else}}
  • {{/if}} - {{stat.label}} - - + {{localize stat.label}} + +
  • {{/each}} diff --git a/templates/stat-option-list.html b/templates/stat-option-list.html new file mode 100644 index 0000000..706f51a --- /dev/null +++ b/templates/stat-option-list.html @@ -0,0 +1,11 @@ + + + + + + + + + + +