From fa1c470fb2ae39bfb3b6ce2befb7f2f40b017728 Mon Sep 17 00:00:00 2001 From: SavageSpiel <92274791+SavageSpiel@users.noreply.github.com> Date: Fri, 10 Jun 2022 23:12:02 +0100 Subject: [PATCH] Updated Kult Divinity Lost sheet Added repeaters, sheetworkers, trait roll buttons, conditions and advancement --- Kult Divinity Lost/KULT Divinity Lost.css | 576 +++++++++----- Kult Divinity Lost/KULT Divinity Lost.html | 848 +++++++++++++++------ Kult Divinity Lost/sheet.json | 4 +- Kult Divinity Lost/translation.json | 46 +- 4 files changed, 1046 insertions(+), 428 deletions(-) diff --git a/Kult Divinity Lost/KULT Divinity Lost.css b/Kult Divinity Lost/KULT Divinity Lost.css index a086a5ea16..510845539c 100644 --- a/Kult Divinity Lost/KULT Divinity Lost.css +++ b/Kult Divinity Lost/KULT Divinity Lost.css @@ -7,38 +7,148 @@ -o-background-size: cover; background-size: cover; border: 2px solid black; - width:900px; - min-width:900px; + width:825px; + min-width:825px; min-height:400px; } + +/* General Styles */ + +.charsheet input[type="text"], textarea{ + display: inline-block; + background: #fff5; + border: black solid 1px; + border-top: none; + border-left: none; + border-radius: 0%; +} +.charsheet textarea{ + border-left: black solid 1px; + resize: none; +} +.charsheet .sheet-label{ + background: black; + color: #968c6a; + padding-right: 10px; + display: inline-block; + padding: 5px 10px 3px 5px; + height: 21px; + /*margin-right: -.5%;*/ + font-size: 1em; + font-weight: bold; + vertical-align:middle; +} +.charsheet .sheet-label2{ + font-size: 9pt; + margin: 1%; +} +.charsheet .sheet-label3{ + font-style: italic; + font-size: 9pt; + padding-right: 2%; +} +.charsheet .sheet-label4{ + font-weight: bold; + font-size: 9pt; +} +.sheet-row { + height: 32px; + margin: 0 0 2px; +} +.charsheet input[type="number"]{ + border: none; + font-size: 2em; + background: none; + color: black; + text-align: center; + width: 2em !important; +} +.charsheet button{ + background: #fff5; + font-size: 9pt !important; + border: 1.5px solid #968c6a; + font-style: italic; + color: black; +} +.charsheet button:hover{ + background: black; + color: #968c6a; + text-shadow: none; +} +.charsheet button[type=roll]:before { + content: none !important; +} +.charsheet h4{ + text-align: center; +} +.charsheet input:focus, .charsheet textarea:focus{ + outline: none; +} + +.charsheet input[type=checkbox]{ + opacity: 0; + margin-right: -1.5em; + height: 1em; + width: 1em; +} +.charsheet input[type=checkbox] + span:before{ + content: "❌"; + border: 2px solid black; + height: 1em; + width: 1em; + color: #00000000; + font-size: 1em; +} +.charsheet input[type=checkbox]:checked + span:before{ + color: #000000FF; +} + +/* PAGE 1 */ + +/* Layout */ .sheet-container1 { display: grid; - grid-template-columns: 145px 145px 145px 145px 145px 145px; - grid-template-rows: 120px 120px 1fr 1fr 1fr 1fr; + grid-template-columns: 420px 95px 145px 150px; + grid-template-rows: auto; + /*grid-template-rows: 111px 120px 120px 320px 220px 200px;*/ gap: 5px 5px; grid-template-areas: - "basic basic basic basic logo logo" - "appearance appearance appearance appearance appearance appearance" - "attributes attributes attributes dark_secrets dark_secrets dark_secrets" - "attributes attributes attributes disadvantages disadvantages disadvantages" - "attributes attributes attributes advantages advantages advantages" - "attributes attributes attributes relations relations relations"; + "basic basic logo logo" + "appearance appearance appearance appearance" + "attributes traits traits traits" } -.sheet-basic { grid-area: basic; - /*display: inline-block";*/ - /*padding: 5px;*/ +.sheet-basic { + grid-area: basic; } -.sheet-logo { grid-area: logo; - /*background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Kult%20Divinity%20Lost/Kult-Divinity-lost-logo.png");*/ - /*background-repeat: no-repeat;*/ - /*background-size: 240px 100px;*/ - /*background-position: center;*/ +.sheet-logo { + grid-area: logo; } -.sheet-appearance { grid-area: appearance; - +.sheet-appearance { + grid-area: appearance; + height:100px; + margin-top:-13px; } -.sheet-attributes { grid-area: attributes; +.sheet-attributes { + grid-area: attributes; +} + +.sheet-traits { + grid-area: traits; + display: flex; + flex-direction: column; +} + +/* Basic */ +.sheet-basic .sheet-label, .sheet-appearance .sheet-label { + width:90px; +} +.sheet-basic input { + width:365px; +} + +/* Attributes */ +.sheet-sephirot { background-image: url("https://i.imgur.com/G94W8PR.png"); background-size: 100% auto; background-repeat: none; @@ -46,64 +156,262 @@ -moz-background-size: cover; -o-background-size: cover; background-size: cover; - height:750px; + height:720px; + width:420px; position: relative; } -.sheet-dark_secrets { grid-area: dark_secrets; - + +.charsheet .sheet-passatt{ + border: 3px #968c6a dotted; + width: 3em; + display: inline-block; } -.sheet-disadvantages { grid-area: disadvantages; - -} -.sheet-advantages { grid-area: advantages; - -} -.sheet-relations { grid-area: relations; - +.charsheet .sheet-actatt{ + border: 3px #968c6a dotted; + width: 3em; + border-radius: 50%; + display: inline-block; +} +.charsheet .sheet-attlabel{ + display: inline-block; + text-align: center; + width: 180px; } +/* Traits */ +.sheet-disadvantages textarea, .sheet-advantages textarea, .sheet-dark_secrets textarea{ + height: 140px; + width:390px; +} +.sheet-disadvantages { + margin-bottom:10px; +} + +.sheet-advantages { + margin-bottom:10px; +} + +.sheet-advantages select{ + width:102px; + display: inline-block; + background: #fff5; + border: black solid 1px; + border-top: none; + border-left: none; + border-radius: 0%; + margin-bottom:0; +} + +.sheet-advantages input[type="text"], .sheet-disadvantages input[type="text"]{ + width:200px; +} + +.sheet-advantages input[type="text"], .sheet-disadvantages input[type="text"], .sheet-weapons input[type="text"], .sheet-wounds input[type="text"]{ + font-weight:bold; + color:#333; +} + +.sheet-advantages button[type=roll] { + margin-right:0; + margin-left:0; +} + +/* PAGE 2 */ + +/* Layout */ .sheet-container2 { display: grid; - grid-template-columns: 145px 145px 145px 145px 145px 145px; - grid-template-rows: 210px 300px 300px 300px; + grid-template-columns: 360px 145px 145px 130px; + grid-template-rows: auto; gap: 5px 5px; grid-template-areas: - "wounds wounds dramatic_hooks dramatic_hooks dramatic_hooks dramatic_hooks" - "stability stability dramatic_hooks dramatic_hooks dramatic_hooks dramatic_hooks" - "gears gears gears notes notes notes" - "weapons weapons weapons notes notes notes"; + "penalties other other other" + "equipment advance advance advance" + "notes notes notes notes" } -.sheet-wounds { grid-area: wounds; - +.sheet-penalties { + grid-area: penalties; + display: flex; + flex-direction: column; +} +.sheet-other { + grid-area: other; + display: flex; + flex-direction: column; } -.sheet-stability { grid-area: stability; - +.sheet-equipment { + grid-area:equipment; } -.sheet-dramatic_hooks { grid-area: dramatic_hooks; - +.sheet-advancement { + grid-area:advance; } -.sheet-gears { grid-area: gears; +.sheet-notes { + grid-area:notes; margin-top: 10px; } -.sheet-weapons { grid-area: weapons; - margin-top: 10px; + +/* Wounds */ +.sheet-wounds { + margin-bottom:10px; } -.sheet-notes { grid-area: notes; - margin-top: 10px; +.sheet-wounds-list{ + background-color: #fff5; + border: black solid 1px; + border-top: none; + padding: 4px; + width:340px; +} +.sheet-wounds-list input[type=text]{ + border: 1px transparent dashed; + background-color: transparent; + width:280px; +} +.sheet-wounds-list input[type=text]:hover{ + border-bottom: 1px black dashed; +} +.sheet-wounds-list input[type=checkbox]{ + display: inline-block; + margin-left:20px; +} +.sheet-wounds-list .sheet-label2{ + display: inline-block; +} +.sheet-wounds-list .sheet-wounds-label-left{ + width:268px; } - -.sheet-row { - height: 32px; - margin: 0 0 2px; +/* Stability */ +.sheet-bracket{ + border: 1px black solid; + border-top: none; + background-color: #fff5; + margin-bottom:10px; + width:350px; } +.sheet-bracket td{ + padding:5px 0 4px 4px; + border-bottom: 1px black solid; + vertical-align:top; +} +.sheet-bracket td.sheet-label3{ + border-right: 1px black solid; +} + +.sheet-bracket td.sheet-bracket-stress{ + padding-left:15px; +} + +.charsheet .sheet-bracket input[type=radio]{ + display: block; + opacity: 0; + margin-right: -1.5em; + height:18px; + width:20px; +} +.charsheet .sheet-bracket input[type=radio] + span:before{ + content: "❌"; + border: 2px solid black; + height: 1em; + width: 1em; + color: #00000000; + font-size: 1em; +} +.charsheet .sheet-bracket input[type=radio]:checked + span:before{ + color: #000000FF; +} + +/* Conditions */ +.sheet-conditions { + margin-bottom:10px; +} + +.sheet-conditions-checks{ + background-color: #fff5; + border: black solid 1px; + border-top: none; + padding: 4px; + width:450px; +} +.sheet-conditions-checks input[type=checkbox]{ + display: inline-block; + margin-left:10px; +} +.sheet-conditions-checks .sheet-label2{ + display: inline-block; + width:185px; +} + + +/* Weapons */ +.sheet-weapons { + margin-bottom:10px; +} + +.charsheet .sheet-weapons input[type="number"]{ + border: 1px solid black; + font-size: 1em; + background: none; + color: black; + text-align: center; + width: 40px !important; +} + +.sheet-weapons textarea, .sheet-gears textarea { + height: 200px; + width:340px; +} + +/* Advancement */ +.charsheet .sheet-advancement input[type="number"]{ + border: 1px solid black; + font-size: 1em; + background-color: #fff5; + color: black; + text-align: center; + width: 50px !important; + margin-top:2px; +} + +.sheet-advancement .sheet-advancement-header { + font-size:1.5em; + font-style:italic; + margin-left:20px; +} + +.sheet-advancement .sheet-advancement-checks { + margin-left:5px; +} +.sheet-advancement input[type=checkbox]{ + opacity: 0; + margin-right: -1em; + height: 1em; + width: 1em; +} + +.charsheet div.sheet-typesleeper, .charsheet div.sheet-typeaware, .charsheet div.sheet-typeenlightened{ + display: none; + background-color: #fff5; + border: black solid 1px; + border-top: none; + padding: 4px; + width:450px; +} +.charsheet input.sheet-typesleeper:checked ~ div.sheet-typesleeper, .charsheet input.sheet-typeaware:checked ~ div.sheet-typeaware, .charsheet input.sheet-typeenlightened:checked ~ div.sheet-typeenlightened{ + display: block; +} +.charsheet .sheet-advancement input[type=radio] + label { + width:auto; + padding: 0 3px; +} + +/* Roll Template */ .sheet-rolltemplate-kult{ background-image: url("https://i.imgur.com/JbSqPZV.png"); @@ -180,91 +488,18 @@ text-align: center; height:25px; margin-top:10px; - } -.charsheet input[type="text"], textarea{ - display: inline-block; - background: #fff5; - border: black solid 1px; - border-top: none; - border-left: none; - border-radius: 0%; -} -.charsheet textarea{ - border-left: black solid 1px; - resize: none; -} -.charsheet .sheet-label{ - background: black; - color: #968c6a; - padding-right: 10px; - display: inline-block; - padding: 3px 10px 3px 5px; - height: 21px; - /*margin-right: -.5%;*/ - font-size: 1em; - font-weight: bold; -} -/*.charsheet .sheet-header .sheet-row{*/ -/* margin-bottom: 1%;*/ -/*}*/ -.charsheet .sheet-passatt{ - border: 3px #968c6a dotted; - width: 3em; - display: inline-block; -} -.charsheet .sheet-actatt{ - border: 3px #968c6a dotted; - width: 3em; - border-radius: 50%; - display: inline-block; -} -.charsheet input[type="number"]{ - border: none; - font-size: 2em; - background: none; - color: black; - text-align: center; - width: 2em !important; -} -.charsheet button{ - background: #fff5; - font-size: 9pt !important; - border: 1.5px solid #968c6a; - font-style: italic; - color: black; -} -.charsheet button:hover{ - background: black; - color: #968c6a; - text-shadow: none; -} -.charsheet button[type=roll]:before { - content: none !important; -} -.charsheet .sheet-attlabel{ - display: inline-block; - text-align: center; - width: 180px; -} -.charsheet h4{ - text-align: center; -} -.charsheet .sheet-leftatt{ - float: left; - width: 49%; - margin-bottom: 7%; -} -.charsheet .sheet-rightatt{ - float: right; - text-align: right; - width: 49%; - margin-bottom: 7%; -} -.charsheet input:focus, .charsheet textarea:focus{ - outline: none; + +.sheet-rolltemplate-kult .sheet-container .inlinerollresult { + background-color: #fff5; + border: 2px solid #000; + color:black; } + + +/* TAB HANDLING */ + .charsheet input[type=radio]{ display: none; float: left; @@ -293,73 +528,4 @@ .charsheet input.sheet-page1:checked ~ div.sheet-page1, .charsheet input.sheet-page2:checked ~ div.sheet-page2{ display: block; } -.charsheet .sheet-onethird{ - width: 35%; -} -.charsheet .sheet-label2{ - font-size: 9pt; - margin: 1%; -} -.charsheet .sheet-bracket{ - border: 1px black solid; - border-top: none; - background-color: #fff5; -} -.charsheet .sheet-bracket input[type=text]{ - border: none; - margin-right: 11%; - background-color: transparent; -} -.charsheet .sheet-bracket input[type=text]:hover{ - border-bottom: 1px black dashed; -} -.charsheet input[type=checkbox]{ - opacity: 0; - margin-right: -1.5em; - height: 1em; - width: 1em; -} -.charsheet input[type=checkbox] + span:before{ - content: "❌"; - border: 2px solid black; - height: 1em; - width: 1em; - color: #00000000; - font-size: 1em; -} -.charsheet input[type=checkbox]:checked + span:before{ - color: #000000FF; -} -.charsheet .sheet-label3{ - font-style: italic; - font-size: 9pt; - padding-right: 2%; -} -.charsheet .sheet-label4{ - font-weight: bold; - font-size: 9pt; -} -.charsheet .sheet-bracket input[type=radio]{ - display: block; - opacity: 0; - margin-left: 25%; - margin-top: 15%; - margin-bottom: -1.1em; -} -.charsheet .sheet-bracket input[type=radio] + span:before{ - content: "❌"; - border: 2px solid black; - height: 1em; - width: 1em; - color: #00000000; - font-size: 1em; - float: left; - margin-left: 15%; - margin-bottom: 15%; -} -.charsheet .sheet-bracket input[type=radio]:checked + span:before{ - color: #000000FF; -} -.charsheet .sheet-twothirds{ - width: 60%; -} \ No newline at end of file + diff --git a/Kult Divinity Lost/KULT Divinity Lost.html b/Kult Divinity Lost/KULT Divinity Lost.html index ce95f90e11..24acc04625 100644 --- a/Kult Divinity Lost/KULT Divinity Lost.html +++ b/Kult Divinity Lost/KULT Divinity Lost.html @@ -1,4 +1,5 @@ + @@ -10,306 +11,456 @@
-
⬪ Name
+
⬪ Name
-
⬪ Archetype
+
⬪ Archetype
-
⬪ Occupation
+
⬪ Occupation
-
-
⬪ Appearance
- -
+
⬪ Appearance
+
-
-
⬪ Attributes
- -
-
-

Fortitude

- -
- + +
+
+
+

Fortitude

+ +
- -
+

Willpower

-
-
- +
- - - -
-
+
+

Reflexes

-
- - -
+

Reason

-
-
- +
- - - -
-
+
+

Intuition

-
- - -
+

Perception

-
-
- +
- - - -
-
+
+

Coolness

-
- - -
+

Violence

-
-
- +
- - - -
-
+
+

Charisma

-
- - -
+

Soul

-
-
- -
+
+ +
+ +
+
⬪ Relations
+ +
-
-
⬪ Dark Secrets
- -
-
-
⬪ Disadvantages
- -
-
-
⬪ Advantages
- -
-
-
-
⬪ Relations
- -
-
+ +
+
+
⬪ Dark Secrets
+ +
+
+
⬪ Disadvantages
+
+ + + +
+
+
+
⬪ Advantages
+
+ + + + + +
+
+
-
+
⬪ Wounds
-
-
Serious Wounds (-1 ongoing)
-
Stabilized
-
- - - - - - - - - - - - -
-
Critical Wound (-1 ongoing)
-
Stabilized
-
- - - -
- +
+
Serious Wounds (-1 ongoing)
+
Stabilized
+ + + + + + + + +
Critical Wound (-1 ongoing)
+
Stabilized
+ + +
+
+ +
Apply wound penalties to rolls
+
+
+ +
⬪ Stability
- +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - Composed
- - - UneasyModerate stress:
- - - Unfocused-1 to Disadvantage rolls
- - - ShakenSerious stress:
- - - Distressed-1 Keep it Together
- - - Neurotic-2 to Disadvantage rolls
- - - AnxiousCritical stress:
- - - Irrational-2 Keep it Together
- + Unhinged-3 to Disadvantage rolls
+1 See Through the IllusionComposed
BrokenThe GM makes a MoveUneasy + Moderate stress:
+ -1 to Disadvantage rolls +
+ + + Unfocused
+ + + Shaken + Serious stress:
+ -1 Keep it Together
+ -2 to Disadvantage rolls +
+ + + Distressed
+ + + Neurotic
+ + + Anxious + Critical stress:
+ -2 Keep it Together
+ -3 to Disadvantage rolls
+ +1 See Through the Illusion +
+ + + Irrational
+ + + Unhinged
+ + + BrokenThe GM makes a Move
+ + + +
-
-
⬪ Dramatic Hooks
- -
-
-
⬪ Gear
- -
-
-
⬪ Weapons
- -
-
-
⬪ Notes
- -
+ + +
+ +
+
+
⬪ Conditions
+
+ +
Angry (-1 ongoing)
+ +
Guilt-ridden (-1 ongoing)
+ +
Sad (-1 ongoing)
+ +
Distracted (-2 ongoing)
+ +
Scared (-1 ongoing)
+ +
Obsessed (+1 relation)
+
+
+ +
Apply condition penalties to rolls
+
+ +
+
+
⬪ Dramatic Hooks
+ +
+ +
+ +
+
+
⬪ Gear
+ +
+
+
⬪ Weapons
+
+ + Ammo: / + +
+
+
+ +
+
⬪ Advancement
+

Experience

+ + + + + + + +

+
+

Your sleeping PC advances in the following steps:

+

+ + [1] They remember something about their Dark Secret.

+

+ + [2] They remember something about their Dark Secret.

+

+ + [3] They remember something about their Dark Secret.

+

+ + [4] They remember something about their Dark Secret.

+

+ + [5] They remember something about their Dark Secret.

+

+ + [6] They awaken. You choose an Aware Archetype. The PC keeps their Dark Secret and their Disadvantages, but the player picks three Advantages from their new Archetype.

+
+
+

When your character advances you get to choose from the following advancements.

+

Choose One of These:

+

+ + + + + + + Increase one active Attribute +1 (to max +3).

+

+ + + Increase one passive Attribute +1 (to max +3).

+

+ + Increase any one Attribute +1 (to max +4).

+

+ + + + Select a new Advantage from your Archetype.

+

After 5 Advancements You May Also Choose:

+

+ + + Increase any one Attribute +1 (to max +4).

+

+ + + Select a new Advantage from any Aware Archetype.

+

+ + End your character's story arc as you see fit, and create a new Aware character, who starts with 2 Advancements.

+

+ + Replace your current Archetype with another Aware Archetype, and erase one of your starting 3 Advantages.

+

After 10 Advancements You May Also Choose:

+

+ + Advance your character to an Enlightened Archetype.

+
+
+

Choose One of These:

+

+ + Add +1 to any Attribute (max +5).

+

+ + + + + + + Add +1 to an active Attribute (max +4).

+

+ + + Add +1 to a passive Attribute (max +4).

+

+ + + + Gain an Ability available to your Archetype.

+

After 5 Advancements You May Also Choose:

+

+ + + Add +1 to any Attribute (max +5).

+

+ + + + Gain an Ability or Advantage of your choosing.

+

+ + Finish your character's story and make a new PC.

+

+ + Change your character's Archetype to a new Enlightened one.

+

After 10 Advancements You May Also Choose:

+

+ + Start your journey towards Awakening.

+
+
+ +
+
⬪ Notes
+ +
@@ -341,7 +492,264 @@ on("sheet:opened", function(eventInfo){ setAttrs({ modificator: getTranslationByKey("modificator-rt") }); - + + // check the version + // if it's 0 either we need an upgrade or it's a new sheet + // check the attributes that need upgrading + // if they exist, do the upgrade + // then update the version to 2 + getAttrs(["version"], function(values) { + var version = parseInt(values.version)||0; + if (version == 0){ + getAttrs(["charname","stability","disadvantages","advantages","weapons"], function(subvalues) { + var newrowattrs = {}; + newrowattrs["version"] = 2; + + if (subvalues.charname != undefined){ + newrowattrs["character_name"] = subvalues.charname; + } + + if (subvalues.stability != undefined){ + let stab = 10 - (parseInt(subvalues.stability)||0); + var kit = 0; + var stti = 0; + var disad = 0; + switch(stab){ + case 2: + case 3: + case 4: + kit = -2; + stti = 1; + disad = -3; + break; + case 5: + case 6: + case 7: + kit = -1; + disad = -2; + break; + case 8: + case 9: + disad = -1; + break; + } + newrowattrs["stability"] = stab; + newrowattrs["kit_penalty"] = kit; + newrowattrs["stti_bonus"] = stti; + newrowattrs["disadvantage_penalty"] = disad; + } + + if (subvalues.disadvantages != undefined){ + var newrowid = generateRowID(); + newrowattrs["repeating_disadvantages_" + newrowid + "_disadvantage_description"] = subvalues.disadvantages; + } + + if (subvalues.advantages != undefined){ + var newrowid = generateRowID(); + newrowattrs["repeating_advantages_" + newrowid + "_advantage_description"] = subvalues.advantages; + } + + if (subvalues.weapons != undefined){ + var newrowid = generateRowID(); + newrowattrs["repeating_weapons_" + newrowid + "_weapon_description"] = subvalues.weapons; + } + + setAttrs(newrowattrs); + }); + } + }); +}); + +// Set advantage modifier when an attribute is selected. +on('change:repeating_advantages:advantage_attribute', function() { + getAttrs(["repeating_advantages_advantage_attribute","Fortitude","Willpower","Reflexes","Reason","Intuition","Perception","Coolness","Violence","Charisma","Soul"], function(values) { + var modifier = 0; + switch(values.repeating_advantages_advantage_attribute){ + case "Fortitude": + modifier = parseInt(values.Fortitude)||0; + break; + case "Willpower": + modifier = parseInt(values.Willpower)||0; + break; + case "Reflexes": + modifier = parseInt(values.Reflexes)||0; + break; + case "Reason": + modifier = parseInt(values.Reason)||0; + break; + case "Intuition": + modifier = parseInt(values.Intuition)||0; + break; + case "Perception": + modifier = parseInt(values.Perception)||0; + break; + case "Coolness": + modifier = parseInt(values.Coolness)||0; + break; + case "Violence": + modifier = parseInt(values.Violence)||0; + break; + case "Charisma": + modifier = parseInt(values.Charisma)||0; + break; + case "Soul": + modifier = parseInt(values.Soul)||0; + break; + } + setAttrs({ + repeating_advantages_attributemod: modifier + }); + }); +}); + +// Change advantage modifiers when an attribute modifier is changed. +on("change:fortitude change:willpower change:reflexes change:reason change:intuition change:perception change:coolness change:violence change:charisma change:soul", function() { + getAttrs(["Fortitude","Willpower","Reflexes","Reason","Intuition","Perception","Coolness","Violence","Charisma","Soul"], function(values) { + getSectionIDs("repeating_advantages", function(idarray) { + for (let i = 0; i < idarray.length; i++) { + //Get the selected attribute + getAttrs([`repeating_advantages_${idarray[i]}_advantage_attribute`], function(attributeArray) { + //set the modifier based on the selected attribute + var modifier = 0; + switch(attributeArray[`repeating_advantages_${idarray[i]}_advantage_attribute`]){ + case "Fortitude": + modifier = parseInt(values.Fortitude)||0; + break; + case "Willpower": + modifier = parseInt(values.Willpower)||0; + break; + case "Reflexes": + modifier = parseInt(values.Reflexes)||0; + break; + case "Reason": + modifier = parseInt(values.Reason)||0; + break; + case "Intuition": + modifier = parseInt(values.Intuition)||0; + break; + case "Perception": + modifier = parseInt(values.Perception)||0; + break; + case "Coolness": + modifier = parseInt(values.Coolness)||0; + break; + case "Violence": + modifier = parseInt(values.Violence)||0; + break; + case "Charisma": + modifier = parseInt(values.Charisma)||0; + break; + case "Soul": + modifier = parseInt(values.Soul)||0; + break; + } + + const output = {}; + output[`repeating_advantages_${idarray[i]}_attributemod`] = modifier; + setAttrs(output); + }); + } + }); + }); +}); + +// Set condition penalty when conditions change +on('change:conditionangry change:conditionguiltridden change:conditionsad change:conditiondistracted change:conditionscared change:applyconditionpenalty', function() { + getAttrs(["conditionangry","conditionguiltridden","conditionsad","conditiondistracted","conditionscared","applyconditionpenalty"], function(values) { + var conditionpenalty = 0; + let apply = parseInt(values.applyconditionpenalty)||0; + if (apply == 1){ + let angry = parseInt(values.conditionangry)||0; + let guiltridden = parseInt(values.conditionguiltridden)||0; + let sad = parseInt(values.conditionsad)||0; + let distracted = parseInt(values.conditiondistracted)||0; + let scared = parseInt(values.conditionscared)||0; + if (angry == 1){ + conditionpenalty = conditionpenalty - 1; + } + if (guiltridden == 1){ + conditionpenalty = conditionpenalty - 1; + } + if (sad == 1){ + conditionpenalty = conditionpenalty - 1; + } + if (distracted == 1){ + conditionpenalty = conditionpenalty - 2; + } + if (scared == 1){ + conditionpenalty = conditionpenalty - 1; + } + } + + setAttrs({ + "condition_penalty": conditionpenalty + }); + }); +}); + +// Set stability modifiers when stability changes. +on('change:stability', function() { + getAttrs(["stability"], function(values) { + let stability = parseInt(values.stability)||0; + var kit = 0; + var stti = 0; + var disad = 0; + switch(stability){ + case 2: + case 3: + case 4: + kit = -2; + stti = 1; + disad = -3; + break; + case 5: + case 6: + case 7: + kit = -1; + disad = -2; + break; + case 8: + case 9: + disad = -1; + break; + } + setAttrs({ + kit_penalty: kit, stti_bonus: stti, disadvantage_penalty: disad + }); + }); +}); + +// Set wound penalty when wounds change +on('change:swound1 change:swound1name change:swound2 change:swound2name change:swound3 change:swound3name change:swound4 change:swound4name change:cwound1 change:cwound1name change:applywoundpenalty', function() { + getAttrs(["swound1","swound1name","swound2","swound2name","swound3","swound3name","swound4","swound4name","cwound1","cwound1name","applywoundpenalty"], function(values) { + var woundpenalty = 0; + let apply = parseInt(values.applywoundpenalty)||0; + if (apply == 1){ + // If there's a critical wound that's not stabilised, -1 + let critical = values.cwound1name||""; + let criticalstable = parseInt(values.cwound1)||0; + if (critical.length > 0 && criticalstable == 0){ + woundpenalty = woundpenalty - 1; + } + + // If there are any serious wounds that aren't stabilised, -1 + let serious1 = values.swound1name||""; + let serious1stable = parseInt(values.swound1)||0; + let serious2 = values.swound2name||""; + let serious2stable = parseInt(values.swound2)||0; + let serious3 = values.swound3name||""; + let serious3stable = parseInt(values.swound3)||0; + let serious4 = values.swound4name||""; + let serious4stable = parseInt(values.swound4)||0; + if ((serious1.length > 0 && serious1stable == 0) || (serious2.length > 0 && serious2stable == 0) || (serious3.length > 0 && serious3stable == 0) || (serious4.length > 0 && serious4stable == 0)){ + woundpenalty = woundpenalty - 1; + } + } + + setAttrs({ + "wound_penalty": woundpenalty + }); + }); }); \ No newline at end of file diff --git a/Kult Divinity Lost/sheet.json b/Kult Divinity Lost/sheet.json index 4ade054317..adc4038cc5 100644 --- a/Kult Divinity Lost/sheet.json +++ b/Kult Divinity Lost/sheet.json @@ -1,8 +1,8 @@ { "html": "KULT Divinity Lost.html", "css": "KULT Divinity Lost.css", - "authors": "Johny Ricardo, Kevin J.", - "roll20userid": "5098891, 129882", + "authors": "Johny Ricardo, Kevin J., Sue Savage", + "roll20userid": "5098891, 129882, 5009227", "preview": "KULT-Divinity-Lost.png", "instructions": "A character sheet for KULT Divinity Lost. Now with rolltemplates for the basic moves, a new layout and support to internationalization", "legacy": true diff --git a/Kult Divinity Lost/translation.json b/Kult Divinity Lost/translation.json index ee116504c0..a07bcfb4a1 100644 --- a/Kult Divinity Lost/translation.json +++ b/Kult Divinity Lost/translation.json @@ -28,12 +28,15 @@ "soul-mv-u": "See Through the Illusion", "darksecrets-u": "Dark Secrets", "disadvantages-u": "Disadvantages", + "disadvantages-roll-u": "Roll Disadvantage", "advantages-u": "Advantages", + "advantages-roll-u": "Roll Advantage", "relations-u": "Relations", "wounds-u": "Wounds", "wounds-serious-u": "Serious Wounds (-1 ongoing)", "wounds-stabilized-u": "Stabilized", "wounds-critical-u": "Critical Wound (-1 ongoing)", + "wounds-apply-u": "Apply wound penalties to rolls", "stability-u": "Stability", "stability-lvl0-u": "Composed", "stability-lvl1-u": "Uneasy", @@ -64,5 +67,46 @@ "complete-success-rt": "Success!", "partial-success-rt": "Success with complications...", "failure-rt": "Failure!", - "modificator-rt": "Modificator" + "modificator-rt": "Modificator", + "conditions-u": "Conditions", + "conditions-angry-u": "Angry (-1 ongoing)", + "conditions-guilt-u": "Guilt-ridden (-1 ongoing)", + "conditions-sad-u": "Sad (-1 ongoing)", + "conditions-distracted-u": "Distracted (-2 ongoing)", + "conditions-scared-u": "Scared (-1 ongoing)", + "conditions-obsessed-u": "Obsessed (+1 relation)", + "conditions-apply-u": "Apply condition penalties to rolls", + "advancement-u": "Advancement", + "experience-u": "Experience", + "sleeper-u": "Sleeper", + "aware-u": "Aware", + "enlightened-u": "Enlightened", + "sleeper-steps-u": "Your sleeping PC advances in the following steps:", + "sleeper-remember-u": "They remember something about their Dark Secret.", + "sleeper-awaken-u": "They awaken. You choose an Aware Archetype. The PC keeps their Dark Secret and their Disadvantages, but the player picks three Advantages from their new Archetype.", + "aware-intro-u": "When your character advances you get to choose from the following advancements.", + "aware-choose-u": "Choose One of These:", + "aware-advance-active-u": "Increase one active Attribute +1 (to max +3).", + "aware-advance-passive-u": "Increase one passive Attribute +1 (to max +3).", + "aware-advance-any-u": "Increase any one Attribute +1 (to max +4).", + "aware-advance-new-u": "Select a new Advantage from your Archetype.", + "aware-advance-5-u": "After 5 Advancements You May Also Choose:", + "aware-advance-5-any-u": "Increase any one Attribute +1 (to max +4).", + "aware-advance-5-new-u": "Select a new Advantage from any Aware Archetype.", + "aware-advance-5-end-u": "End your character's story arc as you see fit, and create a new Aware character, who starts with 2 Advancements.", + "aware-advance-5-replace-u": "Replace your current Archetype with another Aware Archetype, and erase one of your starting 3 Advantages.", + "aware-advance-10-u": "After 10 Advancements You May Also Choose:", + "aware-advance-10-new-u": "Advance your character to an Enlightened Archetype.", + "enlightened-choose-u": "Choose One of These:", + "enlightened-advance-any-u": "Add +1 to any Attribute (max +5).", + "enlightened-advance-active-u": "Add +1 to an active Attribute (max +4).", + "enlightened-advance-passive-u": "Add +1 to a passive Attribute (max +4).", + "enlightened-advance-new-u": "Gain an Ability available to your Archetype.", + "enlightened-advance-5-u": "After 5 Advancements You May Also Choose:", + "enlightened-advance-5-any-u": "Add +1 to any Attribute (max +5).", + "enlightened-advance-5-new-u": "Gain an Ability or Advantage of your choosing.", + "enlightened-advance-5-end-u": "Finish your character's story and make a new PC.", + "enlightened-advance-5-replace-u": "Change your character's Archetype to a new Enlightened one.", + "enlightened-advance-10-u": "After 10 Advancements You May Also Choose:", + "enlightened-advance-10-awaken-u": "Start your journey towards Awakening." } \ No newline at end of file