From 3f0dcc1ea21ebb9bd0196e73e003df24c278b0ce Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 6 Oct 2024 17:23:16 +0200 Subject: [PATCH 1/6] Add converter for crew roles --- modules/babele-register.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/babele-register.js b/modules/babele-register.js index 75ace65..711a1b1 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -270,6 +270,11 @@ Hooks.once('init', () => { } return skills_list }, + "role_skills": (skills) => { + let skills_list = skills.split(','); + let skillsFR = game.babele.converters.career_skills(skills_list); + return skillsFR.join(', ') + }, "process_effects": (effectsData, translations, data, tc, tc_translations) => { //console.log("Effects :", effectsData, translations, data, tc, tc_translations) for (let e of effectsData) { From d61e2d56668a0d0e16da246eb3984cf5ead965dc Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 6 Oct 2024 17:23:42 +0200 Subject: [PATCH 2/6] Convert Sea of Claws items --- compendium/wfrp4e-soc.items.json | 81 ++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 compendium/wfrp4e-soc.items.json diff --git a/compendium/wfrp4e-soc.items.json b/compendium/wfrp4e-soc.items.json new file mode 100644 index 0000000..2d1479c --- /dev/null +++ b/compendium/wfrp4e-soc.items.json @@ -0,0 +1,81 @@ +{ + "label": "Items (Sea of Claws)", + "mapping": { + "description": "system.description.value", + "trappings": "system.trappings", + "class": { + "path": "system.class.value", + "converter": "generic_localization" + }, + "skills": { + "path": "system.skills", + "converter": "career_skills" + }, + "careergroup": { + "path": "system.careergroup.value", + "converter": "career_careergroup" + }, + "talents": { + "path": "system.talents", + "converter": "career_talents" + }, + "pduration": { + "path": "system.duration.value", + "converter": "spells_duration_range_target_damage" + }, + "prange": { + "path": "system.range.value", + "converter": "spells_duration_range_target_damage" + }, + "ptarget": { + "path": "system.target.value", + "converter": "spells_duration_range_target_damage" + }, + "pdamage": { + "path": "system.damage.value", + "converter": "spells_duration_range_target_damage" + }, + "test": { + "path": "system.test", + "converter": "role_skills" + }, + "tests": "system.tests.value", + "sduration": { + "path": "system.duration.value", + "converter": "spells_duration_range_target_damage" + }, + "srange": { + "path": "system.range.value", + "converter": "spells_duration_range_target_damage" + }, + "starget": { + "path": "system.target.value", + "converter": "spells_duration_range_target_damage" + }, + "sdamage": { + "path": "system.damage.value", + "converter": "spells_duration_range_target_damage" + }, + "penalty": "system.penalty.value", + "location": { + "path": "system.location.value", + "converter": "generic_localization" + }, + "durationValue": "system.duration.value", + "durationUnit": "system.duration.unit", + "contraction": "system.contraction.value", + "incubationValue": "system.incubation.value", + "incubationUnit": "system.incubation.unit", + "symptoms": "system.symptoms.value", + "permanent": "system.permanent.value", + "special": "system.special.value", + "qualities": { + "path": "system.qualities.value", + "converter": "trapping_qualities_flaws" + }, + "flaws": { + "path": "system.flaws.value", + "converter": "trapping_qualities_flaws" + } + } +} From 1d0f390a18637da45ce579858495ed437991ff9c Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 6 Oct 2024 18:27:31 +0200 Subject: [PATCH 3/6] Add Sea of Claws tables to options --- fr.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fr.json b/fr.json index c2905aa..3103344 100644 --- a/fr.json +++ b/fr.json @@ -193,6 +193,8 @@ "SETTINGS.TABLE_oops":"Maladresse!", "SETTINGS.TABLE_species":"Espèces", "SETTINGS.TABLE_wrath":"Colère des Dieux", + "SETTINGS.TABLE_port-stay-events":"Port Stay Events", + "SETTINGS.TABLE_shipboard-events":"Shipboard Events", "SETTINGS.useWoMOvercast":"Utiliser les règles de sur-incantation de Winods of Magic", "SETTINGS.useWoMOvercastHint":"Utiliser les règles de sur-incantation proposées par le supplément Winds of Magic, cf page 23.", "SETTINGS.ChannellingIngredients":"Ingedients de Focalisation", From 3c7366ce04a313622f4cfcf6a40c65fbf33f3b9f Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 6 Oct 2024 18:28:09 +0200 Subject: [PATCH 4/6] Fix typo --- modules/addon-register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/addon-register.js b/modules/addon-register.js index d4e7638..e8f61df 100644 --- a/modules/addon-register.js +++ b/modules/addon-register.js @@ -400,7 +400,7 @@ Hooks.on('ready', () => { } game.wfrp4e.config.difficultyLabels = { - "veasy": "Trés Facile (+60)", + "veasy": "Très Facile (+60)", "easy": "Facile (+40)", "banal": "Banal (+30)", "average": "Accessible (+20)", From 37f3eb399771ee89f26e702ba8c09796c7cd7ac7 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 6 Oct 2024 18:30:10 +0200 Subject: [PATCH 5/6] Translate actor vehicle roles --- modules/babele-register.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/babele-register.js b/modules/babele-register.js index 711a1b1..d1de766 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -515,6 +515,17 @@ Hooks.once('init', () => { break; } } + } else if (trait_en.type == "vehicleRole") { + let validCompendiums = game.wfrp4e.tags.getPacksWithTag("vehicleRole") + for (let compData of validCompendiums) { + let role_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true); + if (role_fr?.system) { + trait_en.name = role_fr.name || trait_en.name + // DEBG: console.log(">>>>> Role ?", role_fr.name ); + trait_en.system = foundry.utils.duplicate(role_fr.system); + break; + } + } } else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") { let validCompendiums = game.wfrp4e.tags.getPacksWithTag(["trapping"], ["weapon", "armour", "container", "money"]) for (let compData of validCompendiums) { From 1bb7d0b2481a77c5554ee9c1f282380cd9483139 Mon Sep 17 00:00:00 2001 From: pallando Date: Thu, 10 Oct 2024 10:41:09 +0200 Subject: [PATCH 6/6] Translate vehicle roles in actors compendium --- modules/babele-register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/babele-register.js b/modules/babele-register.js index d1de766..c87d325 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -518,7 +518,7 @@ Hooks.once('init', () => { } else if (trait_en.type == "vehicleRole") { let validCompendiums = game.wfrp4e.tags.getPacksWithTag("vehicleRole") for (let compData of validCompendiums) { - let role_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true); + let role_fr = game.babele.translate(compData.metadata.id, trait_en, true); if (role_fr?.system) { trait_en.name = role_fr.name || trait_en.name // DEBG: console.log(">>>>> Role ?", role_fr.name );