Traduction des effets
This commit is contained in:
parent
533ecafdc8
commit
b03b357c23
@ -1,6 +1,6 @@
|
||||
/************************************************************************************/
|
||||
//import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
|
||||
//import WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js";
|
||||
import { WH4FRPatchConfig } from "./modules/config-patch.js";
|
||||
|
||||
/************************************************************************************/
|
||||
const _patch_eis = () => {
|
||||
@ -30,198 +30,6 @@ const _patch_eis = () => {
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
const _fix_post_module_loading = () => {
|
||||
|
||||
// Detect and patch as necessary
|
||||
if (game.wfrp4e.config && game.wfrp4e.config.talentBonuses && game.wfrp4e.config.talentBonuses["vivacité"] == undefined) {
|
||||
console.log("Patching WFRP4E now ....");
|
||||
game.wfrp4e.config.qualityDescriptions ["distract"] = game.i18n.localize("WFRP4E.Properties.Distract"); // Patch missing quality
|
||||
|
||||
game.wfrp4e.config.talentBonuses = {
|
||||
"perspicace": "int",
|
||||
"affable": "fel",
|
||||
"tireur de précision": "bs",
|
||||
"très fort": "s",
|
||||
"vivacité": "i",
|
||||
"reflexes foudroyants": "ag",
|
||||
"imperturbable": "wp",
|
||||
"très résistant": "t",
|
||||
"doigts de fée": "dex",
|
||||
"guerrier né": "ws"
|
||||
}
|
||||
game.wfrp4e.config.speciesSkills = {
|
||||
"human": [
|
||||
"Soins aux animaux",
|
||||
"Charme",
|
||||
"Calme",
|
||||
"Evaluation",
|
||||
"Ragot",
|
||||
"Marchandage",
|
||||
"Langue (Bretonnien)",
|
||||
"Langue (Wastelander)",
|
||||
"Commandement",
|
||||
"Savoir (Reikland)",
|
||||
"Corps à corps (Base)",
|
||||
"Projectiles (Arc)"
|
||||
],
|
||||
"dwarf": [
|
||||
"Résistance à l'alcool",
|
||||
"Calme",
|
||||
"Résistance",
|
||||
"Divertissement (Raconter)",
|
||||
"Evaluation",
|
||||
"Intimidation",
|
||||
"Langue (Khazalid)",
|
||||
"Savoir (Nains)",
|
||||
"Savoir (Geologie)",
|
||||
"Savoir (Metallurgie)",
|
||||
"Corps à corps (Base)",
|
||||
"Métier (Au choix)"
|
||||
],
|
||||
"halfling": [
|
||||
"Charme",
|
||||
"Résistance à l'alcool",
|
||||
"Esquive",
|
||||
"Pari",
|
||||
"Marchandage",
|
||||
"Intuition",
|
||||
"Langue (Mootland)",
|
||||
"Savoir (Reikland)",
|
||||
"Perception",
|
||||
"Escamotage",
|
||||
"Discrétion (Au choix)",
|
||||
"Métier (Cuisinier)"
|
||||
],
|
||||
"helf": [
|
||||
"Calme",
|
||||
"Divertissement (Chant)",
|
||||
"Evaluation",
|
||||
"Langue (Eltharin)",
|
||||
"Commandement",
|
||||
"Corps à corps (Base)",
|
||||
"Navigation",
|
||||
"Perception",
|
||||
"Musicien (Au choix)",
|
||||
"Projectiles (Arc)",
|
||||
"Voile",
|
||||
"Natation"
|
||||
],
|
||||
"welf": [
|
||||
"Athlétisme",
|
||||
"Escalade",
|
||||
"Résistance",
|
||||
"Divertissement (Chant)",
|
||||
"Intimidation",
|
||||
"Langue (Eltharin)",
|
||||
"Corps à corps (Base)",
|
||||
"Survie en extérieur",
|
||||
"Perception",
|
||||
"Projectiles (Arc)",
|
||||
"Discrétion (Rural)",
|
||||
"Pistage"
|
||||
],
|
||||
}
|
||||
game.wfrp4e.config.speciesTalents = {
|
||||
"human": [
|
||||
"Destinée",
|
||||
"Affable, Perspicace",
|
||||
3
|
||||
],
|
||||
"dwarf": [
|
||||
"Résistance à la Magie",
|
||||
"Vision Nocturne",
|
||||
"Lire/Ecrire, Impitoyable",
|
||||
"Déterminé, Obstiné",
|
||||
"Costaud",
|
||||
0
|
||||
],
|
||||
"halfling": [
|
||||
"Sens Aiguisé (Gout)",
|
||||
"Vision Nocturne",
|
||||
"Resistant (Chaos)",
|
||||
"Petit",
|
||||
2
|
||||
],
|
||||
"helf": [
|
||||
"Sens Aiguisé (Vue)",
|
||||
"Imperturbable, Perspicace",
|
||||
"Vision Nocturne",
|
||||
"Seconde Vue, Sixième Sens",
|
||||
"Lire/Ecrire",
|
||||
0
|
||||
],
|
||||
"welf": [
|
||||
"Sens Aiguisé (Sight)",
|
||||
"Dur à cuire, Seconde Vue",
|
||||
"Vision Nocturne",
|
||||
"Seconde Vue, Sixth Sense",
|
||||
"Lire/Ecrire",
|
||||
0
|
||||
],
|
||||
}
|
||||
game.wfrp4e.config.species = {
|
||||
"human": "Humain",
|
||||
"dwarf": "Nain",
|
||||
"halfling": "Halfling",
|
||||
"helf": "Haut Elfe",
|
||||
"welf": "Elfe Sylvain"
|
||||
}
|
||||
game.wfrp4e.config.effectApplication = {
|
||||
"actor" : "Acteur",
|
||||
"equipped" : "Lorsque l'objet est équipé",
|
||||
"apply" : "Appliquer avec le ciblage",
|
||||
"damage" : "Appliquer quand l'objet applique des Dégâts",
|
||||
}
|
||||
game.wfrp4e.config.applyScope = {
|
||||
"actor" : "Acteur",
|
||||
"item" : "Item"
|
||||
}
|
||||
game.wfrp4e.config.effectTriggers = {
|
||||
"invoke" : "Appliqué manuellement",
|
||||
"oneTime" : "Immediat",
|
||||
"dialogChoice" : "Choix par un Dialogue",
|
||||
"prefillDialog" : "Dialogue pré-remplie",
|
||||
"prePrepareData" : "Pré-Préparation des données",
|
||||
"prePrepareItems" : "Pré-préparation des Items d'Acteurs",
|
||||
"prepareData" : "Préparation des données",
|
||||
"preWoundCalc" : "Avant le calcul des Blessures",
|
||||
"woundCalc" : "Calcul des Blessures",
|
||||
"preApplyDamage" : "Avant l'application des Dégâts",
|
||||
"applyDamage" : "Application des Dégâts",
|
||||
"preTakeDamage" : "Avant de prendre les Dégâts",
|
||||
"takeDamage" : "Prise des Dégâts",
|
||||
"preApplyCondition" : "Avant l'application d'un Etat",
|
||||
"applyCondition" : "Application d'Etat",
|
||||
"prePrepareItem" : "Avant la préparation d'un Item",
|
||||
"prepareItem" : "Préparation d'Item",
|
||||
"preRollTest" : "Avant le lancement du Test",
|
||||
"preRollWeaponTest" : "Avant le lancement d'un Test d'Arme",
|
||||
"preRollCastTest" : "Avant le lancement d'un Test d'Incantation",
|
||||
"preChannellingTest" : "Avant le lancement d'un Test de Focalisation",
|
||||
"preRollPrayerTest" : "Avant le lancement d'un Test de Prière",
|
||||
"preRollTraitTest" : "Avant le lancement d'un Test de Trait",
|
||||
"rollTest" : "Lancement du Test",
|
||||
"rollIncomeTest" : "Lancement d'un Test de Revenu",
|
||||
"rollWeaponTest" : "Lancement d'un Test d'Arme",
|
||||
"rollCastTest" : "Lancement d'un Test d'Incantation",
|
||||
"rollChannellingTest" : "Lancement d'un Test de Focalisation",
|
||||
"rollPrayerTest" : "Lancement d'un Test de Prière",
|
||||
"rollTraitTest" : "Lancement d'un Test de Trait",
|
||||
"preOpposedAttacker" : "Avant l'opposition de l'Attaquant",
|
||||
"preOpposedDefender" : "Avant l'opposition du Défenseur",
|
||||
"opposedAttacker" : "Opposition de l'Attaquant",
|
||||
"opposedDefender" : "Opposition du Défenseur",
|
||||
"calculateOpposedDamage" : "Calcul des Dếgats suite au Test Opposé",
|
||||
"targetPrefillDialog" : "Pré-remplir le dialogue de la cible",
|
||||
"getInitiativeFormula" : "Initiative",
|
||||
"endTurn" : "Fin du Tour",
|
||||
"endRound" : "Fin du Round",
|
||||
"endCombat" : "Fin du Combat"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
/* Manages /auberge command */
|
||||
const _manage_inn_roll = async (content, msg) => {
|
||||
@ -313,9 +121,9 @@ const __auto_patch_translation_journal_compendium = async (compmod) => {
|
||||
|
||||
/************************************************************************************/
|
||||
const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
|
||||
|
||||
_fix_post_module_loading();
|
||||
|
||||
|
||||
WH4FRPatchConfig.perform_patch();
|
||||
|
||||
game.modules.forEach((module, name) => {
|
||||
if ( name == "wfrp4e-core" && module.active) {
|
||||
FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => {
|
||||
@ -347,29 +155,8 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
game.wfrp4e.config.speciesSkills["gnome"] = [
|
||||
"Focalisation (Ulgu)",
|
||||
"Charme",
|
||||
"Résistance à l'alcool",
|
||||
"Esquive",
|
||||
"Divertissement (Au choix)",
|
||||
"Ragots",
|
||||
"Marchandage",
|
||||
"Langue (Ghassally)",
|
||||
"Langue (Magick)",
|
||||
"Langue (Wastelander)",
|
||||
"Survie en extérieur",
|
||||
"Discrétion (Au choix)"
|
||||
];
|
||||
game.wfrp4e.config.speciesTalents["gnome"] = [
|
||||
"Insignifiant, Imprégné avec Uglu",
|
||||
"Chance, Imitation",
|
||||
"Vision Nocturne",
|
||||
"Pêcheur, Lire/Ecrire",
|
||||
"Seconde Vue, Sixième Sens",
|
||||
"Petit",
|
||||
0
|
||||
];
|
||||
WH4FRPatchConfig.perform_rnhd_patch();
|
||||
|
||||
if (game.user.isGM && chatFlag)
|
||||
ChatMessage.create( { title: "Module RNHD patché", content: "<strong>Le module RHND a été detecté et automatiquement patché.</strong>", whisper: ChatMessage.getWhisperRecipients("GM") } );
|
||||
}
|
||||
|
@ -487,6 +487,7 @@ Hooks.once('init', () => {
|
||||
if ( !effects) return;
|
||||
for (let i=0; i<effects.length; i++) {
|
||||
let effect = effects[i];
|
||||
console.log("EFFECT LABEL1:", effect );
|
||||
effect.label = translations['label'+i];
|
||||
}
|
||||
return effects
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"name": "WH4-fr-translation",
|
||||
"title": "Traduction du module WH4 en Français.",
|
||||
"description": "La traduction du module WH4.",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"minimumCoreVersion" : "0.7.1",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"author": "LeRatierBretonnien",
|
||||
|
1086
modules/config-patch.js
Normal file
1086
modules/config-patch.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
24175
tools/beasts2.jsonn
24175
tools/beasts2.jsonn
File diff suppressed because one or more lines are too long
44
tools/foundry_wh4_patch_effects.lua
Normal file
44
tools/foundry_wh4_patch_effects.lua
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
package.path = package.path .. ";luajson/?.lua"
|
||||
local JSON = require"json"
|
||||
|
||||
--local talent_db = "../../WFRP4e-FoundryVTT/packs/talents.db"
|
||||
local dbfile ='/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-core/packs/spells.db'
|
||||
local jsonfile = "../compendium/wfrp4e-core.spells.json"
|
||||
|
||||
local dbf = io.open(dbfile)
|
||||
|
||||
local jsonf = io.open(jsonfile)
|
||||
local strjson = jsonf:read("*a")
|
||||
jsonf:close()
|
||||
local datajson = JSON.decode(strjson)
|
||||
|
||||
local function trim1(s)
|
||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
local line = dbf:read()
|
||||
while line do
|
||||
--print(line)
|
||||
local itemdb = JSON.decode( line )
|
||||
--print("Testing : ", db_talent.name )
|
||||
for _, data in pairs(datajson.entries) do
|
||||
if data.id == itemdb.name then
|
||||
data.effects = itemdb.effects
|
||||
for _, effect in pairs(data.effects) do
|
||||
if effect.label == itemdb.name then
|
||||
effect.label = data.name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
line = dbf:read()
|
||||
end
|
||||
dbf:close()
|
||||
|
||||
|
||||
local jsonout = JSON.encode( datajson )
|
||||
local fout = io.open("witheffects.json", "w+")
|
||||
fout:write( jsonout )
|
||||
fout:close()
|
Loading…
Reference in New Issue
Block a user