From 97c2eba568f7e2803f346011c8fe98c8f00e13d3 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Wed, 22 Dec 2021 22:08:39 +0100 Subject: [PATCH] Sync to v9/v5 --- compendium/wfrp4e-core.tables.json | 173 +++++++++++++++++++++++++---- module.json | 2 +- tools/foundry_convert_tables.lua | 17 +-- 3 files changed, 164 insertions(+), 28 deletions(-) diff --git a/compendium/wfrp4e-core.tables.json b/compendium/wfrp4e-core.tables.json index 63c8b64..ec85988 100644 --- a/compendium/wfrp4e-core.tables.json +++ b/compendium/wfrp4e-core.tables.json @@ -44,27 +44,40 @@ { "id": "Dissolution of Body and Mind - Dwarf", "name": "Dissolution du Corps et de l'Esprit - Nain", - "results": { "1-5": "Physique : @Table[mutatephys]", "6-100": "Mentale : @Table[mutatemental]" } + "results": { + "1-5": "Physique : @Table[mutatephys]", + "6-100": "Mentale : @Table[mutatemental]" + } }, { "id": "Dissolution of Body and Mind - Halfling", "name": "Dissolution du Corps et de l'Esprit - Halfling", - "results": { "1-10": "Physique : @Table[mutatephys]", "11-100": "Mentale : @Table[mutatemental]" } + "results": { + "1-10": "Physique : @Table[mutatephys]", + "11-100": "Mentale : @Table[mutatemental]" + } }, { "id": "Dissolution of Body and Mind - High Elf", "name": "Dissolution du Corps et de l'Esprit - Haut Elfe", - "results": { "1-100": "Mentale : @Table[mutatemental]" } + "results": { + "1-100": "Mentale : @Table[mutatemental]" + } }, { "id": "Dissolution of Body and Mind - Human", "name": "Dissolution du Corps et de l'Esprit - Humain", - "results": { "1-50": "Physique : @Table[mutatephys]", "51-100": "Mentale : @Table[mutatemental]" } + "results": { + "1-50": "Physique : @Table[mutatephys]", + "51-100": "Mentale : @Table[mutatemental]" + } }, { "id": "Dissolution of Body and Mind - Wood Elf", "name": "Dissolution du Corps et de l'Esprit - Elfe des Bois", - "results": { "1-100": "Mentale : @Table[mutatemental]" } + "results": { + "1-100": "Mentale : @Table[mutatemental]" + } }, { "id": "Dooming", @@ -212,27 +225,77 @@ { "id": "Eye Colour - Dwarf", "name": "Couleur des Yeux - Nains", - "results": {"2-7":"Bleu","2-2":"Charbon","2-19":"Cuivre","2-14":"Marron foncé","2-11":"Marron terre","2-20":"Doré","2-18":"Vert","2-17":"Noisette","2-3":"Plomb","2-4":"Acier"} + "results": { + "5-7": "Bleu", + "2-2": "Charbon", + "19-19": "Cuivre", + "12-14": "Marron foncé", + "8-11": "Marron terre", + "20-20": "Doré", + "18-18": "Vert", + "15-17": "Noisette", + "3-3": "Plomb", + "4-4": "Acier" + } }, { "id": "Eye Colour - Halfling", "name": "Couleur des Yeux - Halfling", - "results":{"2-4":"Bleu pale","2-3":"Gris","2-7":"Bleu","2-17":"Brun","2-18":"Cuivre","2-20":"Marron foncé","2-11":"Vert","2-14":"Noisette","2-2":"Gris clair"} + "results": { + "4-4": "Bleu pale", + "3-3": "Gris", + "5-7": "Bleu", + "15-17": "Brun", + "18-18": "Cuivre", + "19-20": "Marron foncé", + "8-11": "Vert", + "12-14": "Noisette", + "2-2": "Gris clair" + } }, { "id": "Eye Colour - High Elf", "name": "Couleur des Yeux - Haut Elfe", - "results":{"19-19":"Cuivre","12-14":"Emeraude","20-20":"Doré","2-2":"Jais","8-11":"Turquoise","15-17":"Ambre","4-4":"Aigue-marine","5-7":"Saphir"} + "results": { + "19-19": "Cuivre", + "12-14": "Emeraude", + "20-20": "Doré", + "2-2": "Jais", + "8-11": "Turquoise", + "15-17": "Ambre", + "4-4": "Aigue-marine", + "5-7": "Saphir" + } }, { "id": "Eye Colour - Human", "name": "Couleur des Yeux - Humain", - "results": {"2-20":"Noir","2-7":"Bleu","2-17":"Brun","2-19":"Marron foncé","2-2":"Choix libre","2-3":"Vert","2-14":"Gris","2-18":"Noisette","2-4":"Bleu pale","2-11":"Gris clair"} + "results": { + "10-20": "Noir", + "5-7": "Bleu", + "15-17": "Brun", + "19-19": "Marron foncé", + "2-2": "Choix libre", + "3-3": "Vert", + "12-14": "Gris", + "18-18": "Noisette", + "4-4": "Bleu pale", + "8-11": "Gris clair" + } }, { "id": "Eye Colour - Wood Elf", "name": "Couleur des Yeux - Elfes des Bois", - "results": {"2-2":"Ivoire","2-4":"Vert lierre","2-7":"Vert mousse","2-19":"Chatain clair","2-18":"Ocre","2-20":"Violet","2-14":"Chataîgne","2-17":"Marron foncé"} + "results": { + "2-2": "Ivoire", + "4-4": "Vert lierre", + "5-7": "Vert mousse", + "19-19": "Chatain clair", + "18-18": "Ocre", + "20-20": "Violet", + "8-14": "Chataîgne", + "15-17": "Marron foncé" + } }, { "id": "Gunpowder Fumble Table (Moo)", @@ -240,45 +303,117 @@ }, { "id": "Hair Colour - Dwarf", - "name": "Couleur des Cheveux - Nain", - "results": {"2-20":"Noir","2-14":"Bronze","2-17":"Brun","2-11":"Cuivre","2-18":"Marron foncé","2-7":"Doré","2-3":"Gris","2-4":"Blond pâle","2-19":"Brun roux","2-2":"Blanc"} + "name": "Couleur des Cheveux - Nain", + "results": { + "15-17": "Brun", + "8-11": "Cuivre", + "18-18": "Marron foncé", + "5-7": "Doré", + "3-3": "Gris", + "4-4": "Blond pâle", + "19-19": "Brun roux", + "2-2": "Blanc", + "nil-nil": "Blond intense", + "20-20": "Noir", + "12-14": "Bronze" + } }, { "id": "Hair Colour - Halfling", "name": "Couleur des Cheveux - Halfling", - "results": {"2-18":"Amande","2-11":"Chataîgne","2-19":"Chocolat","2-3":"Paille","2-14":"Gingembre","2-2":"Gris","2-7":"Miel","2-20":"Réglisse","2-17":"Moutarde","2-4":"Roussâtre"} + "results": { + "8-11": "Chataîgne", + "19-19": "Chocolat", + "3-3": "Paille", + "12-14": "Gingembre", + "2-2": "Gris", + "5-7": "Miel", + "20-20": "Réglisse", + "15-17": "Moutarde", + "4-4": "Roussâtre", + "18-18": "Amande", + "nil-nil": "Blond intense" + } }, { "id": "Hair Colour - High Elf", "name": "Couleur des Cheveux - Haut Elfe", - "results": {"2-2":"Argent","2-3":"Blanc","2-11":"Blond intense","2-18":"Auburn","2-20":"Noir","2-7":"Blond","2-14":"Blond cuivré","2-4":"Blond pâle","2-19":"Rouge","2-17":"Blond ambré"} + "results": { + "2-2": "Argent", + "3-3": "Blanc", + "8-11": "Blond intense", + "1-1": "Blond blanc", + "18-18": "Auburn", + "20-20": "Noir", + "5-7": "Blond", + "12-14": "Blond cuivré", + "4-4": "Blond pâle", + "19-19": "Rouge", + "15-17": "Blond ambré" + } }, { "id": "Hair Colour - Human", "name": "Couleur des Cheveux - Humain", - "results":{"2-18":"Auburn","2-17":"Noir","2-14":"Marron foncé","2-7":"Blond doré","2-20":"Gris","2-11":"Brun clair","2-19":"Rouge","2-3":"Blond ambré","2-2":"Blond blanc"} + "results": { + "8-11": "Brun clair", + "19-19": "Rouge", + "3-3": "Blond ambré", + "2-2": "Blond blanc", + "nil-nil": "Blond intense", + "18-18": "Auburn", + "15-17": "Noir", + "12-14": "Marron foncé", + "4-7": "Blond doré", + "20-20": "Gris" + } }, { "id": "Hair Colour - Wood Elf", "name": "Couleur des Cheveux - Elfes des Bois", - "results": {"2-18":"Sienne","2-3":"Blond cendré","2-2":"Bouleau argenté","2-20":"Noir bleuté","2-11":"Brun","2-17":"Marron foncé","2-19":"Ebène","2-7":"Blond miel","2-14":"Brun acajou","2-4":"Or rose"} + "results": { + "1-1": "Blond intense", + "3-3": "Blond cendré", + "2-2": "Bouleau argenté", + "20-20": "Noir bleuté", + "8-11": "Brun", + "15-17": "Marron foncé", + "19-19": "Ebène", + "5-7": "Blond miel", + "12-14": "Brun acajou", + "4-4": "Or rose", + "18-18": "Sienne" + } }, { "id": "Hit Location", "name": "Localisation", "results": { - "1-9": "Tête" + "1-9": "Tête", + "10-24": "Bras Gauche", + "25-44": "Bras Droit", + "45-79": "Corps", + "80-89": "Jambe Gauche", + "90-100": "Jambe Droite" } }, { "id": "Hit Location - Snake", "name": "Localisation - Serpent", - "results": {"2-19":"Tête","2-100":"Corps"} + "results": { + "2-19": "Tête", + "20-100": "Corps" + } }, { "id": "Hit Location - Spider", "name": "Localisation - Araignée", - "results": {"2-44":"Jambes droites","2-79":"Jambes gauches","2-100":"Corps","2-9":"Tête"} + "results": { + "10-44": "Jambes droites", + "45-79": "Jambes gauches", + "80-100": "Corps", + "2-9": "Tête" + } }, { "id": "How Do I Know You Again?", diff --git a/module.json b/module.json index e4a6393..25ef6a3 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "WH4-fr-translation", "title": "WFRP4e - Core Module en français.", "description": "Traduction Française pour Warhammer v4.", - "version": "5.0.0", + "version": "5.0.1", "minimumCoreVersion" : "0.8.0", "compatibleCoreVersion": "9", "author": "LeRatierBretonnien", diff --git a/tools/foundry_convert_tables.lua b/tools/foundry_convert_tables.lua index 83294c1..a7b0464 100644 --- a/tools/foundry_convert_tables.lua +++ b/tools/foundry_convert_tables.lua @@ -2,7 +2,7 @@ package.path = package.path .. ";luajson/?.lua" local JSON = require"json" -local path_in = "../tables/whathappensnext.json" +local path_in = "../tables/hitloc.json" local f1 = io.open(path_in, "r") local strjson = f1:read("*a") f1:close() @@ -10,14 +10,15 @@ local tabData = JSON.decode(strjson) local results = {} for idx, row in pairs(tabData.rows) do - local min = row.range[1] - local max = row.range[2] - local field = tostring(2).."-"..tostring(max) - --results[field] = ""..row.name..":"..row.description - results[field] = row.description - print(field, row.name) + --if row.range.dwarf[1] then + local min = row.range[1] + local max = row.range[2] + local field = tostring(min).."-"..tostring(max) + --results[field] = ""..row.name..":"..row.description + results[field] = row.description + print(field, row.name) + --end end - local entries = JSON.encode(results) print() print()