Add all systems effects scripts + translations

This commit is contained in:
LeRatierBretonnien 2024-05-17 12:49:40 +02:00
parent 6463f5254a
commit fa73f9d49c
19 changed files with 4 additions and 1666 deletions

View File

@ -1,445 +0,0 @@
/************************************************************************************/
//import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
import { WH4FRPatchConfig } from "./modules/config-patch.js";
/************************************************************************************/
const _patch_eis = () => {
if (game.wfrp4e.config && game.wfrp4e.config.symptoms && game.wfrp4e.config.symptoms["delirium"] ) {
game.wfrp4e.config.symptoms["delirium"] = "Délire";
game.wfrp4e.config.symptomDescriptions["delirium"] = "Votre sensibilité va et vient, avec des moments de clarté remplaçés subitement Your sensibility comes and goes, with moments of clarity replaced suddenly par des accès de délire, des hallucinations et de la terreur. Faites un <b>Test de Force Mentale Intermédiaire (+0)</b> chaque heure, et consultez la table <b><a class='table-click' data-table='delirium'>Délires</a></b> table.";
game.wfrp4e.config.symptomTreatment["delirium"] = "Certaines autorités traitent le délire comme un fièvre, avec les mêmes prescriptions. Les médicaments coutent quelques sous à quelques pistoles, en seulement 10% sont efficaces.<br><br>Avec des soins corrects, un test de <b>Guérison Intermédiaire (0)</b> arrêtes les hallucinations pour <b><a class = 'chat-roll'>1d10</a></b> heures.<br><br>Il est aussi courant de soigner les patients délirants avec des drogues tranquillisantes, comme la Fleur de Lune ou même de la Racine de Mandragore, pour garder les patients calmes pendant la crise, les envoyant dans un sommeil agité jusqu'à ce qu'il erécupèrent ou meurent.";
game.wfrp4e.config.symptoms["swelling"] = "Gonflement";
game.wfrp4e.config.symptomDescriptions["swelling"] = "Une partie du corps gonfle jusqu'à plusieurs fois sa taille normale, devenant rouge vif ou violette et devenant presque inutilisable. La partie du corps affectée correspond normalement à une plaie ou une morsure provoquant le gonflement, ou l'endroit où une maladie ou une infection est entrée dans le corps. <br> <br> <b> Tête </b>: Les yeux et la langue enflent, les joues deviennent livides, la mâchoire est toujours ouverte. Il est impossible de manger, mais des liquides légers peuvent être sirotés en petites quantités. Tous les tests nécessitant la parole sont plus difficiles de 3 niveaux. <br> <b> Bras </b>: le bras et la main gonflent, les articulations des épaules et du coude ne peuvent plus bouger et la main devient inutile. Pour la durée du gonflement, le bras compte comme Amputé. <br> <b> Corps </b>: Le corps entier gonfle jusqu'à ce que la victime ne puisse plus porter de vêtements. Tous les tests impliquant le mouvement deviennent difficiles de 3 niveaux. <br> <b> Jambe </b>: La jambe gonfle de manière grotesque, devenant aussi large que la partie la plus large de la cuisse sur toute sa longueur. Le pied est presque indiscernable. Pour la durée du gonflement, la jambe compte comme amputée (WFRP, page 180).";
game.wfrp4e.config.symptomTreatment["swelling"] = "La plupart des traitements consistent à plonger la partie affectée, ou parfois tout le corps, dans un bain d'eau glacée pour réduire la chaleur qui accompagne les gonflements. Un <b> Test de Guérison Difficile (-20) étendu </b> nécessitant +3 DR réduit le renflement de <b> <a class ='chat-roll'> 2d10 </a> </b> heures. Chaque test dure une heure. Le patient se retrouve avec l'Etat Exténué +1 pour chaque test effectué au cours du processus. <br> <br> A la place, certains médecins saignent le patient avec une lame ou des sangsues. Un <b>Test de Guérison étendu </b> réussi nécessitant +4 SL et des Outils (médecin) réduit le renflement de (<a class ='chat-roll'> 1d10 </a> + Bonus d'Endurance du patient) heures. Chaque test a une difficulté de base <b> impossible (-50) </b> et dure une demi-heure.";
game.wfrp4e.config.loreEffects["tzeentch"] = {
label: "Domaine de Tzeentch",
icon: "modules/wfrp4e-core/icons/spells/tzeentch.png",
transfer: true,
flags: {
wfrp4e: {
"effectApplication": "apply",
"effectTrigger": "oneTime",
"lore": true,
"script": `
if (this.actor.isOwner)
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.type == "character")
{
args.actor.update({"system.status.fortune.value" : args.actor.system.status.fortune.value + 1})
}
else if (test.result.result == "failure" && args.actor.type == "character")
{
args.actor.update({"system.status.corruption.value" : args.actor.system.status.corruption.value + 1})
}
})
})`
}
}
}
}
}
/************************************************************************************/
const _patch_up_in_arms = () => {
game.wfrp4e.config.hitLocationTables["quadruped"] = "Quadrupède";
let batter = game.wfrp4e.config.groupAdvantageActions.find(ga => ga.name == "Batter")
if (batter) {
batter.name = "Battre"
batter.description = "En face d'un adversaire plus expérimenté, quelque fois la force brute peut réussir là où d'autres approches échouent.",
batter.effect = "<strong>Action Spéciale</strong>: Pour Battre votre adversaire, vous devez réussir un Test Opposé de Force contre votre adversaire. Celui qui obtient le DR le plus élevé gagne. Si vous gagnez ce Test, votre adversaire reçoit l'état @Condition[A Terre] et vous recevez +1 Avantage. Si vous perdez le Test Opposé, votre opposant gagne +1 Avantage and votre action est terminée. Vous ne gagnez pas d'Avantage due à la victoire d'un test Opposé lorsque vous gagnez ce test (ie 1 seul avantage octroyé au total si le Test Opposé de Force est remporté)."
}
let trick = game.wfrp4e.config.groupAdvantageActions.find(ga => ga.name == "Trick")
if (trick) {
trick.name = "Duper"
trick.description = "Vous prenez un instant pour lancer de la poussière dans les yeux de votre adversaire ou bien lui lancer de l'huile enflammée. Cette manoeuvre est risquée, et peu d'ennemis se font avoir deux fois de la même manière",
trick.effect = "<strong>Action Spéciale</strong>: Pour Duper votre adversaire, vous devez réussir un Test Opposé d'Agilité contre lui. Celui qui obtient le plus haut DR gagne le Test. Si vous gagnez le Test, vous recevez +1 Avantage. En fonction des circonstances, le MJ peut vous autoriser à attribuer à votre adversaire l'un des états suivants : @Condition[En Flammes], @Condition[Aveuglé], or @Condition[Empêtré]. Si vous perdez le Test Opposé, votre adversaire gagne +1 Avantage et votre action est terminée. Le MJ peut interdire certains de ces états si vous n'avez d'objet applicables dans votre main, ou bien si vous avez déja infligé un état identique precedemment à cet adversaire. Vous ne gagnez pas d'Avantages due à la victoire d'un test Opposé lorsque vous gagnez ce test (ie 1 seul avantage octroyé au total si le Test Opposé de Force est remporté)."
}
let addeffort = game.wfrp4e.config.groupAdvantageActions.find(ga => ga.name == "Additional Effort")
if (addeffort) {
addeffort.name = "Effort Supplémentaire"
addeffort.description = "Dans des circonstances désespérées, vous pouvez utiliser l'élan que vous avez acquis pour augmenter vos chances de succès.",
addeffort.effect = "<strong>Action Gratuite</strong>: Vous gagnez un bonus de +10% pour n'importe quel test. Vous pouvez dépenser des avantages supplémentaires pour ajouter +10% par Avantage dépensé en plus. Par exemple, vous pouvez dépenser 3 Avantages pour un bonus de +10%, 4 avantages pour un +30%, etc. Le Test qui en découle ne procure jamais d'Avantages pour le personnage qui le réalise."
}
let flee = game.wfrp4e.config.groupAdvantageActions.find(ga => ga.name == "Flee from Harm")
if (flee) {
flee.name = "Fuir le Mal"
flee.description = "Vous profitez d'un moment de distraction de votre adversaire pour fuir le combat.",
flee.effect = "<strong>Mouvement</strong>: Vous pouvez vous éloignez de votre adversaire sans aucune pénalité. Cela remplace la règle de @UUID[Compendium.wfrp4e-core.journal-entries.NS3YGlJQxwTggjRX.JournalEntryPage.bdfiyhEYtKs7irqc#disengaging]{Désengagement}."
}
let addaction = game.wfrp4e.config.groupAdvantageActions.find(ga => ga.name == "Additional Action")
if (addaction) {
addaction.name = "Action Supplémentaire"
addaction.description = "Vous profitez d'une opportunité pour accomplir une action remarquable.",
addaction.effect = "<strong>Action Gratuite</strong>: Vous réalisez une action supplémentaire. Cette action ne génère jamais d'Avantage pour vous. Vous pouvez réaliser cette dépense d'Avantages seulement une seule fois par Tour."
}
}
/************************************************************************************/
/* Manages /auberge command */
const _manage_inn_roll = async (content, msg) => {
// Split input into arguments
let command = content.split(" ").map(function (item) {
return item.trim();
})
console.log("COMMANDES", command);
if (command[0] == "/auberge" && command[1]) {
msg["type"] = 0;
msg["rollMode"] = "gmroll";
var compendium = game.packs.get('wh4-fr-translation.plats-dauberges')
const pack = game.packs.get(compendium);
let rollList = await compendium.getDocuments()
//console.log("AUBERGE", rollList)
for (var i = 0; i < rollList.length; i++) {
var rollTab = rollList[i];
console.log("Got compendium...", rollList, rollTab.name);
if (rollTab.name.toLowerCase().includes(command[1].toLowerCase())) {
let my_rollTable;
await compendium.getDocument(rollTab._id).then(mytab => my_rollTable = mytab);
my_rollTable.draw({ rollMode: "gmroll" });
return false;
}
}
}
if (content.includes("/auberge")) {
msg["type"] = 0;
msg["rollMode"] = "gmroll";
msg["content"] = "Syntaxe : /auberge MOT_CLE, avec MOT_CLE parmi:<br>BoissonsBase, BoissonsFortes, Desserts, PlatsCommuns, PlatsExcellents, PlatsMaritimes, PlatsMédiocres, PlatsQualité, PlatsRivières<br>Des raccourcis sont possibles avec une partie du nom : /auberge Base (correspond à BoissonBase) ou /auberge Mari (correspond à PlatsMaritimes), etc."
ChatMessage.create(msg);
return false;
}
}
/************************************************************************************/
let __eis_tables = {
"animalmishap": 1, "beasthead": 1, "coincedentalenc": 1, "demonic-mien": 1,
"expandedmutatemental": 1, "expandedmutatephys": 1, "fixations": 1,
"harmfulenc": 1, "positiveenc": 1, "weather": 1, "mutatephys": 1,
"vehiclemishap": 1, "quadruped": 1, "ridingmishap": 1, "weather": 1,
"delirium": 1
}
let __dotr_tables = {
"rowingboat": 1, "sailingboat": 1, "wind-direction": 1, "waterborne": 1, "traderumour": 1
}
let __wfrp4e_tables = {
"career": 1, "critbody": 1, "critleg": 1, "doom": 1, "doom2": 1, "eyes": 1, "majormis": 1, "mutatemental": 1, "oops": 1, "species": 1, "travel": 1,
"hitloc": 1, "critarm": 1, "crithead": 1, "delirium": 1, "event": 1, "hair": 1, "minormis": 1, "mutatephys": 1, "talents": 1, "wrath": 1,
"astral": 1, "corruption": 1, "snake": 1, "spider": 1, "job": 1
}
let __to_table_translate = [{ name: "traits", transl: "Traits" }, { name: "talents", transl: "Talents" }, { name: "skills", transl: "Compétences" },
{ name: "careers", transl: "Carrières" }, { name: "spells", transl: "Sorts" }, { name: "prayers", transl: "Bénédictions et Miracles" },
{ name: "injuries", transl: "Blessures" }, { name: "criticals", transl: "Critiques" }, { name: "trappings", transl: "Equipement" },
{ name: "bestiary", transl: "Bestiaire" }, { name: "diseases", transl: "Maladies" }
]
/************************************************************************************/
const __create_translation_tables = async (compmod) => {
for (let iterData of __to_table_translate) {
let entityName = compmod + '.' + iterData.name;
let compData = game.packs.get(entityName);
let compFull = await compData.getContent();
let htmlTab = "<table border='1'><tbody>";
for (let entryData of compFull) {
htmlTab += "<tr><td>" + entryData.data.originalName + "</td><td>@Compendium[" + entityName + '.' + entryData.id + "]{" + entryData.name + "}</td></tr>\n";
};
htmlTab += "</table>";
let myjournal = await JournalEntry.create({ name: 'Traduction des ' + iterData.transl, content: htmlTab });
game.journal.insert(myjournal);
}
}
/************************************************************************************
* The default static compendium of translation tables must be aut-mapped to the relevant
* compendium content name (ie either wfrp4e or wfrp4e-core up to now).
* */
const __auto_patch_translation_journal_compendium = async (compmod) => {
if (game.user.isGM) {
let compData = game.packs.get("WH4-fr-translation.tables-des-traductions");
compData.locked = false;
let translEntries = await compData.getContent();
for (let entryData of translEntries) {
let mydata = duplicate(entryData.data);
mydata.content = mydata.content.replace(/wfrp4e-content/g, compmod);
entryData.update(mydata);
}
compData.locked = true;
}
}
/************************************************************************************/
const loadCompendiumData = async (compendium) => {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
}
/* -------------------------------------------- */
/************************************************************************************/
const loadCompendium = async (compendium, filter = item => true) => {
let compendiumData = await loadCompendiumData(compendium);
return compendiumData.filter(filter);
}
/************************************************************************************/
const patch_core_tables = (tableList) => {
if (game.version) { // v9 and above
return;
}
FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => {
for (var file of resp.files) {
let filename = file.substring(file.lastIndexOf("/") + 1, file.indexOf(".json"))
if (tableList[filename] == 1) { // Matching table name -> patch !
fetch(file).then(r => r.json()).then(records => {
//console.log("Patch !!!", filename, records);
//WFRP_Tables[filename] = records;
game.wfrp4e.tables[filename] = records;
});
}
}
});
}
/************************************************************************************/
const patch_trade_gazeteer = () => {
if (game.wfrp4e.config.trade?.gazetteer) {
fetch("modules/wh4-fr-translation/trade/gazetteer_dotr.json").then(r => r.json()).then(records => {
game.wfrp4e.config.trade.gazetteer = records;
});
}
}
/************************************************************************************/
const __check_fix_wrong_modules = (chatFlag, patchFinished) => {
WH4FRPatchConfig.perform_patch();
game.modules.forEach((module, name) => {
//console.log("TESTING MODULE", module)
if (module.id == "wfrp4e-core" && module.active) {
patch_core_tables(__wfrp4e_tables);
}
if (module.id == "wfrp4e-eis" && module.active) {
patch_core_tables(__eis_tables);
_patch_eis();
}
if (module.id == "wfrp4e-dotr" && module.active) {
patch_core_tables(__dotr_tables);
patch_trade_gazeteer()
}
if (module.id == "wfrp4e-up-in-arms" && module.active) {
_patch_up_in_arms();
}
if (module.id == 'ogre-kingdom-wfrp4e' && module.active) {
WH4FRPatchConfig.perform_ogrekingdom_patch();
if (game.user.isGM && chatFlag)
ChatMessage.create({ content: "<div><strong>Le module Ogre-Kingdom a été detecté et automatiquement patché.</strong></div>", whisper: ChatMessage.getWhisperRecipients("GM") });
}
if (module.id == "wfrp4e-ew" && module.active && game.user.isGM && chatFlag) {
ChatMessage.create({
content: "<div><strong>Vous avez le module EW (wfrp4e-ew ?) installé. Malheureusement, ce module n'est pas compatible avec" +
" les traductions et vient casser le fonctionnement de la traduction. Veuillez recopier les compendiums dans votre monde, désactiver le module et re-démarrer le monde</strong></div>",
whisper: ChatMessage.getWhisperRecipients("GM")
});
}
});
if (game.user.isGM && patchFinished) {
ChatMessage.create({
content: "<div>Les modules WFRP4E ont été <strong>patchés avec succés</strong>. Vous pouvez y aller et que <strong>Shallya vous garde !</strong></div><div>Derniers changements : correction pour acteurs de RNHD et ajout des traductions des items de Aventures à Ubesreik 1 (François Cheminade)</div></ul>",
user: game.user.id,
whisper: ChatMessage.getWhisperRecipients("GM")
});
}
}
const __history = [
"Nouveautés 7.0.28: <ul><li>Traduction des items du Starter Set (Ashbury77)</li><li>Traduction des items du d'Archives of the Empire (Bimkiz)</li></ul>"
]
/************************************************************************************/
const convertColumnToMulti = (table) => {
let columns = table.columns;
let newTable = duplicate(table)
delete newTable.columns;
newTable.rows = table.rows.map(i => { return { range: {} } })
newTable.multi = table.columns
for (let column of columns) {
for (let row of newTable.rows) {
row[column] = {}
row.range[column] = []
}
}
for (let index in newTable.rows) {
for (let column in table.rows[index].range) {
newTable.rows[index][column] = { name: table.rows[index].name }
newTable.rows[index].range[column] = table.rows[index].range[column]
}
}
return newTable;
}
/************************************************************************************/
const __patchStyleSheet = () => {
for (let styleSheet of document.styleSheets) {
if (styleSheet.href && styleSheet.href.includes("wfrp4e.css")) {
let found = 0
for (let i = 0; i < styleSheet.cssRules.length; i++) {
let rule = styleSheet.cssRules[i]
if (rule.selectorText == '.sidebar-popout') {
console.log("DELETE RULE", rule)
found = i
/*rule.cssText = ".sidebar-popout { }"
rule.style.width = ""
console.log("Found rul2", rule)*/
}
}
styleSheet.deleteRule(found)
}
}
}
/************************************************************************************/
const __add_actors_translation = () => {
const lang = game.settings.get('core', 'language');
if (lang == "fr") {
let pack_array = [];
for (let metadata of game.packs) {
if (!game.babele.isTranslated(metadata) &&
metadata.collection != "wfrp4e-core.actors" &&
metadata.collection != "wfrp4e-core.bestiary" &&
metadata.collection != "wfrp4e-ua1.actors" &&
metadata.collection != "wfrp4e-altdorf.actors" &&
metadata.collection != "wfrp4e-rnhd.actors" &&
metadata.collection != "wfrp4e-dotr.actors" &&
metadata.collection != "wfrp4e-eis.actors" &&
metadata.collection != "wfrp4e-pbtt.actors" &&
metadata.collection != "wfrp4e-middenheim.actors" &&
metadata.documentName === 'Actor') {
//console.log("REPLACE PACK : ", metadata);
let translations = {
"label": metadata.name,
"mapping": {
"name": "name",
"description": "system.details.biography.value",
"items": {
"path": "items",
"converter": "bestiary_traits"
},
"characteristics": {
"path": "system.characteristics",
"converter": "npc_characteristics"
},
"details": {
"path": "system.details",
"converter": "npc_details"
}
}
}
//console.log(metadata, translations)
game.babele.packs.set(metadata.metadata.id, new TranslatedCompendium(metadata.metadata, translations))
}
}
}
}
/************************************************************************************/
/* Hook for specific command */
Hooks.on("chatMessage", (html, content, msg) => {
if (content.toLowerCase().includes('auberge')) {
_manage_inn_roll(content, msg);
return false;
}
});
/************************************************************************************/
/* Additionnal hooks ready */
Hooks.once('ready', () => {
if (game.user.isGM) {
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: ChatMessage.getWhisperRecipients('GM'),
content: `<div>Les modules WFRP4E sont <strong>en cours de patch pour traduction</strong>... Merci <strong>d'attendre le message de fin</strong> (dans environ 20 secondes)<p>Pour rappel et à titre informatif, il faut activer ce module de traduction FR <strong>avant</strong> de procéder à l'importation des données des modules C7 (core compris). Autrement dit, activez ce module FR <strong>AVANT</strong> tout autre module.</p><p>Support et informations sur le Discord FR de Foundry : https://discord.gg/pPSDNJk</p></div>`
}
ChatMessage.create(chatData);
}
/** New modifiers */
game.wfrp4e.config.difficultyModifiers = {
"veasy": 60,
"easy": 40,
"banal": 30,
"average": 20,
"medium": 10,
"challenging": 0,
"difficult": -10,
"hard": -20,
"vhard": -30,
"doom": -40
}
game.wfrp4e.config.difficultyLabels = {
"veasy": "Trés Facile (+60)",
"easy": "Facile (+40)",
"banal": "Banal (+30)",
"average": "Accessible (+20)",
"medium": "Faisable (+10)",
"challenging": "Intermédiaire (+0)",
"difficult": "Complexe (-10)",
"hard": "Difficile (-20)",
"vhard": "Très Difficile (-30)",
"doom": "Maudit (-40)"
}
//setTimeout( __check_fix_wrong_modules, 2000, true, false);
setTimeout(__check_fix_wrong_modules, 20000, true, true);
setTimeout(__add_actors_translation, 21000, false, true);
//__patchStyleSheet()
/* ATTEMPT !!
loadCompendium("wfrp4e-core.spells").then( comp => {
let sorted = {};
for (let spell of comp) {
if ( !sorted[spell.data.data.lore.value]) {
sorted[spell.data.data.lore.value] = [];
}
sorted[spell.data.data.lore.value].push( duplicate(spell.data) );
}
console.log("SORTED", sorted);
});*/
/*
let compmod = "wfrp4e";
// Check various settings in the installation
game.modules.forEach((module, name) => {
if ( name == "wfrp4e-core" && module.active) {
compmod = "wfrp4e-core";
}
} );
__auto_patch_translation_journal_compendium( compmod )
/* Uncomment this to auto-create the translation tables
Auto-create translation journal tables
__create_translation_tables(compmod);
*/
});

View File

@ -1,639 +0,0 @@
/************************************************************************************/
import loadScripts from "./loadScripts.js";
import statParserFR from "./modules/import-stat-2.js";
/************************************************************************************/
var compmod = "wfrp4e-core";
const vo_conditions = {
"ablaze": "Ablaze",
"bleeding": "Bleeding",
"blinded": "Blinded",
"broken": "Broken",
"deafened": "Deafened",
"entangled": "Entangled",
"fatigued": "Fatigued",
"poisoned": "Poisoned",
"prone": "Prone",
"stunned": "Stunned",
"surprised": "Surprised",
"unconscious": "Unconscious",
"grappling": "Grappling",
"fear": "Fear",
"defeated": "Defeated"
}
const __SELECT_BONUS_PREFIX_D = {
"initiative": 1,
"intelligence": 1,
"endurance": 1,
"agilite": 1,
"agilité": 1
}
/************************************************************************************/
export class WFRP4FrTranslation {
static parseSpellContent(spell) {
if (spell.system.range?.value) {
spell.system.range.value = this.processSpellContent(spell.system.range.value)
}
if (spell.system.damage?.value) {
spell.system.damage.value = this.processSpellContent(spell.system.damage.value)
}
if (spell.system.duration?.value) {
spell.system.duration.value = this.processSpellContent(spell.system.duration?.value)
}
if ( spell.system.range?.value) {
spell.system.range.value = this.processSpellContent(spell.system.range?.value)
}
if (spell.system.target?.value ) {
spell.system.target.value = this.processSpellContent(spell.system.target?.value)
}
}
static processSpellContent(value) {
//console.log("Spell duration/range/damage/target :", value);
if (value == "") return ""; // Hop !
if (value == "Touch") return "Contact"; // Hop !
if (value == "You") return "Vous"; // Hop !
if (value == "Instant") return "Instantané"; // Hop !
let translw = value;
let re = /(.*)\s+[Bb]onus\s*(\w*)/i;
let res = re.exec(value);
//console.log("RES1:", res);
let unit = "";
if (res) { // Test "<charac> Bonus <unit>" pattern
if (res[1]) { // We have char name, then convert it
translw = game.i18n.localize(res[1].trim());
let bonusPrefix = (translw.toLowerCase() in __SELECT_BONUS_PREFIX_D) ? "Bonus d'" : "Bonus de ";
translw = bonusPrefix + translw
}
unit = res[2];
} else {
re = /(\d+) (\w+)/i;
res = re.exec(value);
if (res) { // Test : "<number> <unit>" pattern
translw = res[1];
unit = res[2];
} else { // Test
re = /(\w+) (\w+)/i;
res = re.exec(value);
if (res) { // Test : "<charac> <unit>" pattern
translw = game.i18n.localize(res[1].trim());
unit = res[2];
}
}
}
if (unit == "hour") unit = "heure";
if (unit == "hours") unit = "heures";
if (unit == "days") unit = "jours";
if (unit == "yard") unit = "mètre";
if (unit == "yards") unit = "mètres";
if (unit == "Bonus") { // Another weird management
console.log("Translating bonus", unit);
translw = "Bonus de " + translw;
} else {
translw += " " + unit;
}
return translw;
}
}
/************************************************************************************/
Hooks.once('init', () => {
// Check various settings in the installation
game.modules.forEach((module, id) => {
if (id == "wfrp4e-core" && module.active) {
compmod = "wfrp4e-core";
}
});
game.wfrp4efr = {
compmod: compmod,
vo_conditions: vo_conditions
}
game.wfrp4e.apps.StatBlockParser.parseStatBlock = async function (statString, type = "npc") {
console.log("PARSER FR DONE");
return statParserFR(statString, type);
}
loadScripts();
/*---------------------------------------------------------------------*/
/* DEPRECATED : game.wfrp4e.entities.ItemWfrp4e.prototype.computeSpellDamage = function (formula, isMagicMissile) {
try {
formula = formula.toLowerCase();
if (isMagicMissile) // If it's a magic missile, damage includes willpower bonus
{
formula += "+ " + this.actor.characteristics["wp"].bonus
}
// Specific case, to avoid wrong matching with "Force"
if (formula.includes("toughness bonus")) {
formula = formula.replace("toughness bonus", this.actor.characteristics["t"].bonus);
}
// Specific case, to avoid wrong matching with "Force"
if (formula.includes("force mentale")) {
// Determine if it's looking for the bonus or the value
if (formula.includes('bonus')) {
formula = formula.replace("bonus de force mentale", this.actor.characteristics["wp"].bonus);
formula = formula.replace("force mentale bonus", this.actor.characteristics["wp"].bonus);
} else
formula = formula.replace("force mentale", this.actor.characteristics["wp"].value);
}
// Iterate through characteristics
for (let ch in this.actor.characteristics) {
// If formula includes characteristic name
while (formula.includes(this.actor.characteristics[ch].label.toLowerCase())) {
// Determine if it's looking for the bonus or the value
if (formula.includes('bonus')) {
formula = formula.replace("bonus de " + game.wfrp4e.config.characteristics[ch].toLowerCase(), this.actor.characteristics[ch].bonus);
formula = formula.replace(game.wfrp4e.config.characteristics[ch].toLowerCase() + " bonus", this.actor.characteristics[ch].bonus);
}
else
formula = formula.replace(game.wfrp4e.config.characteristics[ch].toLowerCase(), this.actor.characteristics[ch].value);
}
}
return eval(formula);
}
catch (e) {
throw ui.notifications.error("Error: could not parse spell damage. See console for details")
}
}*/
/*---------------------------------------------------------------------*/
/* DEPRECATED : game.wfrp4e.entities.ItemWfrp4e.prototype.computeSpellPrayerFormula = function (type, aoe = false, formulaOverride) {
let formula = formulaOverride || this[type]?.value
if (Number.isNumeric(formula))
return formula
//console.log("Compute FR")
formula = formula.toLowerCase();
// Do not process these special values
if (formula != game.i18n.localize("You").toLowerCase() && formula != game.i18n.localize("Special").toLowerCase() && formula != game.i18n.localize("Instant").toLowerCase()) {
// Specific case, to avoid wrong matching with "Force"
if (formula.includes("force mentale")) {
// Determine if it's looking for the bonus or the value
if (formula.includes('bonus')) {
formula = formula.replace("bonus de force mentale", this.actor.characteristics["wp"].bonus);
formula = formula.replace("force mentale bonus", this.actor.characteristics["wp"].bonus);
}
else
formula = formula.replace("force mentale", this.actor.characteristics["wp"].value);
}
if (formula.includes("yard"))
formula = formula.replace('yard', "mètre");
if (formula.includes("yds"))
formula = formula.replace('yds', "m.");
// Iterate through remaining characteristics
for (let ch in this.actor.characteristics) {
// If formula includes characteristic name
//console.log("Testing :", ch, WFRP4E.characteristics[ch].toLowerCase());
if (formula.includes(game.wfrp4e.config.characteristics[ch].toLowerCase())) {
// Determine if it's looking for the bonus or the value
if (formula.includes('bonus')) {
formula = formula.replace("bonus de " + game.wfrp4e.config.characteristics[ch].toLowerCase(), this.actor.characteristics[ch].bonus);
formula = formula.replace(game.wfrp4e.config.characteristics[ch].toLowerCase() + " bonus", this.actor.characteristics[ch].bonus);
}
else
formula = formula.replace(game.wfrp4e.config.characteristics[ch].toLowerCase(), this.actor.characteristics[ch].value);
}
}
}
// If AoE - wrap with AoE ( )
if (aoe)
formula = "AoE (" + formula.capitalize() + ")";
//console.log("calculateSpellAttributes -> " + formula );
return formula.capitalize();
}*/
/*---------------------------------------------------------------------*/
// Converters area
if (typeof Babele !== 'undefined') {
Babele.get().register({
module: 'wh4-fr-translation',
lang: 'fr',
dir: 'compendium'
})
Babele.get().registerConverters({
"career_skills": (skills_list) => {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("skill")
//DEBUG: console.log( "Thru here ...", compendium, skills_list);
if (skills_list) {
let i;
let len = skills_list.length;
let re = /(.*)\((.*)\)/i;
for (i = 0; i < len; i++) {
skills_list[i] = skills_list[i].trim();
for (let compData of validCompendiums) {
let translItem = game.babele.translate(compData.metadata.id, { name: skills_list[i], type: "skill" }, true)
let transl = translItem?.name || undefined
if (!transl) transl = skills_list[i]
//console.log("List ...", skills_list[i], compData.metadata.id, translItem);
if (transl == skills_list[i]) {
let res = re.exec(skills_list[i]);
if (res) {
//console.log("Matched/split:", res[1], res[2]);
let subword = game.i18n.localize(res[2].trim());
let s1 = res[1].trim() + " ()";
translItem = game.babele.translate(compData.metadata.id, { name: s1, type: "skill" }, true)
let translw = translItem?.name || undefined
if (translw && translw != s1) {
let res2 = re.exec(translw);
transl = res2[1] + "(" + subword + ")";
} else {
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 + ")";
}
}
}
skills_list[i] = transl;
if (translItem?.system)
break;
}
}
}
return skills_list;
},
"resultConverter": (results, translated) => {
//console.log("STUF PARSING", results, translated)
if (translated) {
for (let data of results) {
if (translated[`${data.range[0]}-${data.range[1]}`]) {
data.text = translated[`${data.range[0]}-${data.range[1]}`]
}
}
return results
}
// Auto patch
if (results[0].text.includes("wfrp4e-core.career-descriptions")) {
if (game.system.version.match("7.")) {
results[0].text = "wfrp4e-core.journals"
} else {
results[0].text = "wfrp4e-core.journal-entries"
}
}
if (results[0].text.includes("wfrp4e-core.journal")) {
for (let data of results) {
let career = data.text.match(/{(.*)}/)
//console.log(">>>>>", career)
if (career && career[1]) {
let careerFR = Babele.instance.converters.career_careergroup(career[1])
data.text = data.text.replace(career[1], careerFR)
}
}
}
if (results[0].documentCollection) {
return Babele.instance.converters.tableResults(results)
}
return results
},
"npc_details": (details) => {
//console.log("DETAILS: ", details);
let newDetails = duplicate(details);
if (details.species?.value)
newDetails.species.value = game.i18n.localize(details.species.value);
if (details.gender?.value)
newDetails.gender.value = game.i18n.localize(details.gender.value);
if (details.class?.value)
newDetails.class.value = game.i18n.localize(details.class.value);
return newDetails;
},
"career_talents": (talents_list) => {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("talent")
let i;
if (talents_list) {
let len = talents_list.length;
let re = /(.*)\((.*)\)/i;
for (i = 0; i < len; i++) {
for (let compData of validCompendiums) {
let translItem = game.babele.translate(compData.metadata.id, { name: talents_list[i] }, true);
//console.log("Search talent name:", compData.metadata.id, talents_list[i], translItem);
let transl = translItem?.name || undefined
if (!transl) transl = talents_list[i]
if (transl == talents_list[i]) {
let res = re.exec(talents_list[i]);
if (res) {
let subword = game.i18n.localize(res[2].trim());
let s1 = res[1].trim(); // No () in talents table
translItem = game.babele.translate(compData.metadata.id, { name: s1 }, true)
let translw = translItem?.name || undefined
console.log("Search talent name:", compData.metadata.id, s1, translw);
if (translw && translw != s1) {
transl = translw + " (" + subword + ")";
}
}
}
talents_list[i] = transl;
if (translItem?.system)
break;
}
}
}
return talents_list;
},
"npc_characteristics": (chars) => { // Auto-convert char names in the sheet
for (let key in chars) {
let char = chars[key];
//console.log("Was here !", key, char );
let abrev = char["abrev"];
let toTransl = "CHAR." + abrev;
if (game.i18n.localize(toTransl) != toTransl) { // Manages unknown language
char["label"] = game.i18n.localize("CHAR." + abrev);
char["abrev"] = game.i18n.localize("CHARAbbrev." + abrev);
}
}
return chars;
},
"bestiary_traits": (beast_traits, translations) => {
if (!beast_traits) {
console.log("No beast traits found here ...")
return beast_traits
}
//console.log("TRANS:", beast_traits)
for (let trait_en of beast_traits) {
let special = "";
let nbt = "";
let name_en = trait_en.name.trim(); // strip \r in some traits name
if (!trait_en.name || trait_en.name.length == 0) {
console.log("Wrong item name found!!!!")
continue
}
//console.log(">>>>>>>> Parsing", trait_en.name)
if (trait_en.type == "trait") {
//console.log("Trait translation", compmod, trait_en)
if (name_en.includes("Tentacles")) { // Process specific Tentacles case
let re = /(.d*)x Tentacles/i;
let res = re.exec(name_en);
if (res && res[1])
nbt = res[1] + "x ";
name_en = "Tentacles";
} else if (name_en.includes("(") && name_en.includes(")")) { // Then process specific traits name with (xxxx) inside
let re = /(.*) \((.*)\)/i;
let res = re.exec(name_en);
name_en = res[1]; // Get the root traits name
special = " (" + game.i18n.localize(res[2].trim()) + ")"; // And the special keyword
}
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("trait")
for (let compData of validCompendiums) {
let trait_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true)
if (trait_fr?.system) {
trait_fr.name = trait_fr.name || trait_en.name
trait_en.name = nbt + trait_fr.name + special;
trait_en.system.description.value = trait_fr.system.description.value;
if (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());
}
break // Translation has been found, skip other compendiums
}
}
} else if (trait_en.type == "skill") {
if (name_en.includes("(") && name_en.includes(")")) { // Then process specific skills name with (xxxx) inside
let re = /(.*) +\((.*)\)/i;
let res = re.exec(name_en);
name_en = res[1].trim(); // Get the root skill name
special = " (" + game.i18n.localize(res[2].trim()) + ")"; // And the special keyword
}
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("skill")
for (let compData of validCompendiums) {
let trait_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true)
if (trait_fr?.system) {
//console.log(">>>>> Skill ?", name_en, special, trait_fr.name, trait_fr);
trait_fr.name = trait_fr.name || name_en
trait_en.name = trait_fr.name + special;
trait_en.system.description.value = trait_fr.system.description.value;
break; // Translation has been found, skip other compendiums
}
}
} else if (trait_en.type == "prayer") {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("prayer")
for (let compData of validCompendiums) {
let trait_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true)
if (trait_fr?.system) {
//DEBUG : console.log(">>>>> Prayer ?", name_en, special, trait_fr.name );
WFRP4FrTranslation.parseSpellContent(trait_en)
trait_fr.name = trait_fr.name || name_en
trait_en.name = trait_fr.name + special;
if (trait_fr.system?.description?.value) {
trait_en.system.description.value = trait_fr.system.description.value;
}
break;
}
}
} else if (trait_en.type == "spell") {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("spell")
for (let compData of validCompendiums) {
let trait_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true)
if (trait_fr?.system) {
//DEBUG : console.log(">>>>> Spell ?", name_en, special, trait_fr);
WFRP4FrTranslation.parseSpellContent(trait_en)
trait_fr.name = trait_fr.name || name_en
trait_en.name = trait_fr.name + special;
if (trait_fr.system?.description?.value) {
trait_en.system.description.value = trait_fr.system.description.value;
}
break;
}
}
} else if (trait_en.type == "talent") {
if (name_en.includes("(") && name_en.includes(")")) { // Then process specific skills name with (xxxx) inside
let re = /(.*) +\((.*)\)/i;
let res = re.exec(name_en);
name_en = res[1].trim(); // Get the root talent name, no parenthesis this time...
special = " (" + game.i18n.localize(res[2].trim()) + ")"; // And the special keyword
}
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("talent")
for (let compData of validCompendiums) {
let trait_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true)
if (trait_fr?.system) {
trait_fr.name = trait_fr.name || name_en // Security since babele v10
//console.log(">>>>> Talent ?", trait_fr, name_en, special, trait_fr.name);
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
trait_en.name = trait_fr.name.trim() + special
if (trait_fr.system?.description?.value) { // Why ???
trait_en.system.description.value = trait_fr.system.description.value;
}
}
break;
}
}
} else if (trait_en.type == "career") {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("career")
for (let compData of validCompendiums) {
let career_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true);
if (career_fr?.system) {
trait_en.name = career_fr.name || trait_en.name
// DEBG: console.log(">>>>> Career ?", career_fr.name );
trait_en.system = duplicate(career_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) {
let trapping_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true);
if (trapping_fr?.system) {
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
trait_en.name = trapping_fr.name || trait_en.name
if (trapping_fr.system?.description?.value) {
trait_en.system.description.value = trapping_fr.system.description.value
}
break;
}
}
}
}
//console.log(">>>>>>>><OUTPUT", beast_traits)
return beast_traits
},
// To avoid duplicateing class for all careers
"generic_localization": (value) => {
let ret = value
if (value) {
ret = game.i18n.localize(value.trim());
if (!ret) ret = value
}
return ret
},
"trapping_qualities_flaws": (value) => {
if (value) {
let newQF = [];
//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);
}
let oldName = newQF[i].name
newQF[i].name = game.i18n.localize(oldName)
if (!newQF[i].name) newQF[i].name = oldName
}
return newQF;
}
},
// Search back in careers the translated name of the groupe (as it is the name of the level career itself)
"career_careergroup": (value) => {
// Manage exception - Dirty hack
if (value == 'Slayer') {
return "Tueur";
}
if (value == 'Druidic Priest') {
return "Druide";
}
//console.log("Carre groupe : ", value )
// Per default
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("career")
for (let compData of validCompendiums) {
let newName = game.babele.translate(compData.metadata.id, { name: value }).name
if (!newName) newName = value
return newName
}
ui.notifications.error("Impossible de trouver la carrière " + value + ". Elle n'est probablement pas traduite.", { permanent: true })
return value
},
"mutations_modifier": (value) => { // This is really UGLYYYY i know, but i started like this and discovered afterward that many strings were not easy to automate... Sorry :)
//console.log("Parsing mutation :", value);
value = value.toLowerCase();
value = value.replace("gain a broken condition if you fail a test derived from ", "Gagnez un état Brisé si vous échouez à un test dérivé de ");
value = value.replace("weapon skill", "Capacité de Combat");
value = value.replace("ballistic skill", "Capacité de Tir");
value = value.replace("strength", "Force");
value = value.replace("toughness", "Endurance");
value = value.replace("agility", "Agilité");
value = value.replace("dexterity", "Dextérité");
value = value.replace("willpower", "Force Mentale");
value = value.replace("fellowship", "Sociabilité");
value = value.replace("initiative", "Initiative");
value = value.replace("intelligence", "Intelligence");
value = value.replace("armor points to the head", "PA à la Tête");
value = value.replace("subject to frenzy", "Sujet à la Frénésie");
value = value.replace("you do not scar", "Aucune cicatrice");
value = value.replace("movement", "Mouvement");
value = value.replace("armor points to all locations", "PA sur tout le corps");
value = value.replace("to any test when alone", "à tout les tests lorsque seul");
value = value.replace("track", "Pistage");
value = value.replace("to any test not hurting another", "à tout les Tests n'aggressant pas autrui");
value = value.replace("on tests to hurt", "pour les tests impliquant une agression")
value = value.replace("to all language tests when speaking", "à tout les Tests de Langue lorsque vous parlez");
value = value.replace("on perception tests involving sight", "aux Tests de Perception impliquant la Vue");
value = value.replace("to all Sociabilité tests", "à tout les Tests de Sociabilité");
return value;
},
"talent_name": (name, translation) => {
console.log("NAME !!!", name, translation)
},
"effects": (effects, translations) => {
if (!effects) return;
if (!translations) 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
},
"diseases_effects": (effects, translations) => {
if (!effects) return;
for (let i = 0; i < effects.length; i++) {
let effect = effects[i];
let label = effect.label;
let gravity = "";
if (label.includes("(") && label.includes(")")) { // Then process specific skills name with (xxxx) inside
let re = /(.*) +\((.*)\)/i;
let res = re.exec(label);
label = res[1].trim(); // Get the gravity
gravity = " (" + game.i18n.localize(res[2].trim()) + ")"; // And the special keyword
}
effect.label = game.i18n.localize(label) + gravity;
}
},
// Auto-translate duration
"spells_duration_range_target_damage": (value) => {
return WFRP4FrTranslation.processSpellContent(value);
}
});
}
});
/*---------------------------------------------------------------------*/
Hooks.once('ready', () => {
import("https://www.uberwald.me/fvtt_appcount/count-class-ready.js").then(moduleCounter => {
console.log("ClassCounter loaded", moduleCounter)
moduleCounter.ClassCounter.registerUsageCount("wh4-fr-translation")
}).catch(err =>
console.log("No stats available, giving up.")
)
});

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,10 @@
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "7.1.4",
"esmodules": [
"babele-register.js",
"addon-register.js",
"modules/babele-register.js",
"modules/addon-register.js",
"modules/import-stat-2.js",
"./loadScripts.js"
"modules/loadScripts.js"
],
"styles": [
"patch-styles.css"

View File

@ -1,366 +0,0 @@
/*
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)"
];
game.wfrp4e.config.speciesSkills["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)"
];
game.wfrp4e.config.speciesSkills["halfling"] = [
"Charme",
"Résistance à l'alcool",
"Esquive",
"Pari",
"Marchandage",
"Intuition",
"Langue (Mootland)",
"Savoir (Reikland)",
"Perception",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)"
];
game.wfrp4e.config.speciesSkills["helf"] = [
"Calme",
"Divertissement (Chant)",
"Evaluation",
"Langue (Eltharin)",
"Commandement",
"Corps à corps (Base)",
"Orientation",
"Perception",
"Musicien (Au choix)",
"Projectiles (Arc)",
"Voile",
"Natation"
];
game.wfrp4e.config.speciesSkills["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
]
game.wfrp4e.config.speciesTalents["dwarf"] = [
"Résistance à la Magie",
"Vision Nocturne",
"Lire/Ecrire, Impitoyable",
"Déterminé, Obstiné",
"Costaud",
0
]
game.wfrp4e.config.speciesTalents["halfling"] = [
"Sens Aiguisé (Gout)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
2
];
game.wfrp4e.config.speciesTalents["helf"] = [
"Sens Aiguisé (Vue)",
"Imperturbable, Perspicace",
"Vision Nocturne",
"Seconde Vue, Sixième Sens",
"Lire/Ecrire",
0
]
game.wfrp4e.config.speciesTalents["welf"] = [
"Sens Aiguisé (Vue)",
"Dur à cuire, Seconde Vue",
"Vision Nocturne",
"Nomade",
"Lire/Ecrire, Très Résistant",
0
]
/************************************************************************************/
static perform_rnhd_patch() {
game.wfrp4e.config.species['gnome'] = 'Gnome';
game.wfrp4e.config.speciesSkills["gnome"] = [
"Focalisation (Ulgu)",
"Charme",
"Résistance à l'alcool",
"Esquive",
"Divertissement (Au choix)",
"Ragot",
"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",
"Chanceux, Imitation",
"Vision Nocturne",
"Pêcheur, Lire/Ecrire",
"Seconde Vue, Sixième Sens",
"Petit",
0
];
}
}
game.wfrp4e.config.subspecies["human"]["reiklander"] = {
name: "Reiklander",
skills: [
"Soins aux animaux",
"Charme",
"Calme",
"Evaluation",
"Ragot",
"Marchandage",
"Langue (Bretonnien)",
"Langue (Wastelander)",
"Commandement",
"Savoir (Reikland)",
"Corps à corps (Base)",
"Projectiles (Arc)"
],
talents: [
"Destinée",
"Affable, Perspicace",
3
]
}
if (game.wfrp4e.config.subspecies["welf"]["harioth"]) { // Archives Empire
game.wfrp4e.config.subspecies["welf"]["harioth"] = {
name: "Harioth",
talents: [
"Sens Aiguisé (Vue)",
"Dur à cuire, Seconde Vue",
"Vision Nocturne",
"Lire/Ecrire, Très Résistant",
"Nomade",
"Youngblood",
0
]
}
game.wfrp4e.config.subspecies["halfling"]["ashfield"] = {
name: "Ashfield",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Calme",
"Intuition",
"Langue (Mootish)",
"Projectiles (Au choix)"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Sens Aiguisé (Vue), Etiquette (Soldats)",
1
]
}
game.wfrp4e.config.subspecies.halfling["brambledown"] = {
name: "Brambledown",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Langue (Mootish) ",
"Orientation",
"Survie en extérieur ",
"Natation"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Sociable, Voyageur aguerri",
1
]
}
game.wfrp4e.config.subspecies.halfling["brandysnap"] = {
name: "Brandysnap",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Soins aux animaux",
"Pari",
"Langue (Mootish)",
"Métier (Herboriste)"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Maître Artisan (Fermier), Costaud",
1
]
}
game.wfrp4e.config.subspecies.halfling["hayfoot"] = {
name: "Hayfoot",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Gamble",
"Pari",
"Evaluation",
"Langue (Mootish)"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Négociateur, Etiquette (Guildes)",
1
]
}
game.wfrp4e.config.subspecies.halfling["hollyfoot"] = {
name: "Hollyfoot",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Subornation",
"Marchandage",
"Ragot",
"Langue (Mootish)"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Maître Artisan (Au choix), Doigts de fée",
1
]
}
game.wfrp4e.config.subspecies.halfling["hayfoot—hollyfoot"] = {
name: "Hayfoot—Hollyfoot",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",
"Discrétion (Au choix)",
"Métier (Cuisinier)",
"Subornation",
"Marchandage",
"Ragot",
"Langue (Mootish)"
],
talents: [
"Sens Aiguisé (Goût)",
"Vision Nocturne",
"Résistant (Chaos)",
"Petit",
"Ergoteur, Numismate",
1
]
}
game.wfrp4e.config.subspecies.halfling["lostpockets"] = {
name: "Lostpockets",
skills: [
"Charme",
"Résistance à l'alcool",
"Marchandage",
"Savoir (Reikland)",
"Escamotage",