Compare commits

..

8 Commits

Author SHA1 Message Date
a64ff7dd55 Fix v10 datapath 2022-10-02 08:58:44 +02:00
f916c14848 Fix Traits translation 2022-09-30 20:56:12 +02:00
be09aec8cd Clés de traduction manquantes 2022-09-22 11:42:48 +02:00
1662ea9804 v10 support - minor fixes 2022-09-16 09:55:58 +02:00
d725b84011 Move deprecated tables 2022-09-12 21:20:03 +02:00
bd74d179f0 v10 release 2022-09-12 21:12:25 +02:00
f175bd9f78 v10 release 2022-09-12 21:10:44 +02:00
96b49682c9 v10 release 2022-09-12 21:05:44 +02:00
86 changed files with 168 additions and 133 deletions

View File

@ -29,13 +29,13 @@ const _patch_eis = () => {
args.actor.setupSkill("Résistance", {context : {failure: "1 Point de Corruption reçu", success : "1 Point de Chance gagné"}}).then(setupData => {
args.actor.basicTest(setupData).then(test =>
{
if (test.result.result == "success" && args.actor.data.type == "character")
if (test.result.result == "success" && args.actor.type == "character")
{
args.actor.update({"data.status.fortune.value" : args.actor.data.data.status.fortune.value + 1})
args.actor.update({"system.status.fortune.value" : args.actor.system.status.fortune.value + 1})
}
else if (test.result.result == "failure" && args.actor.data.type == "character")
else if (test.result.result == "failure" && args.actor.type == "character")
{
args.actor.update({"data.status.corruption.value" : args.actor.data.data.status.corruption.value + 1})
args.actor.update({"system.status.corruption.value" : args.actor.system.status.corruption.value + 1})
}
})
})`
@ -272,24 +272,24 @@ const __add_actors_translation = () => {
const lang = game.settings.get('core', 'language');
if (lang == "fr") {
let pack_array = [];
for (let metadata of game.data.packs) {
for (let metadata of game.packs) {
if (!game.babele.isTranslated(metadata) && metadata.documentName === 'Actor') {
//console.log("PACK : ", metadata);
let translations = {
"label": metadata.name,
"mapping": {
"name": "name",
"description": "details.biography.value",
"description": "system.biography.value",
"items": {
"path": "items",
"converter": "bestiary_traits"
},
"characteristics": {
"path": "data.characteristics",
"path": "system.characteristics",
"converter": "npc_characteristics"
},
"details": {
"path": "data.details",
"path": "system.details",
"converter": "npc_details"
}
},

View File

@ -25,8 +25,8 @@ const vo_conditions = {
Hooks.once('init', () => {
// Check various settings in the installation
game.modules.forEach((module, name) => {
if ( name == "wfrp4e-core" && module.active) {
game.modules.forEach((module, id) => {
if ( id == "wfrp4e-core" && module.active) {
compmod = "wfrp4e-core";
}
} );
@ -250,6 +250,7 @@ Hooks.once('init', () => {
var name_en = trait_en.name.trim(); // strip \r in some traits name
if ( trait_en.type == "trait") {
console.log("Trait translation", compmod, trait_en)
if ( name_en.includes("Tentacles") ) { // Process specific Tentacles case
var re = /(.d*)x Tentacles/i;
var res = re.exec( name_en );
@ -263,19 +264,19 @@ Hooks.once('init', () => {
special = " (" + game.i18n.localize( res[2].trim() ) + ")"; // And the special keyword
}
var trait_fr = game.babele.translate( compmod+'.traits', { name: name_en }, true );
//console.log(">>>>> Trait ?", name_en, nbt, trait_fr, trait_fr.name, special);
console.log(">>>>> Trait ?", name_en, nbt, trait_fr, trait_fr.name, special);
trait_en.name = nbt + trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value ) {
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value ) {
trait_en.system.description.value = trait_fr.system.description.value;
} else if ( game.modules.get( 'wfrp4e-eis') ) { // No description in the FR compendium -> test other compendium if presenr
trait_fr = game.babele.translate( 'wfrp4e-eis.eisitems', { name: name_en }, true);
trait_en.name = nbt + trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value )
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value )
trait_en.system.description.value = trait_fr.system.description.value;
}
if ( trait_en.data && trait_en.data.specification && isNaN(trait_en.data.specification.value) ) { // This is a string, so translate it
//console.log("Translating : ", trait_en.data.specification.value);
trait_en.data.specification.value = game.i18n.localize( trait_en.data.specification.value.trim() );
if ( trait_en.system && trait_en.system.specification && isNaN(trait_en.system.specification.value) ) { // This is a string, so translate it
//console.log("Translating : ", trait_en.system.specification.value);
trait_en.system.specification.value = game.i18n.localize( trait_en.system.specification.value.trim() );
}
} else if ( trait_en.type == "skill") {
if ( name_en.includes("(") && name_en.includes(")") ) { // Then process specific skills name with (xxxx) inside
@ -288,8 +289,8 @@ Hooks.once('init', () => {
//console.log(">>>>> Skill ?", name_en, special, trait_fr.name, trait_fr);
if (trait_fr.name != name_en) { // Translation OK
trait_en.name = trait_fr.name + special;
if ( trait_fr.data ) {
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system ) {
trait_en.system.description.value = trait_fr.system.description.value;
}
}
@ -297,8 +298,8 @@ Hooks.once('init', () => {
var trait_fr = game.babele.translate( compmod+'.prayers', { name: name_en }, true);
//console.log(">>>>> Prayer ?", name_en, special, trait_fr.name );
trait_en.name = trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value )
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value )
trait_en.system.description.value = trait_fr.system.description.value;
} else if ( trait_en.type == "spell") {
var trait_fr = game.babele.translate( compmod+'.spells', { name: name_en }, true);
@ -310,8 +311,8 @@ Hooks.once('init', () => {
}
//console.log(">>>>> Spell ?", name_en, special, trait_fr.name );
trait_en.name = trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value )
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system && trait_fr.system.description && trait_fr.system.description.value )
trait_en.system.description.value = trait_fr.system.description.value;
} else if ( trait_en.type == "talent") {
if ( name_en.includes("(") && name_en.includes(")") ) { // Then process specific skills name with (xxxx) inside
var re = /(.*) +\((.*)\)/i;
@ -326,21 +327,21 @@ Hooks.once('init', () => {
}
if ( trait_fr.name == "Sprinter" || trait_fr.name != name_en) { // Talent translated!
trait_en.name = trait_fr.name.trim() + special;
if ( trait_fr.data ) { // Why ???
trait_en.data.description.value = trait_fr.data.description.value;
if ( trait_fr.system ) { // Why ???
trait_en.system.description.value = trait_fr.system.description.value;
}
}
} else if ( trait_en.type == "career") {
var career_fr = game.babele.translate( compmod+'.careers', trait_en, true );
console.log(">>>>> Career ?", name_en, career_fr.name );
trait_en.name = career_fr.name;
trait_en.data = duplicate(career_fr.data);
trait_en.system = duplicate(career_fr.system);
} else if ( trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
var trapping_fr = game.babele.translate( compmod+'.trappings', trait_en, true );
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
trait_en.name = trapping_fr.name;
if ( trapping_fr.data) {
trait_en.data.description = trapping_fr.data.description;
if ( trapping_fr.system) {
trait_en.system.description = trapping_fr.system.description;
}
}
}
@ -354,11 +355,17 @@ Hooks.once('init', () => {
"trapping_qualities_flaws": (value) => {
if ( value ) {
let newQF = [];
//console.log("ATOUTS", value);
var i=0;
//var re = /(.*) (\d+)/i;
for (i=0; i<value.length; i++) {
newQF[i] = duplicate(value[i]);
//console.log("ATOUTS", value, typeof(value));
let list = value
if (typeof(value) == "string") {
let myList = value.split(",")
list = []
for (let l of myList) {
list.push( { name: l.trim() } )
}
}
for (let i=0; i<list.length; i++) {
newQF[i] = duplicate(list[i] )
if ( newQF[i].name == "Trap Blade") {
newQF[i].name = "TrapBlade"; // Auto-patch, without space!
//console.log("PATCHED", trim);

View File

@ -2,22 +2,22 @@
"label": "Carrières Religieuses",
"mapping": {
"skills": {
"path": "data.skills",
"path": "system.skills",
"converter": "career_skills"
},
"talents": {
"path": "data.talents",
"path": "system.talents",
"converter": "career_talents"
},
"class": {
"path": "data.class.value",
"path": "dasystemta.class.value",
"converter": "generic_localization"
},
"careergroup": {
"path": "data.careergroup.value",
"path": "system.careergroup.value",
"converter": "career_careergroup"
},
"trappings": "data.trappings"
"trappings": "system.trappings"
},
"entries": [
{

View File

@ -1,13 +1,13 @@
{
"label": "Objets Religieux",
"mapping": {
"special": "data.special.value",
"special": "system.special.value",
"qualities": {
"path": "data.qualities.value",
"path": "system.qualities.value",
"converter": "trapping_qualities_flaws"
},
"flaws": {
"path": "data.flaws.value",
"path": "system.flaws.value",
"converter": "trapping_qualities_flaws"
}
},

View File

@ -6,7 +6,7 @@
"converter": "bestiary_traits"
},
"characteristics": {
"path": "data.characteristics",
"path": "system.characteristics",
"converter": "npc_characteristics"
}
},

View File

@ -2,19 +2,19 @@
"label": "Carrières",
"mapping": {
"skills": {
"path": "data.skills",
"path": "system.skills",
"converter": "career_skills"
},
"talents": {
"path": "data.talents",
"path": "system.talents",
"converter": "career_talents"
},
"class": {
"path": "data.class.value",
"path": "system.class.value",
"converter": "generic_localization"
},
"careergroup": {
"path": "data.careergroup.value",
"path": "system.careergroup.value",
"converter": "career_careergroup"
},
"trappings": "system.trappings"

View File

@ -3,7 +3,7 @@
"mapping": {
"location": {
"converter": "generic_localization",
"path": "data.location.value"
"path": "system.location.value"
},
"effects": "effects"
},

View File

@ -1,12 +1,12 @@
{
"mapping": {
"durationValue": "data.duration.value",
"durationUnit": "data.duration.unit",
"contraction": "data.contraction.value",
"incubationValue": "data.incubation.value",
"incubationUnit": "data.incubation.unit",
"symptoms": "data.symptoms.value",
"permanent": "data.permanent.value",
"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",
"effects": "effects"
},
"label": "Maladies",

View File

@ -1,9 +1,9 @@
{
"label": "Blessures",
"mapping": {
"penalty": "data.penalty.value",
"penalty": "system.penalty.value",
"location": {
"path": "data.location.value",
"path": "system.location.value",
"converter": "generic_localization"
},
"effects": "effects"

File diff suppressed because one or more lines are too long

View File

@ -2,11 +2,11 @@
"label": "Mutations",
"mapping": {
"modifier": {
"path": "data.modifier.value",
"path": "system.modifier.value",
"converter": "mutations_modifier"
},
"mutationType": {
"path": "data.mutationType.value",
"path": "system.mutationType.value",
"converter": "generic_localization"
},
"effects": {

View File

@ -2,19 +2,19 @@
"label": "Prières",
"mapping": {
"pduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"prange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"ptarget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"pdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"effects": "effects"

View File

@ -2,19 +2,19 @@
"label": "Sorts",
"mapping": {
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"effects": "effects"

View File

@ -1,7 +1,7 @@
{
"label": "Talents",
"mapping": {
"tests": "data.tests.value",
"tests": "system.tests.value",
"effects": "effects"
},
"entries": [

View File

@ -1,13 +1,13 @@
{
"label": "Equipement",
"mapping": {
"special": "data.special.value",
"special": "system.special.value",
"qualities": {
"path": "data.qualities.value",
"path": "system.qualities.value",
"converter": "trapping_qualities_flaws"
},
"flaws": {
"path": "data.flaws.value",
"path": "system.flaws.value",
"converter": "trapping_qualities_flaws"
},
"effects": "effects"

View File

@ -2,19 +2,19 @@
"label": "Items (Death on the Reik)",
"mapping": {
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
}
},

View File

@ -2,22 +2,22 @@
"label": "Items Ennemis Intérieur",
"mapping": {
"skills": {
"path": "data.skills",
"path": "system.skills",
"converter": "career_skills"
},
"talents": {
"path": "data.talents",
"path": "system.talents",
"converter": "career_talents"
},
"class": {
"path": "data.class.value",
"path": "system.class.value",
"converter": "generic_localization"
},
"careergroup": {
"path": "data.careergroup.value",
"path": "system.careergroup.value",
"converter": "career_careergroup"
},
"trappings": "data.trappings"
"trappings": "system.trappings"
},
"entries": [
{

View File

@ -2,19 +2,19 @@
"label": "Sorts Ennemi Intérieur",
"mapping": {
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"effets": "effects"

View File

@ -2,11 +2,11 @@
"label": "Mutations Supplémentaires",
"mappings": {
"modifier": {
"path": "data.modifier.value",
"path": "system.modifier.value",
"converter": "mutations_modifier"
},
"mutationType": {
"path": "data.mutationType.value",
"path": "system.mutationType.value",
"converter": "generic_localization"
}
},

View File

@ -2,22 +2,22 @@
"label": "Items Rough Nights & Hard Days",
"mapping": {
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"tests": "data.tests.value"
"tests": "system.tests.value"
},
"entries": [
{

View File

@ -1,35 +1,35 @@
{
"label": "Items Starter Set",
"mapping": {
"gmdescription": "data.gmdescription.value",
"duration": "data.duration.value",
"contraction": "data.contraction.value",
"incubation": "data.incubation.value",
"symptoms": "data.symptoms.value",
"permanent": "data.permanent.value",
"special": "data.special.value",
"gmdescription": "system.gmdescription.value",
"duration": "system.duration.value",
"contraction": "system.contraction.value",
"incubation": "system.incubation.value",
"symptoms": "system.symptoms.value",
"permanent": "system.permanent.value",
"special": "system.special.value",
"qualities": {
"path": "data.qualities.value",
"path": "system.qualities.value",
"converter": "trapping_qualities_flaws"
},
"flaws": {
"path": "data.flaws.value",
"path": "system.flaws.value",
"converter": "trapping_qualities_flaws"
},
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
}
},

View File

@ -2,19 +2,19 @@
"label": "UG - Carrières",
"mapping": {
"skills": {
"path": "data.skills",
"path": "system.skills",
"converter": "career_skills"
},
"talents": {
"path": "data.talents",
"path": "system.talents",
"converter": "career_talents"
},
"class": {
"path": "data.class.value",
"path": "system.class.value",
"converter": "generic_localization"
},
"careergroup": "data.careergroup.value",
"trappings": "data.trappings"
"careergroup": "system.careergroup.value",
"trappings": "system.trappings"
},
"entries": [
{

View File

@ -6,7 +6,7 @@
"converter": "bestiary_traits"
},
"characteristics": {
"path": "data.characteristics",
"path": "system.characteristics",
"converter": "npc_characteristics"
}
},

View File

@ -2,19 +2,19 @@
"label": "UG - Sorts",
"mapping": {
"sduration": {
"path": "data.duration.value",
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "data.range.value",
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "data.target.value",
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "data.damage.value",
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
}
},

View File

@ -665,6 +665,7 @@
"Actor Settings":"Paramètres d'Acteur",
"Add Encumbrance for Actors":"Ajouter l'encombrement pour les Acteurs",
"BROWSER.Button":"Navigateur",
"BROWSER.LoadingBrowser":"Chargement du navigateur...",
"MOO.Bleeding":"Vous saignez gravement. Perdez 1 Blessure à la fin de chaque round, en ignorant tout autre modificateur. De plus, subissez une pénalité de -10 à tout vos Tests pour résister à une Blessure Purulente, un Infection Mineure ou une Infection du Sang. Si vous atteignez 0 Blessures, faites immédiatement un Test d'Endurance pour rester debout (avec une pénalite de -10 pour chaque étatHémorragique), sinon vous tombez @Condition[Unconscious], et vous devez refaire ce test chaque fois que vous prenez des dommages dus à l'Hémorragie. Si vous êtes à 0 Blessures, que vous soyez Inconscient ou pas, vous avez 10% de mourrir à la fin du Round pour chaque état Hémorragique. Donc, si vous avez 3 états Hémorragiques, vous mourrez sur un jet de 01-30. Si un double est obtenu, votre blessure coagule un peu : retirez 1 état Hémorragique. Vous ne pouvez redevenir conscient que si tout les états Hémorragiques sont soignées (voir Blessures)<br><br>Un état Hémorragique peut être retiré avec : un test réussi de Guérison (chaque DR enlève 1 état Hémorragique); ou avec un sort ou une prière (avec un état enlevé par Point de Blessure gueri).<br><br>Lorsque tout les états Hémorragiques ont été soignés, recevez un état @Condition[Fatigued].",
"MOO.Broken":"Vous êtes terrifié, défait en état de panique ou convaincu que vous allez mourrir. A votre tour, votre Action et votre Mouvement doivent être utilisés pour fuir aussi loin que possible jusqu'à ce que vous trouviez un endroit pour vous cacher; vous pourrez alors utiliser votre Action avec une Compétence vous permettant de vous cacher effectivement. Vous recevez également une pénalité de -10 pour tout les Tests n'impliquant pas la course ou la dissimulation.<br><br>Vous ne pouvez faire de test pour récupérer de votre état Brisé si vous êtes au contact d'un ennemi. Si vous êtes désengagé, à la fin de chaque round, vous pouvez tenter un Test de Calme pour enlever un état Brisé par DR. La difficulté est déterminée par les circonstances: il est plus facile de se remettre en état caché à l'abri que d'être à 3 pas d'un démon souhaitant vous démembrer.<br><br>Si vous passez un Round complet à vous cacher hors de la ligne de vue de tout ennemi, vous enlevez 1 état Brisé.<br><br><strike>Lorsque tout les états Brisé sont enlevés, vous recevez 1 Etat Fatigué.</strike>.",
"MOO.Items":"Le règles maison des ites ont été appliqués sur les compendiums. Voir la console (F12) pour détail.",
@ -1907,7 +1908,12 @@
"BUGREPORT.Contact":"Informations de contact",
"BUGREPORT.ContactPlaceholder":"Tag Discord ou Email.",
"BUGREPORT.DescriptionPlaceholder":"Ce qu'il s'est passsé, comment le reproduire, etc.",
"BUGREPORT.ManyModules":"Vous avez des modules non-WFRP4e activés, peut-être que l'un d'entre eux interfère ?",
"BUGREPORT.MatchingGrudges":"Est-ce que votre grief n'a pas déja été enregistré ?",
"BUGREPORT.Warning":"<b>Attention</b>: Cette information est postée dans les tickets de GitHub, qui sont publics. Les Tags Discords sont donc à préférer. Sinon, contactez moi directement en Anglais à (<a href='mailto:russellt@cubicle7games.com'>Moo Man</a>).",
"GrudgeError":"Les Longues Barbes gromellent et refusent votre soumission. Vérifier la console (F12) pour de plus amples détails.",
"GrudgePost":"Les Longues Barbes ont reçu votre grief ! Consultez la console (F12) pour le lien.",
"EFFECT.TabWFRP" : "WFRP",
"EFFECT.EffectType" : "Type d'Effet",
"EFFECT.EffectApplication" : "Application de l'Effect",

View File

@ -8,7 +8,7 @@
}
],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "6.1.9",
"version": "6.2.5",
"esmodules": [
"babele-register.js",
"addon-register.js",
@ -135,10 +135,27 @@
"flags": {}
}
],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v4/module.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.1.9.zip",
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.5.zip",
"id": "wh4-fr-translation",
"name": "wh4-fr-translation",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "9"
"compatibility": {
"minimum": "10",
"verified": "10.286"
},
"relationships": {
"systems": [
{
"id": "wfrp4e",
"type": "system",
"compatibility": {}
}
],
"requires": [
{
"id": "babele",
"type": "module",
"compatibility": {}
}
]
}
}

View File

@ -134,7 +134,7 @@ async function __findSkill(skillName, value = undefined) {
let spec = XRegExp.replace(skillSplit.specialized, "(", "");
spec = XRegExp.replace(spec, ")", "");
let skillSplit2 = XRegExp.exec(dbSkill.name, XRegExp(parseStr, 'gi'));
dbSkill.data.update( { name: skillSplit2.name + '(' + game.i18n.localize( spec.trim() ) + ')' } );
dbSkill.update( { name: skillSplit2.name + '(' + game.i18n.localize( spec.trim() ) + ')' } );
}
//game.babele.translate('wfrp4e-core.skills', dbSkill);
return dbSkill;
@ -169,7 +169,7 @@ async function __findTalent(talentName) {
if ( talentSplit.specialized ) {
let spec = XRegExp.replace(talentSplit.specialized, "(", "");
spec = XRegExp.replace(spec, ")", "");
dbTalent.data.update( { name: talentSplit.name + '(' + game.i18n.localize( spec.trim() ) + ')' } );
dbTalent.update( { name: talentSplit.name + '(' + game.i18n.localize( spec.trim() ) + ')' } );
}
return dbTalent;
}
@ -285,9 +285,9 @@ export default async function statParserFR(statString, type = "npc") {
if (itemFound && value && value.length > 0) {
if (name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" ||
name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue") {
itemFound.data.specification.value = Number(value) - Math.floor( Number(model.characteristics.s.initial) / 10)
itemFound.system.specification.value = Number(value) - Math.floor( Number(model.characteristics.s.initial) / 10)
} else {
itemFound.data.specification.value = game.i18n.localize(value)
itemFound.system.specification.value = game.i18n.localize(value)
}
}
if (!itemFound)
@ -301,7 +301,7 @@ export default async function statParserFR(statString, type = "npc") {
if (itemFound)
itemFound = itemFound.toObject();
if (itemFound && subres && value) {
itemFound.data.advances.value = Number(value) - Number(model.characteristics[itemFound.data.characteristic.value].initial);
itemFound.system.advances.value = Number(value) - Number(model.characteristics[itemFound.system.characteristic.value].initial);
}
if (!itemFound)
ui.notifications.error("Compétence non trouvée, à ajouter manuellement : " + name, { permanent: true })
@ -313,7 +313,7 @@ export default async function statParserFR(statString, type = "npc") {
if (itemFound)
itemFound = itemFound.toObject();
if (itemFound && subres && value)
itemFound.data.advances.value = Number(value);
itemFound.system.advances.value = Number(value);
if (!itemFound)
ui.notifications.error("Talent non trouvé, à ajouter manuellement : " + name, { permanent: true })
} else if (def.name == 'trapping') {
@ -323,7 +323,7 @@ export default async function statParserFR(statString, type = "npc") {
catch { }
if (!itemFound && name) {
itemFound = new game.entities.ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", data: game.system.model.Item.trapping })
itemFound.data.data.trappingType.value = "misc"
itemFound.system.trappingType.value = "misc"
}
if (itemFound)
itemFound = itemFound.toObject();
@ -342,13 +342,13 @@ export default async function statParserFR(statString, type = "npc") {
}
}
let moneyItems = await game.wfrp4e.utility.allMoneyItems() || [];
moneyItems = moneyItems.sort((a, b) => (a.data.coinValue.value > b.data.coinValue.value) ? -1 : 1);
moneyItems.forEach(m => m.data.quantity.value = 0)
moneyItems = moneyItems.sort((a, b) => (a.system.coinValue.value > b.system.coinValue.value) ? -1 : 1);
moneyItems.forEach(m => m.system.quantity.value = 0)
globalItemList = globalItemList.concat(moneyItems);
//console.log("My liste :", globalItemList);
let name = pnjName;
let effects = globalItemList.reduce((total, globItem) => total.concat(globItem.data.effects), [])
let effects = globalItemList.reduce((total, globItem) => total.concat(globItem.effects), [])
effects = effects.filter(e => !!e)
effects = effects.filter(e => e.transfer)

View File

@ -2,7 +2,7 @@ package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
--local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-dotr/lang/en.json"
--local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-core/lang/en.json"
local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-core/lang/en.json"
local enjsonf = "../../WFRP4e-FoundryVTT/static/lang/en.json"
local frjsonf = "../fr.json"