From 64be1078e1b12ad48d18bef90b0862a93c0d8b1d Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 13:00:39 +0100 Subject: [PATCH 1/8] Fix babele-register.js for subskills when core is not first compendium checked --- modules/babele-register.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/babele-register.js b/modules/babele-register.js index 004ec3f..7779d25 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -257,8 +257,12 @@ Hooks.once('init', () => { s1 = res[1].trim() + " ( )"; translItem = game.babele.translate(compData.metadata.id, { name: s1, type: "skill" }, true) translw = translItem?.name || undefined - let res2 = re.exec(translw); - transl = res2[1] + "(" + subword + ")"; + if(translw) { + let res2 = re.exec(translw); + transl = res2[1] + "(" + subword + ")"; + } else { + transl = res[1] + " (" + subword + ")"; + } } } } From 3978fab79a33e400cda7243d5d6a21b1a1381e08 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 13:11:32 +0100 Subject: [PATCH 2/8] Add translation converters for Salzenmund items --- compendium/wfrp4e-salzenmund.items.json | 89 +++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 compendium/wfrp4e-salzenmund.items.json diff --git a/compendium/wfrp4e-salzenmund.items.json b/compendium/wfrp4e-salzenmund.items.json new file mode 100644 index 0000000..3606797 --- /dev/null +++ b/compendium/wfrp4e-salzenmund.items.json @@ -0,0 +1,89 @@ +{ + "label": "Items (Salzenmund)", + "mapping": { + "effects": { + "converter": "process_effects", + "path": "effects" + }, + "careergroup": { + "converter": "career_careergroup", + "path": "system.careergroup.value" + }, + "class": { + "converter": "generic_localization", + "path": "system.class.value" + }, + "contraction": "system.contraction.value", + "description": "system.description.value", + "durationUnit": "system.duration.unit", + "durationValue": "system.duration.value", + "flaws": { + "converter": "trapping_qualities_flaws", + "path": "system.flaws.value" + }, + "incubationUnit": "system.incubation.unit", + "incubationValue": "system.incubation.value", + "location": { + "converter": "generic_localization", + "path": "system.location.value" + }, + "modifier": { + "converter": "mutations_modifier", + "path": "system.modifier.value" + }, + "mutationType": { + "converter": "generic_localization", + "path": "system.mutationType.value" + }, + "pdamage": { + "converter": "spells_duration_range_target_damage", + "path": "system.damage.value" + }, + "pduration": { + "converter": "spells_duration_range_target_damage", + "path": "system.duration.value" + }, + "penalty": "system.penalty.value", + "permanent": "system.permanent.value", + "prange": { + "converter": "spells_duration_range_target_damage", + "path": "system.range.value" + }, + "ptarget": { + "converter": "spells_duration_range_target_damage", + "path": "system.target.value" + }, + "qualities": { + "converter": "trapping_qualities_flaws", + "path": "system.qualities.value" + }, + "sdamage": { + "converter": "spells_duration_range_target_damage", + "path": "system.damage.value" + }, + "sduration": { + "converter": "spells_duration_range_target_damage", + "path": "system.duration.value" + }, + "skills": { + "converter": "career_skills", + "path": "system.skills" + }, + "special": "system.special.value", + "srange": { + "converter": "spells_duration_range_target_damage", + "path": "system.range.value" + }, + "starget": { + "converter": "spells_duration_range_target_damage", + "path": "system.target.value" + }, + "symptoms": "system.symptoms.value", + "talents": { + "converter": "career_talents", + "path": "system.talents" + }, + "tests": "system.tests.value", + "trappings": "system.trappings" + } +} \ No newline at end of file From 682b62c2e06529b53c6f20728bf1533601fda8d2 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 13:15:12 +0100 Subject: [PATCH 3/8] Add translation converters for Lustria items --- compendium/wfrp4e-lustria.items.json | 88 ++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 compendium/wfrp4e-lustria.items.json diff --git a/compendium/wfrp4e-lustria.items.json b/compendium/wfrp4e-lustria.items.json new file mode 100644 index 0000000..4d6ca39 --- /dev/null +++ b/compendium/wfrp4e-lustria.items.json @@ -0,0 +1,88 @@ +{ + "label": "Items (Lustria)", + "folders": { + "Careers": "Carrières", + "Spells": "Sorts", + "Trappings": "Possessions", + "Weapons": "Armes" + }, + "mapping": { + "description": "system.description.value", + "trappings": "system.trappings", + "class": { + "path": "system.class.value", + "converter": "generic_localization" + }, + "skills": { + "path": "system.skills", + "converter": "career_skills" + }, + "modType": "system.modType.value", + "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" + } + } +} \ No newline at end of file From f0248692cc230f484e61314c3c7c443ed11dfce1 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 13:20:15 +0100 Subject: [PATCH 4/8] Add translation converters for Archives vol. 3 items --- compendium/wfrp4e-archives3.items.json | 91 ++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 compendium/wfrp4e-archives3.items.json diff --git a/compendium/wfrp4e-archives3.items.json b/compendium/wfrp4e-archives3.items.json new file mode 100644 index 0000000..2cb489f --- /dev/null +++ b/compendium/wfrp4e-archives3.items.json @@ -0,0 +1,91 @@ +{ + "label": "Items (Archives Vol. III)", + "folders": { + "Armour": "Armures", + "Careers": "Carrières", + "Skills": "Compétences", + "Spells": "Sorts" + }, + "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", + "maxcost": { + "path": "system.cost.max", + "converter": "spells_duration_range_target_damage" + }, + "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" + } + } +} \ No newline at end of file From e1e52ca2be61e7b824f1e2daa7d181361bb58aeb Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 13:41:04 +0100 Subject: [PATCH 5/8] Add translation converters for Old World Bundle 2 items --- compendium/wfrp4e-owb2.items.json | 97 +++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 compendium/wfrp4e-owb2.items.json diff --git a/compendium/wfrp4e-owb2.items.json b/compendium/wfrp4e-owb2.items.json new file mode 100644 index 0000000..7489ea7 --- /dev/null +++ b/compendium/wfrp4e-owb2.items.json @@ -0,0 +1,97 @@ +{ + "label": "Items (Old World Bundle II)", + "folders": { + "Lore of the Beasts": "Domaine des Bêtes", + "Lore of Death": "Domaine de la Mort", + "Lore of Fire": "Domaine du Feu", + "Lore of Heavens": "Domaine des Cieux", + "Lore of Hedgecraft": "Magie des Haies", + "Lore of Life": "Domaine de la Vie", + "Lore of Light": "Domaine de la Lumière", + "Lore of Metal": "Domaine du Métal", + "Lore of Shadows": "Domaine des Ombres", + "Lore of Witchcraft": "Sorcellerie" + }, + "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", + "maxcost": { + "path": "system.cost.max", + "converter": "spells_duration_range_target_damage" + }, + "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" + } + } +} \ No newline at end of file From 46b47a5b244d28ebd8f2c3b14f24b96a078087a0 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 14:25:36 +0100 Subject: [PATCH 6/8] Add converter for disease incubation/duration units --- modules/babele-register.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/babele-register.js b/modules/babele-register.js index 7779d25..688372b 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -662,6 +662,10 @@ Hooks.once('init', () => { // Auto-translate duration "spells_duration_range_target_damage": (value) => { return WFRP4FrTranslation.processSpellContent(value); + }, + // Auto-translate disease duration units + "disease_duration_unit": (unit) => { + return game.i18n.localize(unit).capitalize(); } }); } From 513e41b8f22a85dfb80cde005e352fa786897265 Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 14:26:37 +0100 Subject: [PATCH 7/8] Convert disease incubation/duration for Lustria and OWB2 --- compendium/wfrp4e-lustria.items.json | 10 ++++++++-- compendium/wfrp4e-owb2.items.json | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/compendium/wfrp4e-lustria.items.json b/compendium/wfrp4e-lustria.items.json index 4d6ca39..884d3a5 100644 --- a/compendium/wfrp4e-lustria.items.json +++ b/compendium/wfrp4e-lustria.items.json @@ -69,10 +69,16 @@ "converter": "generic_localization" }, "durationValue": "system.duration.value", - "durationUnit": "system.duration.unit", + "durationUnit": { + "path": "system.duration.unit", + "converter": "disease_duration_unit" + }, "contraction": "system.contraction.value", "incubationValue": "system.incubation.value", - "incubationUnit": "system.incubation.unit", + "incubationUnit": { + "path": "system.incubation.unit", + "converter": "disease_duration_unit" + }, "symptoms": "system.symptoms.value", "permanent": "system.permanent.value", "special": "system.special.value", diff --git a/compendium/wfrp4e-owb2.items.json b/compendium/wfrp4e-owb2.items.json index 7489ea7..ae44e21 100644 --- a/compendium/wfrp4e-owb2.items.json +++ b/compendium/wfrp4e-owb2.items.json @@ -78,10 +78,16 @@ "converter": "generic_localization" }, "durationValue": "system.duration.value", - "durationUnit": "system.duration.unit", + "durationUnit": { + "path": "system.duration.unit", + "converter": "disease_duration_unit" + }, "contraction": "system.contraction.value", "incubationValue": "system.incubation.value", - "incubationUnit": "system.incubation.unit", + "incubationUnit": { + "path": "system.incubation.unit", + "converter": "disease_duration_unit" + }, "symptoms": "system.symptoms.value", "permanent": "system.permanent.value", "special": "system.special.value", From e7722dd2227045ebcf9b72076ec2f8222053810c Mon Sep 17 00:00:00 2001 From: Pallando Date: Sun, 10 Nov 2024 14:32:30 +0100 Subject: [PATCH 8/8] Add translation converters for Imperial Zoo items --- compendium/wfrp4e-zoo.items.json | 95 ++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 compendium/wfrp4e-zoo.items.json diff --git a/compendium/wfrp4e-zoo.items.json b/compendium/wfrp4e-zoo.items.json new file mode 100644 index 0000000..98076c3 --- /dev/null +++ b/compendium/wfrp4e-zoo.items.json @@ -0,0 +1,95 @@ +{ + "label": "Items (Imperial Zoo)", + "folders": { + "Ammunition": "Munitions", + "Careers": "Carrières", + "Prayers": "Prières", + "Trappings": "Possessions", + "Weapons": "Armes" + }, + "mapping": { + "description": "system.description.value", + "trappings": "system.trappings", + "class": { + "path": "system.class.value", + "converter": "generic_localization" + }, + "skills": { + "path": "system.skills", + "converter": "career_skills" + }, + "modType": "system.modType.value", + "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": { + "path": "system.duration.unit", + "converter": "disease_duration_unit" + }, + "contraction": "system.contraction.value", + "incubationValue": "system.incubation.value", + "incubationUnit": { + "path": "system.incubation.unit", + "converter": "disease_duration_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" + } + } +} \ No newline at end of file