From a1dc2ee0ef1ee2b5513ab62bcde3f6e7d2d74f48 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:45:52 +0000 Subject: [PATCH 01/13] Fix CoC ID not working if using fallback translations --- module/apps/coc-id-batch.js | 3 ++- module/apps/coc-id-editor.js | 2 +- module/scripts/coc-id.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/apps/coc-id-batch.js b/module/apps/coc-id-batch.js index a8efaaa5..2dae4ac9 100644 --- a/module/apps/coc-id-batch.js +++ b/module/apps/coc-id-batch.js @@ -213,7 +213,8 @@ export class CoCIDBatch extends FormApplication { for (const item of items) { foundKeys[item.name] = item.flags.CoC7.cocidFlag.id } - for (const key in foundry.utils.flattenObject(game.i18n.translations.CoC7.CoCIDFlag.keys ?? {})) { + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) + for (const key in CoCIDKeys) { foundKeys[game.i18n.format('CoC7.CoCIDFlag.keys.' + key)] = key } for (const name in missingNames) { diff --git a/module/apps/coc-id-editor.js b/module/apps/coc-id-editor.js index 9026d1d3..a268e3d7 100644 --- a/module/apps/coc-id-editor.js +++ b/module/apps/coc-id-editor.js @@ -42,7 +42,7 @@ export class CoCIDEditor extends FormApplication { } sheetData.eras.sort(CoC7Utilities.sortByNameKey) - const CoCIDKeys = foundry.utils.flattenObject(game.i18n.translations.CoC7.CoCIDFlag.keys ?? {}) + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) const prefix = new RegExp('^' + CoC7Utilities.quoteRegExp(sheetData.idPrefix)) sheetData.existingKeys = Object.keys(CoCIDKeys).reduce((obj, k) => { if (k.match(prefix)) { diff --git a/module/scripts/coc-id.js b/module/scripts/coc-id.js index 8ec0beba..c2959444 100644 --- a/module/scripts/coc-id.js +++ b/module/scripts/coc-id.js @@ -137,7 +137,7 @@ export class CoCID { */ static findCocIdInList (cocid, list) { let itemName = '' - const CoCIDKeys = foundry.utils.flattenObject(game.i18n.translations.CoC7.CoCIDFlag.keys) + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) if (typeof CoCIDKeys[cocid] !== 'undefined') { itemName = CoCIDKeys[cocid] } From 9a69cb0d151bb99918ac2b87459e00fce8b017a4 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:49:37 +0000 Subject: [PATCH 02/13] Update CHANGELOG.md --- .github/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 6ad09ebd..f4a4c044 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -9,6 +9,8 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. +- Fix CoC ID not working if using fall back translations + ## Version 7.4 When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. From 958a5640d300a0aa88241ca81e1100a7d5e00a70 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:07:02 +0000 Subject: [PATCH 03/13] Reverse fallback and language, to give language priority --- module/apps/coc-id-batch.js | 2 +- module/apps/coc-id-editor.js | 2 +- module/scripts/coc-id.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/apps/coc-id-batch.js b/module/apps/coc-id-batch.js index 2dae4ac9..cf5654da 100644 --- a/module/apps/coc-id-batch.js +++ b/module/apps/coc-id-batch.js @@ -213,7 +213,7 @@ export class CoCIDBatch extends FormApplication { for (const item of items) { foundKeys[item.name] = item.flags.CoC7.cocidFlag.id } - const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {})) for (const key in CoCIDKeys) { foundKeys[game.i18n.format('CoC7.CoCIDFlag.keys.' + key)] = key } diff --git a/module/apps/coc-id-editor.js b/module/apps/coc-id-editor.js index a268e3d7..b0d52605 100644 --- a/module/apps/coc-id-editor.js +++ b/module/apps/coc-id-editor.js @@ -42,7 +42,7 @@ export class CoCIDEditor extends FormApplication { } sheetData.eras.sort(CoC7Utilities.sortByNameKey) - const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {})) const prefix = new RegExp('^' + CoC7Utilities.quoteRegExp(sheetData.idPrefix)) sheetData.existingKeys = Object.keys(CoCIDKeys).reduce((obj, k) => { if (k.match(prefix)) { diff --git a/module/scripts/coc-id.js b/module/scripts/coc-id.js index c2959444..b9eedf6d 100644 --- a/module/scripts/coc-id.js +++ b/module/scripts/coc-id.js @@ -137,7 +137,7 @@ export class CoCID { */ static findCocIdInList (cocid, list) { let itemName = '' - const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {})) + const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {})) if (typeof CoCIDKeys[cocid] !== 'undefined') { itemName = CoCIDKeys[cocid] } From f87d0e9cbdce3e64dab131a87b5f689317a6221e Mon Sep 17 00:00:00 2001 From: vonv <44206935+vonv@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:31:54 +0100 Subject: [PATCH 04/13] Update fr.json --- lang/fr.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lang/fr.json b/lang/fr.json index 2278493e..69799bbb 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1364,5 +1364,11 @@ "CoC7.ErrorNoActorPermission": "Vous n'êtes pes le Proriétaire de cet Acteur", "CoC7.ErrorCombinedRollsRequireSingleActor": "Vous ne pouvez pas avoir plus d'un acteur dans un jet combiné", "CoC7.ErrorOpposedRollsLimitedToTwoActors": "Une carte de jet opposé demandes deux acteurs", - "CoC7.PauseName": "Time Stop" + "CoC7.PauseName": "Time Stop", + + "CoC7.ClickableEvents.MouseOver.Title": "Permission de cliquer", + "CoC7.ClickableEvents.MouseOver.Hint": "Renvoie un booléen si le click est permis et affiche le curseur de la souris", + "CoC7.ClickableEvents.LeftClick.Title": "Script sur Click Gauche", + "CoC7.ClickableEvents.RightClick.Title": "Script sur Click Droit", + "TYPES.RegionBehavior.coc7ClickableEvents": "Evénements clicquables" } From f718880d84c826b7cd478061ed2873febcfe1ca7 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:23:07 +0000 Subject: [PATCH 05/13] Fix manually adding sanity loss / immunity reasons --- module/apps/create-mythos-encounters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/apps/create-mythos-encounters.js b/module/apps/create-mythos-encounters.js index 9652b2f1..c9ca389a 100644 --- a/module/apps/create-mythos-encounters.js +++ b/module/apps/create-mythos-encounters.js @@ -37,7 +37,7 @@ export class CoC7CreateMythosEncounter extends FormApplication { sanityLossEvents.sort(function (left, right) { return left.type.localeCompare(right.type) }) - this.object.actor.update({ 'data.sanityLossEvents': sanityLossEvents }) + this.object.actor.update({ 'system.sanityLossEvents': sanityLossEvents }) } this.close() } From f4279bd702d34a70698bc1e8460fd2404117b805 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:25:05 +0000 Subject: [PATCH 06/13] Updated translations list --- .github/TRANSLATIONS.md | 54 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/TRANSLATIONS.md b/.github/TRANSLATIONS.md index d97ffa5e..d4f203c1 100644 --- a/.github/TRANSLATIONS.md +++ b/.github/TRANSLATIONS.md @@ -2,6 +2,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry VTT better! Below is a list of translations keys on existing files that still need translated, based on `en.json`. Feel free to create a new `*.json` file for a language that is not shown here! +The **fr** translation is currently up to date + The following translations have more than 50 untranslated strings [are you able to help?](./ABANDONED.md) [cn.json (450 untranslated strings)](./ABANDONED.md#cnjson) @@ -20,32 +22,32 @@ The following translations have more than 50 untranslated strings [are you able -|Key|de|es|fr|it|ja|pl|uk| -|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -|**Remaining**:|**5**|**17**|**5**|**22**|**1**|**5**|**5**| -|[CoC7.ActorCoCIDItemsActorDirectory](#coc7actorcociditemsactordirectory)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsActorSheets](#coc7actorcociditemsactorsheets)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsBest](#coc7actorcociditemsbest)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules1](#coc7actorcociditemsrules1)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules2](#coc7actorcociditemsrules2)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules3](#coc7actorcociditemsrules3)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsSceneTokens](#coc7actorcociditemsscenetokens)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsUnlinkedToken](#coc7actorcociditemsunlinkedtoken)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsUpdate](#coc7actorcociditemsupdate)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsWarning](#coc7actorcociditemswarning)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsWhich](#coc7actorcociditemswhich)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.CastHidden](#coc7casthidden)|✅|✅|✅|❌|✅|✅|✅| -|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|❌|❌|✅|❌|❌| -|[CoC7.PauseName](#coc7pausename)|✅|❌|✅|❌|✅|✅|✅| -|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|✅|✅|✅|✅|❌|✅|✅| -|[CoC7.SANLossFail](#coc7sanlossfail)|✅|✅|✅|❌|✅|✅|✅| -|[CoC7.SANLossPass](#coc7sanlosspass)|✅|✅|✅|❌|✅|✅|✅| -|[SETTINGS.allowMythosHardenedHint](#settingsallowmythoshardenedhint)|✅|✅|✅|❌|✅|✅|✅| -|[SETTINGS.allowMythosHardenedTitle](#settingsallowmythoshardenedtitle)|✅|✅|✅|❌|✅|✅|✅| -|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|❌|❌|✅|❌|❌| +|Key|de|es|it|ja|pl|uk| +|:---|:---:|:---:|:---:|:---:|:---:|:---:| +|**Remaining**:|**5**|**17**|**22**|**1**|**5**|**5**| +|[CoC7.ActorCoCIDItemsActorDirectory](#coc7actorcociditemsactordirectory)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsActorSheets](#coc7actorcociditemsactorsheets)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsBest](#coc7actorcociditemsbest)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules1](#coc7actorcociditemsrules1)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules2](#coc7actorcociditemsrules2)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules3](#coc7actorcociditemsrules3)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsSceneTokens](#coc7actorcociditemsscenetokens)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsUnlinkedToken](#coc7actorcociditemsunlinkedtoken)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsUpdate](#coc7actorcociditemsupdate)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsWarning](#coc7actorcociditemswarning)|✅|❌|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsWhich](#coc7actorcociditemswhich)|✅|❌|❌|✅|✅|✅| +|[CoC7.CastHidden](#coc7casthidden)|✅|✅|❌|✅|✅|✅| +|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|❌|✅|❌|❌| +|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|❌|✅|❌|❌| +|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|❌|✅|❌|❌| +|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|❌|✅|❌|❌| +|[CoC7.PauseName](#coc7pausename)|✅|❌|❌|✅|✅|✅| +|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|✅|✅|✅|❌|✅|✅| +|[CoC7.SANLossFail](#coc7sanlossfail)|✅|✅|❌|✅|✅|✅| +|[CoC7.SANLossPass](#coc7sanlosspass)|✅|✅|❌|✅|✅|✅| +|[SETTINGS.allowMythosHardenedHint](#settingsallowmythoshardenedhint)|✅|✅|❌|✅|✅|✅| +|[SETTINGS.allowMythosHardenedTitle](#settingsallowmythoshardenedtitle)|✅|✅|❌|✅|✅|✅| +|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|❌|✅|❌|❌| ##### CoC7.ActorCoCIDItemsActorDirectory ``` "CoC7.ActorCoCIDItemsActorDirectory": "Update all Actors in directory",``` ##### CoC7.ActorCoCIDItemsActorSheets From 81f94634560f70b8f74f2b2cba49f553879d8f5c Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:32:03 +0000 Subject: [PATCH 07/13] Update CHANGELOG.md --- .github/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index f4a4c044..d20f207f 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -10,6 +10,8 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. - Fix CoC ID not working if using fall back translations +- Fix manually adding sanity loss / immunity reasons +- Update to French localization, thanks to @vonv #1634 ## Version 7.4 From 37420582af500695dbe4a1ccb81a47171fdda46b Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 1 Dec 2024 15:33:00 +0000 Subject: [PATCH 08/13] Remove bonus/penalty slider from ranged combat chat message --- lang/en.json | 2 ++ module/chat/rangecombat.js | 35 +++++++--------------- templates/chat/combat/range-initiator.html | 33 +++++++------------- 3 files changed, 24 insertions(+), 46 deletions(-) diff --git a/lang/en.json b/lang/en.json index cd3c4fe1..a16345ff 100644 --- a/lang/en.json +++ b/lang/en.json @@ -725,6 +725,8 @@ "CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.", "CoC7.AddBonusDie": "Add bonus die", "CoC7.RemoveBonusDie": "Remove bonus die", + "CoC7.AdditionalBonusDie": "Additional Bonus Die", + "CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.DecreaseMovementAction": "Decrease movement action", "CoC7.IncreaseMovementAction": "Increase movement action", "CoC7.CautiousApproach": "Take cautious approach", diff --git a/module/chat/rangecombat.js b/module/chat/rangecombat.js index 48a76779..9e8c91f9 100644 --- a/module/chat/rangecombat.js +++ b/module/chat/rangecombat.js @@ -13,7 +13,6 @@ export class CoC7RangeInitiator { this.cover = false this.surprised = false this.autoSuccess = false - this.diceModifier = 0 this.messageId = null this.targetCard = null this.rolled = false @@ -23,6 +22,10 @@ export class CoC7RangeInitiator { this.fullAuto = false this.tokenKey = null this.aimed = false + this.bonusDieA = false + this.bonusDieB = false + this.penaltyDieA = false + this.penaltyDieB = false this.totalBulletsFired = 0 this._targets = [] for (const t of [...game.user.targets]) { @@ -318,7 +321,7 @@ export class CoC7RangeInitiator { if (t.longRange) damage = this.weapon.system.range.long.damage if (t.extremeRange) damage = this.weapon.system.range.extreme.damage } - let modifier = parseInt(this.diceModifier, 10) + parseInt(target.modifier, 10) + let modifier = parseInt(target.modifier, 10) let difficulty this.weapon.system.properties.shotgun ? (difficulty = 1) @@ -328,6 +331,10 @@ export class CoC7RangeInitiator { if (this.reload) modifier-- if (this.multipleShots && !this.fullAuto) modifier-- if (this.fullAuto) modifier -= this.currentShotRank - 1 + if (this.bonusDieA) modifier++ + if (this.bonusDieB) modifier++ + if (this.penaltyDieA) modifier-- + if (this.penaltyDieB) modifier-- this._calculatedModifier = modifier if (modifier < -2) { const excess = Math.abs(modifier + 2) @@ -436,10 +443,6 @@ export class CoC7RangeInitiator { return 'systems/CoC7/templates/chat/combat/range-initiator.html' } - get diceModifierDisplay () { - return Math.max(-2, Math.min(2, parseInt(this.diceModifier, 10))) - } - async createChatCard () { this.calcTargetsDifficulty() const html = await renderTemplate(this.template, this) @@ -505,23 +508,7 @@ export class CoC7RangeInitiator { this.burst = !this.burst } else { this[flag] = !this[flag] - } - switch (flag) { - case 'aiming': - if (this.currentShotRank === 1) { - this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? 1 : -1) - } - break - case 'multipleShots': - if (!this.fullAuto) { - this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? -1 : 1) - } - break - case 'fullAuto': - if (!this.fullAuto) { - this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? -(this.currentShotRank - 1) : (this.currentShotRank - 1)) - } - break + console.log(flag, this[flag]) } } @@ -1073,7 +1060,7 @@ export class CoC7RangeTarget { this.big = false } else this.small = true } else this[flag] = !this[flag] - if (flag === 'fast' && this.fast && !this.isFast) { + if (this.actor && flag === 'fast' && this.fast && !this.isFast) { ui.notifications.warn( game.i18n.format('CoC7.WarnFastTargetWithWrongMOV', { mov: this.actor.mov diff --git a/templates/chat/combat/range-initiator.html b/templates/chat/combat/range-initiator.html index cee4d4c1..5452c905 100644 --- a/templates/chat/combat/range-initiator.html +++ b/templates/chat/combat/range-initiator.html @@ -1,4 +1,4 @@ -
+
{{#if displayActorOnCard}} @@ -52,27 +52,7 @@

{{localize 'CoC7.rangeCombatCard.aiming'}}

- -
-
- {{localize 'CoC7.PenaltyDice'}} -   - {{localize 'CoC7.BonusDice'}} -
-
- -2 - - -1 - - 0 - - +1 - - +2 -
- -
- {{/if}} + {{/if}}
@@ -132,6 +112,15 @@

{{localize 'CoC7.rangeCombatCard.InMelee'}} {{localize 'CoC7.rangeCombatCard.FastMovingTarget'}}

+ {{log ../this}} +
+ {{localize 'CoC7.AdditionalBonusDie'}} + {{localize 'CoC7.AdditionalBonusDie'}} +
+
+ {{localize 'CoC7.AdditionalPenaltyDie'}} + {{localize 'CoC7.AdditionalPenaltyDie'}} +
{{#if ../calculatedBonusDice}}
From 3c58aa10960fe1cb56dbf2e993de989eee8745f8 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:47:42 +0000 Subject: [PATCH 09/13] Updated translations list --- .github/TRANSLATIONS.md | 74 ++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/.github/TRANSLATIONS.md b/.github/TRANSLATIONS.md index d4f203c1..898a009c 100644 --- a/.github/TRANSLATIONS.md +++ b/.github/TRANSLATIONS.md @@ -2,52 +2,52 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry VTT better! Below is a list of translations keys on existing files that still need translated, based on `en.json`. Feel free to create a new `*.json` file for a language that is not shown here! -The **fr** translation is currently up to date - The following translations have more than 50 untranslated strings [are you able to help?](./ABANDONED.md) -[cn.json (450 untranslated strings)](./ABANDONED.md#cnjson) +[cn.json (452 untranslated strings)](./ABANDONED.md#cnjson) -[cs.json (635 untranslated strings)](./ABANDONED.md#csjson) +[cs.json (637 untranslated strings)](./ABANDONED.md#csjson) -[ko.json (232 untranslated strings)](./ABANDONED.md#kojson) +[ko.json (234 untranslated strings)](./ABANDONED.md#kojson) -[pt-BR.json (180 untranslated strings)](./ABANDONED.md#ptbrjson) +[pt-BR.json (182 untranslated strings)](./ABANDONED.md#ptbrjson) -[ru.json (102 untranslated strings)](./ABANDONED.md#rujson) +[ru.json (104 untranslated strings)](./ABANDONED.md#rujson) -[sv.json (418 untranslated strings)](./ABANDONED.md#svjson) +[sv.json (420 untranslated strings)](./ABANDONED.md#svjson) -[zh-TW.json (79 untranslated strings)](./ABANDONED.md#zhtwjson) +[zh-TW.json (81 untranslated strings)](./ABANDONED.md#zhtwjson) -|Key|de|es|it|ja|pl|uk| -|:---|:---:|:---:|:---:|:---:|:---:|:---:| -|**Remaining**:|**5**|**17**|**22**|**1**|**5**|**5**| -|[CoC7.ActorCoCIDItemsActorDirectory](#coc7actorcociditemsactordirectory)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsActorSheets](#coc7actorcociditemsactorsheets)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsBest](#coc7actorcociditemsbest)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules1](#coc7actorcociditemsrules1)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules2](#coc7actorcociditemsrules2)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsRules3](#coc7actorcociditemsrules3)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsSceneTokens](#coc7actorcociditemsscenetokens)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsUnlinkedToken](#coc7actorcociditemsunlinkedtoken)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsUpdate](#coc7actorcociditemsupdate)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsWarning](#coc7actorcociditemswarning)|✅|❌|❌|✅|✅|✅| -|[CoC7.ActorCoCIDItemsWhich](#coc7actorcociditemswhich)|✅|❌|❌|✅|✅|✅| -|[CoC7.CastHidden](#coc7casthidden)|✅|✅|❌|✅|✅|✅| -|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|❌|✅|❌|❌| -|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|❌|✅|❌|❌| -|[CoC7.PauseName](#coc7pausename)|✅|❌|❌|✅|✅|✅| -|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|✅|✅|✅|❌|✅|✅| -|[CoC7.SANLossFail](#coc7sanlossfail)|✅|✅|❌|✅|✅|✅| -|[CoC7.SANLossPass](#coc7sanlosspass)|✅|✅|❌|✅|✅|✅| -|[SETTINGS.allowMythosHardenedHint](#settingsallowmythoshardenedhint)|✅|✅|❌|✅|✅|✅| -|[SETTINGS.allowMythosHardenedTitle](#settingsallowmythoshardenedtitle)|✅|✅|❌|✅|✅|✅| -|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|❌|✅|❌|❌| +|Key|de|es|fr|it|ja|pl|uk| +|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +|**Remaining**:|**7**|**19**|**2**|**24**|**3**|**7**|**7**| +|[CoC7.ActorCoCIDItemsActorDirectory](#coc7actorcociditemsactordirectory)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsActorSheets](#coc7actorcociditemsactorsheets)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsBest](#coc7actorcociditemsbest)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules1](#coc7actorcociditemsrules1)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules2](#coc7actorcociditemsrules2)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsRules3](#coc7actorcociditemsrules3)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsSceneTokens](#coc7actorcociditemsscenetokens)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsUnlinkedToken](#coc7actorcociditemsunlinkedtoken)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsUpdate](#coc7actorcociditemsupdate)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsWarning](#coc7actorcociditemswarning)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.ActorCoCIDItemsWhich](#coc7actorcociditemswhich)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.AdditionalBonusDie](#coc7additionalbonusdie)|❌|❌|❌|❌|❌|❌|❌| +|[CoC7.AdditionalPenaltyDie](#coc7additionalpenaltydie)|❌|❌|❌|❌|❌|❌|❌| +|[CoC7.CastHidden](#coc7casthidden)|✅|✅|✅|❌|✅|✅|✅| +|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|✅|❌|✅|❌|❌| +|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|✅|❌|✅|❌|❌| +|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|✅|❌|✅|❌|❌| +|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|✅|❌|✅|❌|❌| +|[CoC7.PauseName](#coc7pausename)|✅|❌|✅|❌|✅|✅|✅| +|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|✅|✅|✅|✅|❌|✅|✅| +|[CoC7.SANLossFail](#coc7sanlossfail)|✅|✅|✅|❌|✅|✅|✅| +|[CoC7.SANLossPass](#coc7sanlosspass)|✅|✅|✅|❌|✅|✅|✅| +|[SETTINGS.allowMythosHardenedHint](#settingsallowmythoshardenedhint)|✅|✅|✅|❌|✅|✅|✅| +|[SETTINGS.allowMythosHardenedTitle](#settingsallowmythoshardenedtitle)|✅|✅|✅|❌|✅|✅|✅| +|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|✅|❌|✅|❌|❌| ##### CoC7.ActorCoCIDItemsActorDirectory ``` "CoC7.ActorCoCIDItemsActorDirectory": "Update all Actors in directory",``` ##### CoC7.ActorCoCIDItemsActorSheets @@ -70,6 +70,10 @@ The following translations have more than 50 untranslated strings [are you able ``` "CoC7.ActorCoCIDItemsWarning": "This action can not be undone, please backup your world before updating your Actors",``` ##### CoC7.ActorCoCIDItemsWhich ``` "CoC7.ActorCoCIDItemsWhich": "Check Item's CoC ID in active compendiums, world compendiums, and Items directory replacing the Actor's Items with the best choice based on these rules",``` +##### CoC7.AdditionalBonusDie +``` "CoC7.AdditionalBonusDie": "Additional Bonus Die",``` +##### CoC7.AdditionalPenaltyDie +``` "CoC7.AdditionalPenaltyDie": "Additional Penalty Die",``` ##### CoC7.CastHidden ``` "CoC7.CastHidden": "Cast Hidden",``` ##### CoC7.ClickableEvents.LeftClick.Title From 12c95f4d196b9eb3477d39eec84169262e31a50d Mon Sep 17 00:00:00 2001 From: snap01 Date: Sun, 1 Dec 2024 16:47:42 +0000 Subject: [PATCH 10/13] [create-pull-request] automated change --- .github/ABANDONED.md | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/ABANDONED.md b/.github/ABANDONED.md index 4ffe4da3..b26a432a 100644 --- a/.github/ABANDONED.md +++ b/.github/ABANDONED.md @@ -2,23 +2,23 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry VTT better! Below is a list of translations keys on existing files that still need translated, based on `en.json`. -[cn.json (450 untranslated strings)](#cnjson) +[cn.json (452 untranslated strings)](#cnjson) -[cs.json (635 untranslated strings)](#csjson) +[cs.json (637 untranslated strings)](#csjson) -[ko.json (232 untranslated strings)](#kojson) +[ko.json (234 untranslated strings)](#kojson) -[pt-BR.json (180 untranslated strings)](#ptbrjson) +[pt-BR.json (182 untranslated strings)](#ptbrjson) -[ru.json (102 untranslated strings)](#rujson) +[ru.json (104 untranslated strings)](#rujson) -[sv.json (418 untranslated strings)](#svjson) +[sv.json (420 untranslated strings)](#svjson) -[zh-TW.json (79 untranslated strings)](#zhtwjson) +[zh-TW.json (81 untranslated strings)](#zhtwjson) ## cn.json -450 untranslated strings +452 untranslated strings ``` "CoC7.ActorIsTokenHint": "Actor is a token", "CoC7.ActorDataLinked": "Actor data are linked", @@ -216,6 +216,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.", "CoC7.AddBonusDie": "Add bonus die", "CoC7.RemoveBonusDie": "Remove bonus die", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.DecreaseMovementAction": "Decrease movement action", "CoC7.IncreaseMovementAction": "Increase movement action", "CoC7.CautiousApproach": "Take cautious approach", @@ -472,7 +474,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## cs.json -635 untranslated strings +637 untranslated strings ``` "CoC7.Entities.Character": "Character", "CoC7.Entities.Container": "Container", @@ -720,6 +722,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.", "CoC7.AddBonusDie": "Add bonus die", "CoC7.RemoveBonusDie": "Remove bonus die", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.DecreaseMovementAction": "Decrease movement action", "CoC7.IncreaseMovementAction": "Increase movement action", "CoC7.CautiousApproach": "Take cautious approach", @@ -1111,7 +1115,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## ko.json -232 untranslated strings +234 untranslated strings ``` "CoC7.CustomSpecialisationLabel": "Custom label - {specialisation}", "CoC7.CastHidden": "Cast Hidden", @@ -1186,6 +1190,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.SanityLossType": "Type", "CoC7.SANLossPass": "pass", "CoC7.SANLossFail": "fail", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.ErrorTokenIncorrect": "Unable to find selected token", "CoC7.RemoveParticipant": "Remove participant", "CoC7.RemoveParticipantHint": "Participant will be completely removed from the chase", @@ -1347,7 +1353,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## pt-BR.json -180 untranslated strings +182 untranslated strings ``` "CoC7.CastHidden": "Cast Hidden", "CoC7.EraRegency": "Regency Cthulhu - Standard", @@ -1406,6 +1412,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.SanityLossType": "Type", "CoC7.SANLossPass": "pass", "CoC7.SANLossFail": "fail", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.ErrorTokenIncorrect": "Unable to find selected token", "CoC7.PersonalSpecialityPlaceholder": "other skill(s) as personal or era specialties", "CoC7.InfoSkillAddedAtBase": "This skill {name} has been added at {percent}%", @@ -1531,7 +1539,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## ru.json -102 untranslated strings +104 untranslated strings ``` "CoC7.CastHidden": "Cast Hidden", "CoC7.EraReignOfTerror": "Reign Of Terror", @@ -1568,6 +1576,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.LocationNotEmpty": "You can't remove a location with an actor", "CoC7.LocationInit": "You can't remove a starting location", "CoC7.SomethingInTheWay": "There is something in the way", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.allActors": "All Actors", "CoC7.restTargets": "Rest Targets", "CoC7.startRest": "Start Rest", @@ -1637,7 +1647,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## sv.json -418 untranslated strings +420 untranslated strings ``` "CoC7.ActorIsTokenHint": "Actor is a token", "CoC7.ActorDataLinked": "Actor data are linked", @@ -1807,6 +1817,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.", "CoC7.AddBonusDie": "Add bonus die", "CoC7.RemoveBonusDie": "Remove bonus die", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.DecreaseMovementAction": "Decrease movement action", "CoC7.IncreaseMovementAction": "Increase movement action", "CoC7.CautiousApproach": "Take cautious approach", @@ -2059,7 +2071,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events" ``` ## zh-TW.json -79 untranslated strings +81 untranslated strings ``` "CoC7.CastHidden": "Cast Hidden", "CoC7.EraRegency": "Regency Cthulhu - Standard", @@ -2089,6 +2101,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry "CoC7.SanityLossType": "Type", "CoC7.SANLossPass": "pass", "CoC7.SANLossFail": "fail", +"CoC7.AdditionalBonusDie": "Additional Bonus Die", +"CoC7.AdditionalPenaltyDie": "Additional Penalty Die", "CoC7.ErrorTokenIncorrect": "Unable to find selected token", "CoC7.PersonalSpecialityPlaceholder": "other skill(s) as personal or era specialties", "CoC7.InfoSkillAddedAtBase": "This skill {name} has been added at {percent}%", From f1b1bf607d8962a53a6f5ba7ebb793fa66fba46f Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:48:43 +0000 Subject: [PATCH 11/13] Modify Roll to indicated active dice and success level --- module/check.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/module/check.js b/module/check.js index 281903df..d860f8b5 100644 --- a/module/check.js +++ b/module/check.js @@ -819,7 +819,18 @@ export class CoC7Check { const max = this.dice.unit.total === 0 ? 100 : 90 const min = this.dice.unit.total === 0 ? 10 : 0 let selected = this.dice.total - this.dice.unit.total - + let firstValue = (selected === 0 ? 10 : Math.floor(selected / 10)) + for (const d of this.dice.roll.dice) { + if (d instanceof CONFIG.Dice.terms.t) { + if (d.results[0].result === firstValue) { + firstValue = -1 + d.results[0].active = true + } else { + d.results[0].active = false + } + } + } + this.dice.roll._total = this.dice.total for (let i = 0; i < this.dice.tens.results.length; i++) { const die = {} die.value = this.dice.tens.results[i] @@ -1090,6 +1101,11 @@ export class CoC7Check { this.canIncreaseSuccess = this.increaseSuccess.length > 0 if (this.isFumble) this.canIncreaseSuccess = false } + this.dice.roll.options.coc7Result = { + successLevel: Object.keys(CoC7Check.successLevel).find(key => CoC7Check.successLevel[key] === this.successLevel) ?? 'unknown', + difficultySet: !this.isUnknown, + passed: this.passed + } this.canAwardExperience = this.skill && !this.skill.system.properties.noxpgain From 6c29217a853ee4aacda7a6fa3ef36b5787e65105 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:09:04 +0000 Subject: [PATCH 12/13] Update CHANGELOG.md --- .github/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index d20f207f..68d1e06e 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -11,6 +11,8 @@ When not specified, all changes were made by @castanhocorreia, @HavlockV, and @s - Fix CoC ID not working if using fall back translations - Fix manually adding sanity loss / immunity reasons +- Modify Roll to indicated active dice and success level +- Remove bonus/penalty slider from ranged combat chat message replace with buttons - Update to French localization, thanks to @vonv #1634 ## Version 7.4 From ddac5fee579d0250d4f4fdf18052188fb6326d86 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:13:26 +0000 Subject: [PATCH 13/13] Prepare system for 7.5 --- .github/CHANGELOG.md | 4 ++++ system.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 68d1e06e..f88a38b2 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -9,6 +9,10 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. +## Version 7.5 + +When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. + - Fix CoC ID not working if using fall back translations - Fix manually adding sanity loss / immunity reasons - Modify Roll to indicated active dice and success level diff --git a/system.json b/system.json index 2bdb2e9e..604f02f1 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "CoC7", "title": "Call of Cthulhu 7th Edition", "description": "An implementation of the Call of Cthulhu 7th Edition game system for Foundry Virtual Tabletop.", - "version": "7.4", + "version": "7.5", "authors": [ { "name": "Miskatonic Investigative Society" @@ -207,7 +207,7 @@ "secondaryTokenAttribute": "attribs.san", "url": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT", "manifest": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/latest/download/system.json", - "download": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/download/7.4/system.zip", + "download": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/download/7.5/system.zip", "media": [ { "type": "setup",