From dd2aba57cbc50b9d4d2cad34a3e53fa9bfc83dcb Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Thu, 3 Sep 2020 22:21:32 -1000 Subject: [PATCH 1/8] Update en.json Changed AB to throw, updated reaction rolls with ACKS language, changed AAC to AC, changed LR to MOR, and set up language for using d20 instead of d6 for exploration checks. --- src/lang/en.json | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index b48faab..fe5f50e 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -38,7 +38,7 @@ "ACKS.roll.attribute": "{attribute} check", "ACKS.roll.details.attribute": "Roll 1d20 <= {score} for success", "ACKS.roll.exploration": "{exploration} test", - "ACKS.roll.details.exploration": "Roll 1d6 <= {expl} for success", + "ACKS.roll.details.exploration": "Roll 1d20 >= {expl} for success", "ACKS.roll.reaction": "Reaction roll", "ACKS.roll.initiative": "Group {group} rolls for Initiative!", "ACKS.roll.individualInit": "{name} rolls for Initiative!", @@ -68,8 +68,8 @@ "ACKS.Retainer": "Retainer", "ACKS.RetainerWage": "Wage", "ACKS.RetainerUpkeep": "Upkeep", - "ACKS.Loyalty": "Loyalty Rating", - "ACKS.LoyaltyShort": "LR", + "ACKS.Loyalty": "Henchmen Morale", + "ACKS.LoyaltyShort": "MOR", "ACKS.scores.str.long": "Strength", "ACKS.scores.str.short": "STR", @@ -95,7 +95,7 @@ "ACKS.saves.spell.short": "S", "ACKS.saves.spell.long": "Spells", "ACKS.saves.magic.long": "Bonus vs Magic", - "ACKS.saves.magic.short": "vs Magic", + "ACKS.saves.magic.short": "vs Magic", "ACKS.Health": "Hit Points", "ACKS.HealthMax": "Maximum Hit Points", @@ -116,11 +116,11 @@ "ACKS.ArmorClassNaked": "Naked Armor Class", "ACKS.ArmorClass": "Armor Class", "ACKS.ArmorClassShort": "AC", - "ACKS.AscArmorClassShort": "AAC", + "ACKS.AscArmorClassShort": "AC", "ACKS.ArmorClassBonus": "Armor Class Bonus", "ACKS.Thac0": "THAC0", - "ACKS.ABShort": "AB", - "ACKS.AB": "Attack Bonus", + "ACKS.ABShort": "Throw", + "ACKS.AB": "Throw", "ACKS.MeleeShort": "MEL", "ACKS.Melee": "Melee", "ACKS.MeleeBonus": "Melee Bonus", @@ -163,6 +163,8 @@ "ACKS.Setting.Initiative": "Initiative", "ACKS.Setting.InitiativeHint": "Grouped or individual initiative.", "ACKS.Setting.InitiativeIndividual": "Individual initiative", + + "ACKS.Setting.InitiativeGroup": "Grouped Initiative", "ACKS.Setting.RerollInitiative": "Initiative persistence", "ACKS.Setting.RerollInitiativeHint": "Keeps, resets or rerolls initiative each round", @@ -272,9 +274,9 @@ "ACKS.colors.white": "White", "ACKS.reaction.check": "Reaction Check", - "ACKS.reaction.Hostile": "{name} is Hostile", - "ACKS.reaction.Unfriendly": "{name} is Unfriendly", - "ACKS.reaction.Neutral": "{name} is Neutral", - "ACKS.reaction.Indifferent": "{name} is Indifferent", - "ACKS.reaction.Friendly": "{name} is Friendly" + "ACKS.reaction.Hostile": "{name} is Hostile and attacks", + "ACKS.reaction.Unfriendly": "{name} is Unfriendly and may attack", + "ACKS.reaction.Neutral": "{name} is Neutral and uncertain", + "ACKS.reaction.Indifferent": "{name} is Indifferent and uninterested", + "ACKS.reaction.Friendly": "{name} is Friendly and helpful" } From db04c4194326b26da425eb43e7d564762148e9fb Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Thu, 3 Sep 2020 22:42:44 -1000 Subject: [PATCH 2/8] Encumbrance Workaround, Exploration checks, and default Monster Saves --- src/module/actor/entity.js | 24 ++-- src/module/config.js | 106 ++++++++++-------- src/module/dice.js | 4 +- .../actors/dialogs/modifiers-dialog.html | 2 +- 4 files changed, 77 insertions(+), 59 deletions(-) diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index f5df6df..d3e58ac 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -333,12 +333,12 @@ export class AcksActor extends Actor { rollExploration(expl, options = {}) { const label = game.i18n.localize(`ACKS.exploration.${expl}.long`); - const rollParts = ["1d6"]; + const rollParts = ["1d20"]; const data = { actor: this.data, roll: { - type: "below", + type: "check", target: this.data.data.exploration[expl], }, details: game.i18n.format("ACKS.roll.details.exploration", { @@ -553,15 +553,15 @@ export class AcksActor extends Actor { const data = this.data.data; let option = game.settings.get("acks", "encumbranceOption"); let weight = data.encumbrance.value; - let delta = data.encumbrance.max - 1600; + let delta = data.encumbrance.max - 20000; if (["detailed", "complete"].includes(option)) { if (weight > data.encumbrance.max) { data.movement.base = 0; - } else if (weight > 800 + delta) { + } else if (weight > 10000 + delta) { data.movement.base = 30; - } else if (weight > 600 + delta) { + } else if (weight > 7000 + delta) { data.movement.base = 60; - } else if (weight > 400 + delta) { + } else if (weight > 5000 + delta) { data.movement.base = 90; } else { data.movement.base = 120; @@ -703,11 +703,13 @@ export class AcksActor extends Actor { const od = { 0: 0, - 3: 1, - 9: 2, - 13: 3, - 16: 4, - 18: 5, + 3: 30, + 4: 26, + 6: 22, + 9: 18, + 13: 14, + 16: 10, + 18: 6, }; data.exploration.odMod = AcksActor._valueFromTable( od, diff --git a/src/module/config.js b/src/module/config.js index 6a6ad7e..a21ef94 100644 --- a/src/module/config.js +++ b/src/module/config.js @@ -106,75 +106,91 @@ export const ACKS = { monster_saves: { 0: { label: "Normal Human", - d: 14, - w: 15, + d: 15, + w: 17, p: 16, b: 17, s: 18 }, 1: { - label: "1-3", - d: 12, - w: 13, + label: "1", + d: 14, + w: 16, + p: 15, + b: 16, + s: 17 + }, + 2: { + label: "2-3", + d: 13, + w: 15, p: 14, b: 15, s: 16 }, 4: { - label: "4-6", - d: 10, - w: 11, + label: "4", + d: 12, + w: 14, + p: 13, + b: 14, + s: 15 + }, + 5: { + label: "5-6", + d: 11, + w: 13, p: 12, b: 13, s: 14 }, 7: { - label: "7-9", - d: 8, - w: 9, + label: "7", + d: 10, + w: 12, + p: 11, + b: 12, + s: 13 + }, + 8: { + label: "8-9", + d: 9, + w: 11, p: 10, - b: 10, + b: 11, s: 12 }, 10: { - label: "10-12", - d: 6, - w: 7, + label: "10", + d: 8, + w: 10, + p: 9, + b: 10, + s: 11 + }, + 11: { + label: "11-12", + d: 7, + w: 9, p: 8, - b: 8, + b: 9, s: 10 }, 13: { - label: "13-15", - d: 4, - w: 5, + label: "13", + d: 6, + w: 8, + p: 7, + b: 8, + s: 9 + }, + 14: { + label: "14+", + d: 5, + w: 7, p: 6, - b: 5, + b: 7, s: 8 }, - 16: { - label: "16-18", - d: 2, - w: 3, - p: 4, - b: 3, - s: 6 - }, - 19: { - label: "19-21", - d: 2, - w: 2, - p: 2, - b: 2, - s: 4 - }, - 22: { - label: "22+", - d: 2, - w: 2, - p: 2, - b: 2, - s: 2 - }, - } + }, }; \ No newline at end of file diff --git a/src/module/dice.js b/src/module/dice.js index 98eb53f..1a46437 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -16,14 +16,14 @@ export class AcksDice { result.isFailure = true; } } else if (data.roll.type == "below") { - // MORALE, EXPLORATION + // MORALE if (roll.total <= result.target) { result.isSuccess = true; } else { result.isFailure = true; } } else if (data.roll.type == "check") { - // SCORE CHECKS (1s and 20s) + // SCORE CHECKS (1s and 20s), EXPLORATION if (die == 1 || (roll.total <= result.target && die < 20)) { result.isSuccess = true; } else { diff --git a/src/templates/actors/dialogs/modifiers-dialog.html b/src/templates/actors/dialogs/modifiers-dialog.html index 5f5060c..c01ea67 100644 --- a/src/templates/actors/dialogs/modifiers-dialog.html +++ b/src/templates/actors/dialogs/modifiers-dialog.html @@ -6,7 +6,7 @@ {{localize 'ACKS.Melee'}} ({{mod data.scores.str.mod}})
  • - {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}} in 6) + {{localize 'ACKS.exploration.od.long'}} ({{data.exploration.odMod}}+)
  • From 0d3d79e7df4f2fdef43e65ca47dec01152f15c57 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Thu, 3 Sep 2020 23:16:07 -1000 Subject: [PATCH 3/8] Update entity.js Bugfix for exploration. Need to roll above, not below. --- src/module/actor/entity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index d3e58ac..a51c3bd 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -338,7 +338,7 @@ export class AcksActor extends Actor { const data = { actor: this.data, roll: { - type: "check", + type: "above", target: this.data.data.exploration[expl], }, details: game.i18n.format("ACKS.roll.details.exploration", { From c37f23a1fdc566609ab012393a85a0d412c3221e Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Thu, 3 Sep 2020 23:17:31 -1000 Subject: [PATCH 4/8] Default values for Normal Men Pre-populate default values for 0 level men on the char sheet. --- src/template.json | 36 +++++++++---------- .../partials/character-abilities-tab.html | 8 ++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/template.json b/src/template.json index fecb02c..bfb9257 100644 --- a/src/template.json +++ b/src/template.json @@ -10,8 +10,8 @@ }, "hp": { "hd": "1d8", - "value": 20, - "max": 20 + "value": 4, + "max": 4 }, "ac": { "value": 0, @@ -31,19 +31,19 @@ }, "saves": { "death": { - "value": 0 + "value": 15 }, "wand": { - "value": 0 + "value": 17 }, "paralysis": { - "value": 0 + "value": 16 }, "breath": { - "value": 0 + "value": 17 }, "spell": { - "value": 0 + "value": 18 } }, "movement": { @@ -98,10 +98,10 @@ } }, "exploration": { - "ld": 1, - "od": 2, - "sd": 1, - "ft": 1 + "ld": 18, + "od": 18, + "sd": 18, + "ft": 18 }, "scores": { "str": { @@ -130,7 +130,7 @@ } }, "encumbrance": { - "max": 1600 + "max": 20000 }, "languages": { "value": [] @@ -140,7 +140,7 @@ "templates": ["common", "spellcaster"], "details": { "biography": "", - "alignment": "", + "alignment": "Neutral", "xp": 0, "treasure": { "table": "", @@ -150,7 +150,7 @@ "d": 0, "w": 0 }, - "morale": 0 + "morale": 7 }, "attacks": "" } @@ -165,7 +165,7 @@ }, "treasure": false, "cost": 0, - "weight": 0 + "weight": 167 }, "weapon": { "range": { @@ -184,7 +184,7 @@ "melee": true, "cost": 0, "equipped": false, - "weight": 0, + "weight": 167, "counter": { "value": 0, "max": 0 @@ -193,11 +193,11 @@ "armor": { "description": "", "ac": 9, - "aac": 10, + "aac": 0, "type": "light", "cost": 0, "equipped": false, - "weight": 0 + "weight": 2000 }, "spell": { "lvl": 1, diff --git a/src/templates/actors/partials/character-abilities-tab.html b/src/templates/actors/partials/character-abilities-tab.html index cb4f30f..4315d08 100644 --- a/src/templates/actors/partials/character-abilities-tab.html +++ b/src/templates/actors/partials/character-abilities-tab.html @@ -2,28 +2,28 @@
  • {{ localize "ACKS.exploration.ld.short" }}

    - +
  • {{ localize "ACKS.exploration.od.short" }}

    - +
  • {{ localize "ACKS.exploration.sd.short" }}

    - +
  • {{ localize "ACKS.exploration.ft.short" }}

    - +
  • From 024a56008722c85388d2ccd945e402863b9ce449 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Thu, 3 Sep 2020 23:25:26 -1000 Subject: [PATCH 5/8] Update character-abilities-tab.html Set default values for exploration. --- .../actors/partials/character-abilities-tab.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/templates/actors/partials/character-abilities-tab.html b/src/templates/actors/partials/character-abilities-tab.html index 4315d08..92ccb78 100644 --- a/src/templates/actors/partials/character-abilities-tab.html +++ b/src/templates/actors/partials/character-abilities-tab.html @@ -2,28 +2,28 @@
  • {{ localize "ACKS.exploration.ld.short" }}

    - +
  • {{ localize "ACKS.exploration.od.short" }}

    - +
  • {{ localize "ACKS.exploration.sd.short" }}

    - +
  • {{ localize "ACKS.exploration.ft.short" }}

    - +
  • From cf8c723b635fb2e99c2b7837f3782c57403c46e3 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Fri, 4 Sep 2020 01:07:28 -1000 Subject: [PATCH 6/8] More exploration changes Mostly formatting the char sheet and changing names. --- src/acks.css | 6 +++--- src/lang/en.json | 8 ++++---- .../actors/partials/character-abilities-tab.html | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/acks.css b/src/acks.css index d699d6f..6af50b1 100644 --- a/src/acks.css +++ b/src/acks.css @@ -821,11 +821,11 @@ line-height: 30px; } .acks.sheet.actor.character .sheet-body .exploration .attribute { - margin: 4px; + margin: 1px; } .acks.sheet.actor.character .sheet-body .exploration .attribute .attribute-name { - text-align: left; - flex: 1 0 60px; + text-align: center; + flex: 1 0 45px; line-height: 25px; font-size: 12px; } diff --git a/src/lang/en.json b/src/lang/en.json index fe5f50e..8e2697a 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -202,7 +202,7 @@ "ACKS.items.RollType": "Type", "ACKS.items.Damage": "Damage", "ACKS.items.ArmorAC": "AC", - "ACKS.items.ArmorAAC": "AAC", + "ACKS.items.ArmorAAC": "AC", "ACKS.items.Bonus": "Bonus", "ACKS.items.AtkBonus": "Attack Bonus", "ACKS.items.roundAttacks": "Attacks Spent this Round", @@ -243,9 +243,9 @@ "ACKS.abilities.Requirements": "Requirements", - "ACKS.exploration.ld.long": "Listen at Door", - "ACKS.exploration.ld.short": "Listen Door", - "ACKS.exploration.ld.abrev": "LD", + "ACKS.exploration.ld.long": "Listen for noises", + "ACKS.exploration.ld.short": "Hear Noise", + "ACKS.exploration.ld.abrev": "HN", "ACKS.exploration.od.long": "Open Stuck Door", "ACKS.exploration.od.short": "Open Door", "ACKS.exploration.od.abrev": "OD", diff --git a/src/templates/actors/partials/character-abilities-tab.html b/src/templates/actors/partials/character-abilities-tab.html index 92ccb78..d36d9ea 100644 --- a/src/templates/actors/partials/character-abilities-tab.html +++ b/src/templates/actors/partials/character-abilities-tab.html @@ -2,28 +2,28 @@
  • {{ localize "ACKS.exploration.ld.short" }}

    - +
  • {{ localize "ACKS.exploration.od.short" }}

    - +
  • {{ localize "ACKS.exploration.sd.short" }}

    - +
  • {{ localize "ACKS.exploration.ft.short" }}

    - +
  • From dbae5b4d359160eb049cf0f90734a6d6b9cc7bc3 Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sat, 5 Sep 2020 01:01:24 -1000 Subject: [PATCH 7/8] 0.2.0 Encumbrance Created the items and heavy items section of the character sheet. Fixed some rounding errors. --- src/lang/en.json | 4 ++-- src/module/actor/entity.js | 9 +++++---- src/system.json | 2 +- src/template.json | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index 8e2697a..97a6e02 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -187,9 +187,9 @@ "ACKS.items.Equip": "Equip", "ACKS.items.Unequip": "Unequip", - "ACKS.items.Misc": "Misc", + "ACKS.items.Misc": "Items", "ACKS.items.Weapons": "Weapons", - "ACKS.items.Treasure": "Treasure", + "ACKS.items.Treasure": "Heavy Items", "ACKS.items.Armors": "Armors", "ACKS.items.Weight": "Wgt.", "ACKS.items.Qualities": "Qualities", diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index a51c3bd..639784e 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -519,8 +519,9 @@ export class AcksActor extends Actor { let hasItems = false; Object.values(this.data.items).forEach((item) => { if (item.type == "item" && !item.data.treasure) { + if (option === "detailed") totalWeight += 166.6; - hasItems = true; +// hasItems = true; } if ( item.type == "item" && @@ -531,7 +532,7 @@ export class AcksActor extends Actor { totalWeight += item.data.weight; } }); - if (option === "detailed" && hasItems) totalWeight += 80; +// if (option === "detailed" && hasItems) totalWeight += 166.6; data.encumbrance = { pct: Math.clamped( @@ -541,7 +542,7 @@ export class AcksActor extends Actor { ), max: data.encumbrance.max, encumbered: totalWeight > data.encumbrance.max, - value: totalWeight, + value: Math.round(totalWeight), }; if (data.config.movementAuto && option != "disabled") { @@ -606,7 +607,7 @@ export class AcksActor extends Actor { (i) => i.type == "item" && i.data.treasure ); treasure.forEach((item) => { - total += item.data.quantity.value * item.data.cost; + total += item.data.quantity.value * item.data.cost }); data.treasure = total; } diff --git a/src/system.json b/src/system.json index d65631d..165f3b5 100644 --- a/src/system.json +++ b/src/system.json @@ -2,7 +2,7 @@ "name": "acks", "title": "Adventurer Conqueror Kings System", "description": "Play B/X OSR modules with ACKS on Foundry VTT", - "version": "0.1.0", + "version": "0.2.0", "minimumCoreVersion": "0.6.2", "compatibleCoreVersion": "0.6.6", "templateVersion": 2, diff --git a/src/template.json b/src/template.json index bfb9257..e42fbb3 100644 --- a/src/template.json +++ b/src/template.json @@ -165,7 +165,7 @@ }, "treasure": false, "cost": 0, - "weight": 167 + "weight": 166.6 }, "weapon": { "range": { From 0263fa5e2fb1938fed15682391a55350d69a505e Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sat, 5 Sep 2020 01:02:19 -1000 Subject: [PATCH 8/8] Rounding error in item cost Fixed rounding errors on character sheet. --- src/module/helpers.js | 4 ++++ src/templates/actors/partials/character-inventory-tab.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/module/helpers.js b/src/module/helpers.js index 6b8f88d..073919f 100644 --- a/src/module/helpers.js +++ b/src/module/helpers.js @@ -33,6 +33,10 @@ export const registerHelpers = async function () { Handlebars.registerHelper("mult", function (lh, rh) { return parseFloat(lh) * parseFloat(rh); }); + + Handlebars.registerHelper("multround", function (lh, rh) { + return Math.round((parseFloat(lh) * parseFloat(rh)) * 100) / 100; + }) Handlebars.registerHelper("roundWeight", function (weight) { return Math.round(parseFloat(weight) / 100) / 10; diff --git a/src/templates/actors/partials/character-inventory-tab.html b/src/templates/actors/partials/character-inventory-tab.html index 44ef401..01a0f29 100644 --- a/src/templates/actors/partials/character-inventory-tab.html +++ b/src/templates/actors/partials/character-inventory-tab.html @@ -176,7 +176,7 @@ -
    {{mult item.data.quantity.value item.data.cost}}
    +
    {{multround item.data.quantity.value item.data.cost}}
    {{#if item.data.quantity.max}}/{{item.data.quantity.max}}{{/if}}