Compare commits

...

28 Commits

Author SHA1 Message Date
b2fbf46a4f Integration SoC + traduction des roles d'equipage 2024-10-11 20:12:50 +02:00
533709281b Merge pull request 'Convert items from Sea of Claws and translate skills for vehicle roles' (#104) from pallando/foundryvtt-wh4-lang-fr-fr:soc into v10
Reviewed-on: #104
2024-10-11 20:09:51 +02:00
d9f7dfa5e8 Merge branch 'v10' into soc 2024-10-10 10:54:28 +02:00
1bb7d0b248 Translate vehicle roles in actors compendium 2024-10-10 10:41:09 +02:00
95018f1d48 Fix #103 2024-10-08 20:56:51 +02:00
fc4fa1deb5 Update scripts 2024-10-08 20:52:09 +02:00
37f3eb3997 Translate actor vehicle roles 2024-10-06 18:30:10 +02:00
3c7366ce04 Fix typo 2024-10-06 18:28:09 +02:00
1d0f390a18 Add Sea of Claws tables to options 2024-10-06 18:27:31 +02:00
d61e2d5666 Convert Sea of Claws items 2024-10-06 17:23:42 +02:00
3f0dcc1ea2 Add converter for crew roles 2024-10-06 17:23:16 +02:00
1f1d871e53 Align to v8.1.0 2024-10-02 08:28:20 +02:00
c04d47a99d Fix some effects not working since warhammer library usage 2024-09-29 23:12:34 +02:00
005452eaf0 Fix creation de perso 2024-09-08 18:09:10 +02:00
e801cfe06b Fix creation de perso 2024-09-08 18:08:12 +02:00
f7fec1fba2 Fix compendium issue 2024-09-06 22:40:54 +02:00
f6202d70e0 Limit v12 version 2024-09-06 13:15:57 +02:00
43312b86db Alignement sur WFRP v8 2024-09-05 21:39:33 +02:00
a01fec2367 Prepare FR module for v8 2024-09-05 17:26:05 +02:00
c0e42f7f59 New release with effects fixes 2024-06-11 07:57:54 +02:00
f0a0b055ea Merge pull request 'Fix WoM effects for robes and enchanted staff' (#102) from pallando/foundryvtt-wh4-lang-fr-fr:fixes into v10
Reviewed-on: #102
2024-06-11 07:52:17 +02:00
c51877f945 Fix table import 2024-06-09 17:08:53 +02:00
e7a56e15a2 Fix EOL for core tables 2024-06-08 01:51:43 +02:00
35ae4012f6 Fix end of lines 2024-06-08 01:45:05 +02:00
3cec04ae8c Put missing 'T' in table 2024-06-08 00:41:59 +02:00
b7bb897a46 Fix WoM effects for robes and enchanted staff 2024-06-08 00:27:35 +02:00
4ebaad012b Merg scripts properly 2024-06-07 07:09:07 +02:00
8a5c62fafd Fix v12 warnings 2024-06-06 22:46:40 +02:00
235 changed files with 12630 additions and 10835 deletions

View File

@ -1,5 +1,6 @@
[Dolphin]
Timestamp=2023,2,28,20,42,35.428
HeaderColumnWidths=407,65,124,124
Timestamp=2024,10,8,20,19,27.19
Version=4
ViewMode=1
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
"Career Tables": "Table des Carrières",
"Character Creation": "Création de Personnage",
"Core Rulebook": "Livre de Base",
"Corruption & Mutation Tables": "ables de Corruption & Mutations",
"Corruption & Mutation Tables": "Tables de Corruption & Mutations",
"Critical Hit Tables": "Tables de Critiques",
"GM Booklet": "Livret du MJ",
"Hit Location": "Table de Localisation",

View File

@ -0,0 +1,81 @@
{
"label": "Items (Sea of Claws)",
"mapping": {
"description": "system.description.value",
"trappings": "system.trappings",
"class": {
"path": "system.class.value",
"converter": "generic_localization"
},
"skills": {
"path": "system.skills",
"converter": "career_skills"
},
"careergroup": {
"path": "system.careergroup.value",
"converter": "career_careergroup"
},
"talents": {
"path": "system.talents",
"converter": "career_talents"
},
"pduration": {
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"prange": {
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"ptarget": {
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"pdamage": {
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"test": {
"path": "system.test",
"converter": "role_skills"
},
"tests": "system.tests.value",
"sduration": {
"path": "system.duration.value",
"converter": "spells_duration_range_target_damage"
},
"srange": {
"path": "system.range.value",
"converter": "spells_duration_range_target_damage"
},
"starget": {
"path": "system.target.value",
"converter": "spells_duration_range_target_damage"
},
"sdamage": {
"path": "system.damage.value",
"converter": "spells_duration_range_target_damage"
},
"penalty": "system.penalty.value",
"location": {
"path": "system.location.value",
"converter": "generic_localization"
},
"durationValue": "system.duration.value",
"durationUnit": "system.duration.unit",
"contraction": "system.contraction.value",
"incubationValue": "system.incubation.value",
"incubationUnit": "system.incubation.unit",
"symptoms": "system.symptoms.value",
"permanent": "system.permanent.value",
"special": "system.special.value",
"qualities": {
"path": "system.qualities.value",
"converter": "trapping_qualities_flaws"
},
"flaws": {
"path": "system.flaws.value",
"converter": "trapping_qualities_flaws"
}
}
}

100
fr.json
View File

@ -193,6 +193,8 @@
"SETTINGS.TABLE_oops":"Maladresse!",
"SETTINGS.TABLE_species":"Espèces",
"SETTINGS.TABLE_wrath":"Colère des Dieux",
"SETTINGS.TABLE_port-stay-events":"Port Stay Events",
"SETTINGS.TABLE_shipboard-events":"Shipboard Events",
"SETTINGS.useWoMOvercast":"Utiliser les règles de sur-incantation de Winods of Magic",
"SETTINGS.useWoMOvercastHint":"Utiliser les règles de sur-incantation proposées par le supplément Winds of Magic, cf page 23.",
"SETTINGS.ChannellingIngredients":"Ingedients de Focalisation",
@ -367,6 +369,8 @@
"ITEM.Ritual":"Rituel",
"ITEM.Standard":"Standard",
"ITEM.TestSkill":"Test de compétence",
"ITEM.Roles":"Roles",
"ITEM.VitalRoles":"Roles vitaux",
"BleedCrit":"L'hémorrage de <b>{name}</b> coagule un peu : 1 Hémorragie peut-être retirée.",
"BleedFail":"<b>{name}</b> meur de sa perte de sang !",
@ -601,6 +605,9 @@
"Law": "Loi",
"SinReduced":"Péché réduit de 1",
"TargetingCancelled":"Ciblage échoué: Un Test opposé est déja en cours",
"Halved":"Divisé par 2",
"SkillsOr":"ou",
"TestPlaceholder":"e.g. Compétence d'arme, Projectiles (Poudre Noire), Résistance",
"Career Selector":"Selecteur de Carrière",
"Completed":"Completé",
@ -844,6 +851,11 @@
"CHARGEN.Message.ReplacedTalent":"<p>Remplacement de <b>{talent}</b> par <b>{replacement}</b>!</p>",
"CHARGEN.SkillsTalents.ReplaceTalentDialog.Content":"<p>Voulez vous remplacer {talent} avec {replacement}?</p>",
"CHARGEN.SkillsTalents.ReplaceTalentDialog.Title":"Remplacer un Talent",
"CHARGEN.Message.Income":"<p><b>Revenu:</b> {quantity} {name}</p>",
"CHARGEN.SkillsTalents.Traits":"Traits",
"CHARGEN.Species.ExtraSpeciesOptions":"Options spéciales des espèces",
"CHARGEN.Species.RandomTalents":"{num} Talents aléatoires",
"CHARGEN.Trappings.RollIncome":"Lancer pour le Revenu",
"CAREER.DifferentClass": "Entrée dans une nouvelle Classe",
"CAREER.LeaveIncomplete": "Départ d'une carrière incomplète",
@ -1089,6 +1101,7 @@
"CHAT.VehicleTBTooltipMultiply":"{number} × BE",
"CHAT.VehicleTBTooltipSubtract":"BE - {number}",
"CHAT.Vital":"Vital",
"CHAT.DiseaseRollError":"Une erreur s'est produite lors du jet d'incubation ou de durée de la maladie.",
"Error.SpeciesSkills" : "Impossible d'ajouter des compétences pour les races",
"Error.SpeciesTalents" : "Impossible d'ajouter des talents pour les races",
@ -1756,6 +1769,22 @@
"NAME.Arcane":"Arcane",
"NAME.Lingering":"Persistant",
"NAME.FearExtendedTest":"Test étendu de Peur",
"NAME.ArcaneMagic":"Magie des Arcanes",
"NAME.ChaosMagic":"Magie du Chaos",
"NAME.Distract":"Distraire",
"NAME.Ethereal":"Ethéré",
"NAME.FastHands":"Mains agiles",
"NAME.Frenzy":"Frénésie",
"NAME.FuriousAssault":"Assaut féroce",
"NAME.MagicResistanceTalent":"Résistance à la Magie",
"NAME.MagicResistanceTrait":"Résistance à la Magie",
"NAME.MagicalSense":"Sens de la Magie",
"NAME.PettyMagic":"Magie Mineure",
"NAME.Schemer":"Intrigant",
"NAME.SeaLegsTalent":"Pied marin",
"NAME.SecondSight":"Seconde vue",
"NAME.WarWizard":"Mage de guerre",
"NAME.Witch":"Sorcier!",
"SPEC.Tiny" : "Minuscule",
"SPEC.Little" : "Très petite",
@ -1765,6 +1794,19 @@
"SPEC.Enormous" : "Enorme",
"SPEC.Monstrous" : "Monstrueuse",
"SPEC.Vehicle": "Véhicule",
"SPEC.Any":"Any",
"SPEC.Cathayan":"Cathayan",
"SPEC.Eltharin":"Elthárin",
"SPEC.Hearing":"Ouie",
"SPEC.Horse":"Cheval",
"SPEC.Lute":"Luth",
"SPEC.Rural":"Rural",
"SPEC.Sight":"Vue",
"SPEC.Sing":"Chant",
"SPEC.Singing":"Chanter",
"SPEC.Smell":"Odorat",
"SPEC.Underground":"Sous-terrain",
"SPEC.Urban":"Urbain",
"SPELL.Lore":"Domaine:",
@ -2100,6 +2142,26 @@
"VEHICLE.Starting":"Démarre",
"VEHICLE.Type":"Type de véhicule",
"VEHICLE.WeekLabel":"Label de Semaine",
"VEHICLE.AssignedActors":"Acteur(s) assigné(s)",
"VEHICLE.Change":"Changer",
"VEHICLE.ChooseSkill":"Selectionnez la compétence à utiliser",
"VEHICLE.Delete":"Supprimer ?",
"VEHICLE.HandlingNoPenalty":"Encombrement en dessous du maximum : aucune pénalité.",
"VEHICLE.HandlingPenalty":"Les tests de Maneouvre on un malus de -{penalty} DR.",
"VEHICLE.LabelError":"Entrez un label pour le jet",
"VEHICLE.ManannsMoodRolls":"Jet d'Humeur de Manann",
"VEHICLE.MoraleRolls":"Jet de Moral",
"VEHICLE.Move":"Mouvement de Véhicule",
"VEHICLE.NewRole":"Nouveau role",
"VEHICLE.NoManannsMoodModifiers":"Aucun modificateur d'humeur",
"VEHICLE.NoMoraleModifiers":"Aucun modificateur de moral",
"VEHICLE.NoSkill":"Cet acteur n'a aucune compétence utilisable avec ce role",
"VEHICLE.O":"O",
"VEHICLE.Roles":"Roles ",
"VEHICLE.S":"S",
"VEHICLE.SellCargo":"Vendre la cargaison",
"VEHICLE.VehicleCrew":"Equipage du véhicule",
"VEHICLE.VehicleMorale":"Moral du véhicule",
"CONFIGURE.CalcTokenSize" : "Calculer automatiquement la taille des Tokens",
"CONFIGURE.CalcRun" : "Calculer automatiquement la vitesse de course",
@ -2172,7 +2234,8 @@
"EFFECT.AffectTheSourceOfFear":"Tests affectés par la source de la Peur",
"EFFECT.AffectTheSourceOfFearName":"Tests qui affectent {name}",
"EFFECT.DeletingEffectItems":"Suppression des items d'effets: {items}",
"EFFECT.BlackpowderShock":"Contre-coup de Poudre Noire",
"GRIEVANCE.Warning1":"Attention",
"GRIEVANCE.Warning2":": Cette information est envoyé sur l'espace Github, qui est un espace publique, donc le Tag Discord est préférable. Sinon, contactez moi (MooMan) directement. Si vous avez l'impression que le bug concerne le module FR, contactez LeRatierBretonnier (Discord Foundry FR)",
"GRIEVANCE.Warning3":"Avant de soumettre un rapport de bug",
@ -2493,6 +2556,39 @@
"BREAKDOWN.ShieldMoo":"Défense échouée - Ignore Shield AP ({ignored})",
"BREAKDOWN.Undamaging":"<strong>Inoffensive</strong>: {originalAP} AP * 2 = {modifiedAP}",
"BREAKDOWN.Weakpoints":"Points faibles - Ignore {ignored} ({item})",
"BREAKDOWN.Zzap":"Zzap! - Ignore {ignored}"
"BREAKDOWN.Zzap":"Zzap! - Ignore {ignored}",
"Heal Wounds": "Soigner les blessures",
"Heal": "Soigner" ,
"Staunch": "Bander",
"Staunch Bleeding Conditions": "Soigner des Hémoragies",
"Acrobatie Equestre": "Acrobatie Equestre",
"No penalty to dodging on horseback": "Pas de pénalité pour esquiver à cheval",
"Suave": "Affable",
"Animal Affinity": "Affinité avec les animaux",
"Ambidextrous": "Ambidextre",
"Pure Soul": "Âme pure",
"Gunner": "Artilleur",
"Artistic": "Artiste",
"Furious Assault": "Assaut furieux",
"Magical Attacks" : "Attaques magiques",
"Daemonic Ward": "Barrière démoniaque",
"Relies on two hands": "Nécessite les deux mains",
"Useless": "Inutile",
"WH":{
"TransferType":{
"Crew":"Equipage"
}
},
"CORRUPTION.Major":"Majeur",
"CORRUPTION.Minor":"Mineur",
"CORRUPTION.Moderate":"Modérée",
"EFFECT.CalculationBonusModifier":"CBM",
"EFFECT.CalculationBonusModifiers":"Calcul des modificateurs",
"EFFECT.CharacteristicsInitial":"Caractéristiques (Initiale)",
"EFFECT.CharacteristicsModifier":"Caractéristiques (Modifiée)",
"SHEET.Encumbrance":"Encombrement",
"SHEET.ExperienceLog":"Journal d'Expérince"
}

View File

@ -8,7 +8,7 @@
}
],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "7.2.0",
"version": "8.1.2",
"esmodules": [
"modules/babele-register.js",
"modules/addon-register.js",
@ -117,10 +117,10 @@
}
],
"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-7.2.0.zip",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-8.1.2.zip",
"id": "wh4-fr-translation",
"compatibility": {
"minimum": "11",
"minimum": "12",
"verified": "12"
},
"relationships": {

View File

@ -1,10 +1,11 @@
/************************************************************************************/
//import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
import { WH4FRPatchConfig } from "./config-patch.js";
import {TranslatedCompendium} from "../../babele/script/translated-compendium.js";
/************************************************************************************/
const _patch_eis = () => {
if (game.wfrp4e.config && game.wfrp4e.config.symptoms && game.wfrp4e.config.symptoms["delirium"] ) {
if (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.";
@ -369,7 +370,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
/************************************************************************************/
/* Additionnal hooks ready */
Hooks.once('ready', () => {
Hooks.on('ready', () => {
if (game.user.isGM) {
let chatData = {
@ -380,7 +381,10 @@ Hooks.once('ready', () => {
}
ChatMessage.create(chatData);
}
// Patch function for effects
game.wfrp4e.utility.findKey = warhammer.utility.findKey
/** New modifiers */
game.wfrp4e.config.difficultyModifiers = {
"veasy": 60,
@ -396,7 +400,7 @@ Hooks.once('ready', () => {
}
game.wfrp4e.config.difficultyLabels = {
"veasy": "Trés Facile (+60)",
"veasy": "Très Facile (+60)",
"easy": "Facile (+40)",
"banal": "Banal (+30)",
"average": "Accessible (+20)",
@ -408,8 +412,7 @@ Hooks.once('ready', () => {
"doom": "Maudit (-40)"
}
console.log("WFRP4E-TRANSLATION | Loading timeout");
//setTimeout( __check_fix_wrong_modules, 2000, true, false);
setTimeout(__check_fix_wrong_modules, 20000, true, true);
setTimeout(__add_actors_translation, 21000, false, true);

View File

@ -268,9 +268,37 @@ Hooks.once('init', () => {
}
}
}
return skills_list;
return skills_list
},
"role_skills": (skills) => {
let skills_list = skills.split(',');
let skillsFR = game.babele.converters.career_skills(skills_list);
return skillsFR.join(', ')
},
"process_effects": (effectsData, translations, data, tc, tc_translations) => {
//console.log("Effects :", effectsData, translations, data, tc, tc_translations)
for (let e of effectsData) {
let origName = e.name
e.name = tc_translations.name || game.i18n.localize(e.name)
if ( e.flags?.wfrp4e?.scriptData) {
for (let script of e.flags.wfrp4e.scriptData) {
if (script?.label) {
// Quand le label du script est strictement identique au nom de l'item concerné
if ( script.label.toLowerCase() == origName.toLowerCase() ) {
script.label = e.name
} else if (script.label.toLowerCase().includes("tests to affect")) {
script.label = script.label.replace("Tests to affect", "Tests relatifs à ")
} else if (script.label.toLowerCase().includes("using torn muscle")) {
script.label = script.label.replace("Using Torn Muscle", "Utilisation du muscle déchiré ")
} else {
script.label = game.i18n.localize(script.label)
}
}
}
}
}
return effectsData
},
"resultConverter": (results, translated) => {
//console.log("STUF PARSING", results, translated)
if (translated) {
@ -300,7 +328,7 @@ Hooks.once('init', () => {
}
}
if (results[0].documentCollection) {
return game.babele.instance.converters.tableResults(results)
return game.babele.converters.tableResults(results)
}
return results
},
@ -487,6 +515,17 @@ Hooks.once('init', () => {
break;
}
}
} else if (trait_en.type == "vehicleRole") {
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("vehicleRole")
for (let compData of validCompendiums) {
let role_fr = game.babele.translate(compData.metadata.id, trait_en, true);
if (role_fr?.system) {
trait_en.name = role_fr.name || trait_en.name
// DEBG: console.log(">>>>> Role ?", role_fr.name );
trait_en.system = foundry.utils.duplicate(role_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) {

View File

@ -4,10 +4,7 @@ export class WH4FRPatchConfig {
/************************************************************************************/
static translateSkillList( skillList) {
let compendiumName = 'wfrp4e-core.skills' // Per default
if (game.system.version.match("7.")) {
compendiumName = 'wfrp4e-core.items'
}
let compendiumName = 'wfrp4e-core.items'
let newList = [];
for( let compName of skillList) {
@ -32,10 +29,7 @@ export class WH4FRPatchConfig {
/************************************************************************************/
static translateTalentList( talentList) {
let compendiumName = 'wfrp4e-core.talents' // Per default
if (game.system.version.match("7.")) {
compendiumName = 'wfrp4e-core.items'
}
let compendiumName = 'wfrp4e-core.items'
let newList = [];
for( let talentLine of talentList) {
@ -86,8 +80,10 @@ export class WH4FRPatchConfig {
/************************************************************************************/
static patch_species_skills( ) {
console.log("Patching species skills....");
for (let speciesName in game.wfrp4e.config.speciesSkills) {
let speciesComp = game.wfrp4e.config.speciesSkills[speciesName];
console.log("SpeciesName", speciesName, speciesComp);
game.wfrp4e.config.speciesSkills[speciesName] = this.translateSkillList( speciesComp )
}
}
@ -102,10 +98,7 @@ export class WH4FRPatchConfig {
/************************************************************************************/
static patch_career() {
let compendiumName = 'wfrp4e-core.careers' // Per default
if (game.system.version.match("7.")) {
compendiumName = 'wfrp4e-core.items'
}
let compendiumName = 'wfrp4e-core.items'
if ( game.wfrp4e.tables.career) {
for( let row of game.wfrp4e.tables.career.rows) {
@ -128,7 +121,7 @@ export class WH4FRPatchConfig {
/************************************************************************************/
static perform_patch() {
if (game.user.isGM) {
let coreC7 = game.modules.find(mod => mod.id == "wfrp4e-core")
if (!coreC7 || !coreC7.active) {
@ -138,8 +131,7 @@ export class WH4FRPatchConfig {
}
// Detect and patch as necessary
if (game.wfrp4e.config?.talentBonuses && game.wfrp4e.config.talentBonuses["vivacité"] == undefined) {
console.log("Patching WFRP4E now ....");
if (game.wfrp4e.config?.talentBonuses ) {
game.wfrp4e.config.qualityDescriptions["distract"] = game.i18n.localize("WFRP4E.Properties.Distract"); // Patch missing quality
game.wfrp4e.config.talentBonuses = {

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
MANIFEST-000760
MANIFEST-000820

View File

@ -1,7 +1,7 @@
2024/06/06-22:05:54.498036 7fcfb2a006c0 Recovering log #758
2024/06/06-22:05:54.508511 7fcfb2a006c0 Delete type=3 #756
2024/06/06-22:05:54.508571 7fcfb2a006c0 Delete type=0 #758
2024/06/06-22:06:40.979294 7fcfb16006c0 Level-0 table #763: started
2024/06/06-22:06:40.979314 7fcfb16006c0 Level-0 table #763: 0 bytes OK
2024/06/06-22:06:40.986553 7fcfb16006c0 Delete type=0 #761
2024/06/06-22:06:40.993209 7fcfb16006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal.pages!suuYN87Al1ZZWtQQ.jhgNnhWhrkOpKs1B' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.246176 7f8fad6006c0 Recovering log #818
2024/10/09-12:33:51.256600 7f8fad6006c0 Delete type=3 #816
2024/10/09-12:33:51.256689 7f8fad6006c0 Delete type=0 #818
2024/10/09-12:34:27.883711 7f8fab2006c0 Level-0 table #823: started
2024/10/09-12:34:27.883739 7f8fab2006c0 Level-0 table #823: 0 bytes OK
2024/10/09-12:34:27.890855 7f8fab2006c0 Delete type=0 #821
2024/10/09-12:34:27.897380 7f8fab2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal.pages!suuYN87Al1ZZWtQQ.jhgNnhWhrkOpKs1B' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/06/06-20:54:36.421316 7fcfb2a006c0 Recovering log #754
2024/06/06-20:54:36.431498 7fcfb2a006c0 Delete type=3 #752
2024/06/06-20:54:36.431579 7fcfb2a006c0 Delete type=0 #754
2024/06/06-21:16:20.284455 7fcfb16006c0 Level-0 table #759: started
2024/06/06-21:16:20.284514 7fcfb16006c0 Level-0 table #759: 0 bytes OK
2024/06/06-21:16:20.327048 7fcfb16006c0 Delete type=0 #757
2024/06/06-21:16:20.401073 7fcfb16006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal.pages!suuYN87Al1ZZWtQQ.jhgNnhWhrkOpKs1B' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.814238 7f8facc006c0 Recovering log #814
2024/10/09-12:31:29.823788 7f8facc006c0 Delete type=3 #812
2024/10/09-12:31:29.823840 7f8facc006c0 Delete type=0 #814
2024/10/09-12:32:50.243762 7f8fab2006c0 Level-0 table #819: started
2024/10/09-12:32:50.243784 7f8fab2006c0 Level-0 table #819: 0 bytes OK
2024/10/09-12:32:50.251307 7f8fab2006c0 Delete type=0 #817
2024/10/09-12:32:50.267529 7f8fab2006c0 Manual compaction at level-0 from '!journal!3IgmiprzLB6Lwenc' @ 72057594037927935 : 1 .. '!journal.pages!suuYN87Al1ZZWtQQ.jhgNnhWhrkOpKs1B' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000762
MANIFEST-000822

View File

@ -1,7 +1,7 @@
2024/06/06-22:05:54.510086 7fcfb3e006c0 Recovering log #760
2024/06/06-22:05:54.520324 7fcfb3e006c0 Delete type=3 #758
2024/06/06-22:05:54.520387 7fcfb3e006c0 Delete type=0 #760
2024/06/06-22:06:40.964988 7fcfb16006c0 Level-0 table #765: started
2024/06/06-22:06:40.965009 7fcfb16006c0 Level-0 table #765: 0 bytes OK
2024/06/06-22:06:40.972320 7fcfb16006c0 Delete type=0 #763
2024/06/06-22:06:40.979118 7fcfb16006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.258939 7f8fac2006c0 Recovering log #820
2024/10/09-12:33:51.269186 7f8fac2006c0 Delete type=3 #818
2024/10/09-12:33:51.269310 7f8fac2006c0 Delete type=0 #820
2024/10/09-12:34:27.897515 7f8fab2006c0 Level-0 table #825: started
2024/10/09-12:34:27.897549 7f8fab2006c0 Level-0 table #825: 0 bytes OK
2024/10/09-12:34:27.904796 7f8fab2006c0 Delete type=0 #823
2024/10/09-12:34:27.932543 7f8fab2006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/06/06-20:54:36.435801 7fcfb34006c0 Recovering log #756
2024/06/06-20:54:36.446523 7fcfb34006c0 Delete type=3 #754
2024/06/06-20:54:36.446619 7fcfb34006c0 Delete type=0 #756
2024/06/06-21:16:20.247619 7fcfb16006c0 Level-0 table #761: started
2024/06/06-21:16:20.247668 7fcfb16006c0 Level-0 table #761: 0 bytes OK
2024/06/06-21:16:20.284176 7fcfb16006c0 Delete type=0 #759
2024/06/06-21:16:20.401044 7fcfb16006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.829285 7f8fae0006c0 Recovering log #816
2024/10/09-12:31:29.893000 7f8fae0006c0 Delete type=3 #814
2024/10/09-12:31:29.893129 7f8fae0006c0 Delete type=0 #816
2024/10/09-12:32:50.259667 7f8fab2006c0 Level-0 table #821: started
2024/10/09-12:32:50.259717 7f8fab2006c0 Level-0 table #821: 0 bytes OK
2024/10/09-12:32:50.267226 7f8fab2006c0 Delete type=0 #819
2024/10/09-12:32:50.267570 7f8fab2006c0 Manual compaction at level-0 from '!folders!3uquYH73ttCdoH0I' @ 72057594037927935 : 1 .. '!items!ylFhk7mGZOnAJTUT' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000760
MANIFEST-000820

View File

@ -1,7 +1,7 @@
2024/06/06-22:05:54.535617 7fcfb3e006c0 Recovering log #758
2024/06/06-22:05:54.546232 7fcfb3e006c0 Delete type=3 #756
2024/06/06-22:05:54.546283 7fcfb3e006c0 Delete type=0 #758
2024/06/06-22:06:40.986761 7fcfb16006c0 Level-0 table #763: started
2024/06/06-22:06:40.986809 7fcfb16006c0 Level-0 table #763: 0 bytes OK
2024/06/06-22:06:40.993088 7fcfb16006c0 Delete type=0 #761
2024/06/06-22:06:40.993226 7fcfb16006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal.pages!cZtNgayIw2QFhC9u.ts265H1XkisLgdow' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.286728 7f8fae0006c0 Recovering log #818
2024/10/09-12:33:51.296474 7f8fae0006c0 Delete type=3 #816
2024/10/09-12:33:51.296577 7f8fae0006c0 Delete type=0 #818
2024/10/09-12:34:27.926209 7f8fab2006c0 Level-0 table #823: started
2024/10/09-12:34:27.926239 7f8fab2006c0 Level-0 table #823: 0 bytes OK
2024/10/09-12:34:27.932402 7f8fab2006c0 Delete type=0 #821
2024/10/09-12:34:27.932587 7f8fab2006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal.pages!cZtNgayIw2QFhC9u.ts265H1XkisLgdow' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/06/06-20:54:36.466388 7fcfb34006c0 Recovering log #754
2024/06/06-20:54:36.476745 7fcfb34006c0 Delete type=3 #752
2024/06/06-20:54:36.476826 7fcfb34006c0 Delete type=0 #754
2024/06/06-21:16:20.363505 7fcfb16006c0 Level-0 table #759: started
2024/06/06-21:16:20.363562 7fcfb16006c0 Level-0 table #759: 0 bytes OK
2024/06/06-21:16:20.400707 7fcfb16006c0 Delete type=0 #757
2024/06/06-21:16:20.401115 7fcfb16006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal.pages!cZtNgayIw2QFhC9u.ts265H1XkisLgdow' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.912415 7f8fac2006c0 Recovering log #814
2024/10/09-12:31:29.921942 7f8fac2006c0 Delete type=3 #812
2024/10/09-12:31:29.921994 7f8fac2006c0 Delete type=0 #814
2024/10/09-12:32:50.267797 7f8fab2006c0 Level-0 table #819: started
2024/10/09-12:32:50.267848 7f8fab2006c0 Level-0 table #819: 0 bytes OK
2024/10/09-12:32:50.274015 7f8fab2006c0 Delete type=0 #817
2024/10/09-12:32:50.299677 7f8fab2006c0 Manual compaction at level-0 from '!journal!cZtNgayIw2QFhC9u' @ 72057594037927935 : 1 .. '!journal.pages!cZtNgayIw2QFhC9u.ts265H1XkisLgdow' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000760
MANIFEST-000820

View File

@ -1,7 +1,7 @@
2024/06/06-22:05:54.485070 7fcfb3e006c0 Recovering log #758
2024/06/06-22:05:54.496169 7fcfb3e006c0 Delete type=3 #756
2024/06/06-22:05:54.496286 7fcfb3e006c0 Delete type=0 #758
2024/06/06-22:06:40.951380 7fcfb16006c0 Level-0 table #763: started
2024/06/06-22:06:40.951454 7fcfb16006c0 Level-0 table #763: 0 bytes OK
2024/06/06-22:06:40.958729 7fcfb16006c0 Delete type=0 #761
2024/06/06-22:06:40.979070 7fcfb16006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal.pages!yzw9I0r3hCK7PJnz.sPNCYj2nR3Cp3jHd' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.231508 7f8fae0006c0 Recovering log #818
2024/10/09-12:33:51.242888 7f8fae0006c0 Delete type=3 #816
2024/10/09-12:33:51.242941 7f8fae0006c0 Delete type=0 #818
2024/10/09-12:34:27.890986 7f8fab2006c0 Level-0 table #823: started
2024/10/09-12:34:27.891013 7f8fab2006c0 Level-0 table #823: 0 bytes OK
2024/10/09-12:34:27.897193 7f8fab2006c0 Delete type=0 #821
2024/10/09-12:34:27.897402 7f8fab2006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal.pages!yzw9I0r3hCK7PJnz.sPNCYj2nR3Cp3jHd' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/06/06-20:54:36.406301 7fcfb34006c0 Recovering log #754
2024/06/06-20:54:36.416875 7fcfb34006c0 Delete type=3 #752
2024/06/06-20:54:36.416980 7fcfb34006c0 Delete type=0 #754
2024/06/06-21:16:20.204896 7fcfb16006c0 Level-0 table #759: started
2024/06/06-21:16:20.204934 7fcfb16006c0 Level-0 table #759: 0 bytes OK
2024/06/06-21:16:20.247088 7fcfb16006c0 Delete type=0 #757
2024/06/06-21:16:20.247377 7fcfb16006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal.pages!yzw9I0r3hCK7PJnz.sPNCYj2nR3Cp3jHd' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.798950 7f8fac2006c0 Recovering log #814
2024/10/09-12:31:29.809632 7f8fac2006c0 Delete type=3 #812
2024/10/09-12:31:29.809693 7f8fac2006c0 Delete type=0 #814
2024/10/09-12:32:50.251480 7f8fab2006c0 Level-0 table #819: started
2024/10/09-12:32:50.251516 7f8fab2006c0 Level-0 table #819: 0 bytes OK
2024/10/09-12:32:50.259226 7f8fab2006c0 Delete type=0 #817
2024/10/09-12:32:50.267549 7f8fab2006c0 Manual compaction at level-0 from '!journal!50u8VAjdmovyr0hx' @ 72057594037927935 : 1 .. '!journal.pages!yzw9I0r3hCK7PJnz.sPNCYj2nR3Cp3jHd' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000760
MANIFEST-000820

View File

@ -1,7 +1,7 @@
2024/06/06-22:05:54.472889 7fcfb2a006c0 Recovering log #758
2024/06/06-22:05:54.482510 7fcfb2a006c0 Delete type=3 #756
2024/06/06-22:05:54.482574 7fcfb2a006c0 Delete type=0 #758
2024/06/06-22:06:40.958847 7fcfb16006c0 Level-0 table #763: started
2024/06/06-22:06:40.958868 7fcfb16006c0 Level-0 table #763: 0 bytes OK
2024/06/06-22:06:40.964877 7fcfb16006c0 Delete type=0 #761
2024/06/06-22:06:40.979096 7fcfb16006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.217921 7f8facc006c0 Recovering log #818
2024/10/09-12:33:51.228098 7f8facc006c0 Delete type=3 #816
2024/10/09-12:33:51.228152 7f8facc006c0 Delete type=0 #818
2024/10/09-12:34:27.867410 7f8fab2006c0 Level-0 table #823: started
2024/10/09-12:34:27.867439 7f8fab2006c0 Level-0 table #823: 0 bytes OK
2024/10/09-12:34:27.874695 7f8fab2006c0 Delete type=0 #821
2024/10/09-12:34:27.897331 7f8fab2006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2024/06/06-20:54:36.390344 7fcfb2a006c0 Recovering log #754
2024/06/06-20:54:36.401236 7fcfb2a006c0 Delete type=3 #752
2024/06/06-20:54:36.401373 7fcfb2a006c0 Delete type=0 #754
2024/06/06-21:16:20.167277 7fcfb16006c0 Level-0 table #759: started
2024/06/06-21:16:20.167332 7fcfb16006c0 Level-0 table #759: 0 bytes OK
2024/06/06-21:16:20.204704 7fcfb16006c0 Delete type=0 #757
2024/06/06-21:16:20.247359 7fcfb16006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.784241 7f8fad6006c0 Recovering log #814
2024/10/09-12:31:29.794019 7f8fad6006c0 Delete type=3 #812
2024/10/09-12:31:29.794079 7f8fad6006c0 Delete type=0 #814
2024/10/09-12:32:50.236330 7f8fab2006c0 Level-0 table #819: started
2024/10/09-12:32:50.236385 7f8fab2006c0 Level-0 table #819: 0 bytes OK
2024/10/09-12:32:50.243649 7f8fab2006c0 Delete type=0 #817
2024/10/09-12:32:50.267500 7f8fab2006c0 Manual compaction at level-0 from '!tables!4l60Lxv8cpsyy2Cg' @ 72057594037927935 : 1 .. '!tables.results!tfaYKDZqu7kgZvRG.yvbwKursaixh2dby' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000403
MANIFEST-000463

View File

@ -1,8 +1,8 @@
2024/06/06-22:05:54.522431 7fcfb2a006c0 Recovering log #401
2024/06/06-22:05:54.533382 7fcfb2a006c0 Delete type=3 #399
2024/06/06-22:05:54.533456 7fcfb2a006c0 Delete type=0 #401
2024/06/06-22:06:40.972432 7fcfb16006c0 Level-0 table #406: started
2024/06/06-22:06:40.972455 7fcfb16006c0 Level-0 table #406: 0 bytes OK
2024/06/06-22:06:40.978838 7fcfb16006c0 Delete type=0 #404
2024/06/06-22:06:40.979138 7fcfb16006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/06/06-22:06:40.979181 7fcfb16006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/10/09-12:33:51.272460 7f8facc006c0 Recovering log #461
2024/10/09-12:33:51.284039 7f8facc006c0 Delete type=3 #459
2024/10/09-12:33:51.284106 7f8facc006c0 Delete type=0 #461
2024/10/09-12:34:27.905003 7f8fab2006c0 Level-0 table #466: started
2024/10/09-12:34:27.905036 7f8fab2006c0 Level-0 table #466: 0 bytes OK
2024/10/09-12:34:27.913460 7f8fab2006c0 Delete type=0 #464
2024/10/09-12:34:27.932562 7f8fab2006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/10/09-12:34:27.932596 7f8fab2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2024/06/06-20:54:36.451532 7fcfb2a006c0 Recovering log #397
2024/06/06-20:54:36.462207 7fcfb2a006c0 Delete type=3 #395
2024/06/06-20:54:36.462346 7fcfb2a006c0 Delete type=0 #397
2024/06/06-21:16:20.327305 7fcfb16006c0 Level-0 table #402: started
2024/06/06-21:16:20.327387 7fcfb16006c0 Level-0 table #402: 0 bytes OK
2024/06/06-21:16:20.363229 7fcfb16006c0 Delete type=0 #400
2024/06/06-21:16:20.401092 7fcfb16006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/06/06-21:16:20.401155 7fcfb16006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/10/09-12:31:29.897703 7f8fad6006c0 Recovering log #457
2024/10/09-12:31:29.907971 7f8fad6006c0 Delete type=3 #455
2024/10/09-12:31:29.908069 7f8fad6006c0 Delete type=0 #457
2024/10/09-12:32:50.274184 7f8fab2006c0 Level-0 table #462: started
2024/10/09-12:32:50.274224 7f8fab2006c0 Level-0 table #462: 0 bytes OK
2024/10/09-12:32:50.281749 7f8fab2006c0 Delete type=0 #460
2024/10/09-12:32:50.299697 7f8fab2006c0 Manual compaction at level-0 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)
2024/10/09-12:32:50.299742 7f8fab2006c0 Manual compaction at level-1 from '!journal!056ILNNrLiPq3Gi3' @ 72057594037927935 : 1 .. '!journal.pages!yfZxl4I7XAuUF6r3.apXmOlZRmGT4GreB' @ 0 : 0; will stop at (end)

View File

@ -17,5 +17,5 @@ let scriptLoader = `export default function()
}`
fs.writeFileSync(".modules/loadScripts.js", scriptLoader)
fs.writeFileSync("./modules/loadScripts.js", scriptLoader)
console.log(`Packed ${count} scripts`);

7
scripts/.directory Normal file
View File

@ -0,0 +1,7 @@
[Dolphin]
SortOrder=1
SortRole=modificationtime
Timestamp=2024,10,8,20,1,53.617
Version=4
ViewMode=1
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

View File

@ -0,0 +1 @@
args.fields.slBonus += this.actor.system.characteristics.wp.bonus;

View File

@ -0,0 +1,4 @@
if (args.test.spell)
{
args.test.result.other.push(`<strong>${this.effect.name}</strong>: Automatic Failure`)
}

View File

@ -0,0 +1 @@
await args.actor.addCondition("ablaze");

View File

@ -30,7 +30,7 @@
}
else
{
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}

View File

@ -0,0 +1,89 @@
let characteristics = {
"ws" : 15,
"bs" : 10,
"s" : 10,
"t" : 15,
"i" : 10,
"ag" : 0,
"dex" : 0,
"int" : 10,
"wp" : 10,
"fel" : 10
}
let skills = ["Intimidate", "Commandement" , "Perception"]
let skillAdvancements = [10, 10, 10]
let talents = ["Combat Aware", "Drilled", "Menaçant", "Robust"]
let trappings = ["Arme simple", "Mail Coat", "Mail Chausses"]
let specialItems = [
]
let items = [];
let updateObj = this.actor.toObject();
for (let ch in characteristics)
{
updateObj.system.characteristics[ch].modifier += characteristics[ch];
}
for (let item of specialItems) {
let newItem
if (item.type == "weapon") {
newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
} else if (item.type == "trapping") {
newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
} else {
newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
}
items.push(newItem.toObject())
}
for (let index = 0; index < skills.length; index++)
{
let skill = skills[index]
let skillItem;
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
skillItem.system.advances.value = skillAdvancements[index];
items.push(skillItem);
}
}
for (let talent of talents)
{
let talentItem = await game.wfrp4e.utility.findTalent(talent)
if (talentItem)
{
items.push(talentItem.toObject());
}
else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
{
trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -0,0 +1,2 @@
const sl = this.effect.getFlag("wfrp4e-archives3", "sl");
args.item.system.damage.value += `+${sl}`;

View File

@ -1,8 +1,12 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
let value = await ValueDialog.create("Entrer la valeur d'Armure", this.effect.name);
let value = this.item.specifier;
if (!value)
{
value = await ValueDialog.create({text : "Enter Armour value", title : this.effect.name});
}
if (value)
{
this.item.updateSource({"system.specification.value" : value});
this.item.updateSource({"system.specification.value" : value, name : this.item.baseName});
}
}

View File

@ -1,11 +1,11 @@
let skill = `Métier (${this.item.parenthesesText})`
let skill = `${game.i18n.localize("NAME.Trade")} (${this.item.parenthesesText})`
let currentCareer = this.actor.system.currentCareer;
let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
if (!currentCareer) return
let inCurrentCareer = currentCareer.system.skills.includes(skill);
let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {};
if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
{
@ -14,6 +14,6 @@ if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
else
{
craftsmanAdded[skill] = true;
currentCareer.system.skills.push(skill);
setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
currentCareer.system.addedSkills.push(skill);
foundry.utils.setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
}

View File

@ -1,4 +1,4 @@
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choose Location");
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choisissez Location");
if (choice[0])
{
this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})

View File

@ -10,13 +10,10 @@ let characteristics = {
"wp" : 25,
"fel" : 10
}
//let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"]
let skills = ["Calme", "Equive", "Intimidation", "Intuition", "Commandement", "Savoir (Guerre)", "Perception"]
let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Commandement" , "Lore (Warfare)", "Perception"]
let skillAdvancements = [15, 15, 15, 15, 15, 10, 10]
let talents = ["Vigilance", "Combat Instinctif", "Feinte", "Exaltant", "Déterminé", "Seigneur de guerre"]
// TODO
let trappings = ["Arme simple", "Bouclier"]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Resolute", "War Leader"]
let trappings = ["Arme simple", "Shield"]
let items = [];
let updateObj = this.actor.toObject();
@ -62,7 +59,7 @@ for (let trapping of trappings)
{
trappingItem = trappingItem.toObject()
equip(trappingItem)
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
@ -75,14 +72,4 @@ for (let trapping of trappings)
updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -0,0 +1,6 @@
const target = args.actor;
if (target.has("Ethereal") || target.has("Corruption")) {
args.totalWoundLoss += 6;
args.modifiers.other.push({label: this.effect.name, value: 6})
}

View File

@ -0,0 +1 @@
return args.skill?.name !== game.i18n.localize("NAME.Endurance");

112
scripts/4ylzjgUdHY5D0yVh.js Normal file
View File

@ -0,0 +1,112 @@
let characteristics = {
"ws" : 25,
"bs" : 10,
"s" : 15,
"t" : 15,
"i" : 25,
"ag" : 20,
"dex" : 0,
"int" : 10,
"wp" : 25,
"fel" : 10
}
let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Langue (Battle)", "Commandement" , "Lore (Warfare)", "Perception"]
let skillAdvancements = [15, 15, 15, 15, 10, 15, 10, 10]
let talents = ["Combat Aware", "Combat Master", "Combat Reflexes", "Inspiring", "Resolute", "War Leader"]
let trappings = ["Arme simple", "Shield", "Plate Breastplate", "Plate Bracers", "Plate Helm", "Plate Leggings"]
let specialItems = []
let items = [];
let updateObj = this.actor.toObject();
for (let ch in characteristics)
{
updateObj.system.characteristics[ch].modifier += characteristics[ch];
}
for (let item of specialItems) {
let newItem
if (item.type == "weapon") {
newItem = new ItemWfrp4e({ name: item.name, type: item.type, system: { equipped: true, damage: {value: item.damage}} })
} else if (item.type == "trapping") {
newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type, system: { worn: true, trappingType: { value: item.trappingType} } } )
} else {
newItem = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: item.name, type: item.type })
}
items.push(newItem.toObject())
}
for (let index = 0; index < skills.length; index++)
{
let skill = skills[index]
let skillItem;
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
skillItem.system.advances.value = skillAdvancements[index];
items.push(skillItem);
}
}
for (let talent of talents)
{
let talentItem = await game.wfrp4e.utility.findTalent(talent)
if (talentItem)
{
items.push(talentItem.toObject());
}
else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
{
trappingItem = trappingItem.toObject()
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
let filters = [
{
property : "type",
value : "weapon"
},
{
property : "system.weaponGroup.value",
value : ["twohanded", "polearm"]
}
]
items = items.concat(await ItemDialog.createFromFilters(filters, 1, "Choisissez an appropriate Polearm or Two-Handed Weapon"))
let ride = await Dialog.confirm({title : "Skill", content : "Add Chaos Steed and +20 Ride (Horse)?"})
if (ride)
{
let skill = await game.wfrp4e.utility.findSkill("Ride (Horse)")
skill = skill.toObject();
skill.system.advances.value = 20;
items = items.concat({name : "Chaos Steed", type: "trapping", "system.trappingType.value" : "misc"}, skill)
}
updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -13,7 +13,7 @@ let characteristics = {
let skills = ["Esquive", "Perception"]
let skillAdvancements = [10, 10]
let talents = ["Flee!", "Marksman"]
let trappings = ["Hand Weapon"]
let trappings = ["Arme simple"]
let items = [];
let updateObj = this.actor.toObject();
@ -48,7 +48,7 @@ for (let talent of talents)
}
else
{
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
@ -59,13 +59,13 @@ for (let trapping of trappings)
{
trappingItem = trappingItem.toObject()
equip(trappingItem)
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
else
{
ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
@ -73,13 +73,3 @@ updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}

View File

@ -10,11 +10,10 @@ let characteristics = {
"wp" : 15,
"fel" : 0
}
//let skills = ["Cool", "Dodge", "Intimidate", "Leadership"]
let skills = ["Calme", "Esquive", "Intimidation", "Commandement"]
let skills = ["Calme", "Esquive", "Intimidate", "Commandement" ]
let skillAdvancements = [15, 15, 10, 5]
let talents = ["Vigilance", "Combat Instinctif", "Feinte", "Déterminé"]
let trappings = ["Cotte de Mailles", "Chausses de Mailles", "Coiffe de Mailles", "Arme simple", "Bouclier"]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Resolute"]
let trappings = ["Mail Coat", "Mail Chausses", "Mail Coif", "Arme simple", "Shield"]
let items = [];
let updateObj = this.actor.toObject();
@ -60,7 +59,7 @@ for (let trapping of trappings)
{
trappingItem = trappingItem.toObject()
equip(trappingItem)
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
@ -73,14 +72,4 @@ for (let trapping of trappings)
updateObj.name = this.effect.name + " " + updateObj.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -1,5 +1,5 @@
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
const test = 'Métier (Charpentier)';
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`;
const test = 'Trade (Carpenter)';
const difficulty = 'challenging';
const target = 40;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -0,0 +1,6 @@
const visor = this.item.getFlag('wfrp4e', 'visor');
if (!visor)
args.fields.modifier -= 10;
else
args.fields.modifier -= 20;

View File

@ -10,10 +10,10 @@ let characteristics = {
"wp" : 35,
"fel" : 15
}
let skills = ["Cool", "Dodge", "Intimidate", "Intuition", "Leadership", "Lore (Warfare)", "Perception"]
let skills = ["Calme", "Esquive", "Intimidate", "Intuition", "Commandement" , "Lore (Warfare)", "Perception"]
let skillAdvancements = [25, 15, 25, 25, 30, 20, 20]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Luck", "Resolute", "Unshakable", "War Leader"]
let trappings = ["Hand Weapon", "Shield"]
let talents = ["Combat Aware", "Combat Reflexes", "Feint", "Inspiring", "Chance", "Resolute", "Unshakable", "War Leader"]
let trappings = ["Arme simple", "Shield"]
let items = [];
let updateObj = this.actor.toObject();
@ -48,7 +48,7 @@ for (let talent of talents)
}
else
{
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
}
@ -59,27 +59,17 @@ for (let trapping of trappings)
{
trappingItem = trappingItem.toObject()
equip(trappingItem)
trappingItem.system.equipped.value = true;
items.push(trappingItem);
}
else
{
ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
}
}
updateObj.name = updateObj.name += " " + this.effect.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
let value = await ValueDialog.create("Saisir lde Savoir de lancer de sort", this.effect.name, "", Object.values(game.wfrp4e.config.magicLores));
let value = await ValueDialog.create({text : "Enter Spellcasting Lore", title : this.effect.name}, "", Object.values(game.wfrp4e.config.magicLores));
if (value)
{
this.item.updateSource({"system.specification.value" : value});

View File

@ -1,6 +1,6 @@
if (args.test.result.castOutcome == "failure")
{
ValueDialog.create("Sasir le nombre de Blessures perdues en échange de DR", this.effect.name, "0").then(async value => {
ValueDialog.create({text : "Enter Wounds Lost to gain SL", title : this.effect.name}, "0").then(async value => {
value = Math.clamped(value, 0, 3)
if (value == 0)
{
@ -8,11 +8,11 @@ if (args.test.result.castOutcome == "failure")
}
else if (Number.isNumeric(value))
{
this.script.scriptNotification(`Perte de ${value} Blessures`)
this.script.notification(`Lost ${value} Wounds`)
this.actor.modifyWounds(-1 * value)
await this.item.system.toggleEquip();
args.test.addSL(value);
args.test.preData.other.push(`<strong>${this.effect.name}</strong>: +${value} DR`)
args.test.preData.other.push(`<strong>${this.effect.name}</strong>: +${value} SL`)
}
})
}

View File

@ -0,0 +1,7 @@
const uuids = [
"Compendium.wfrp4e-core.items.Item.AcnFuDKRemLI9ey7", // Nose for Trouble
"Compendium.wfrp4e-core.items.Item.WoXShzaYkV5F6c48", // Master of Disguise
];
const items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));
await this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id});

View File

@ -1,4 +1,4 @@
const repaired_message = `<p>Fini de passer <em>l'ancre</em>.</p>`;
const repaired_message = `<p>Finished raisint <em>the anchor</em>.</p>`;
const test = 'Strength';
const difficulty = 'vhard';
const target = 20;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -9,7 +9,7 @@ let filters = [
}
]
let petty = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 6, "Choisir 6 sorts de Magie Mineure")
let petty = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie Mineure")
filters = [
@ -23,7 +23,7 @@ filters = [
}
]
let arcane = await game.wfrp4e.apps.ItemDialog.createFromFilters(filters, 9, "Choisir 9 Sorts d'Arcane")
let arcane = await ItemDialog.createFromFilters(filters, 9, "Choisissez 9 Sorts de Magie d'Arcane")
let items = petty.concat(arcane).map(i => i.toObject())

View File

@ -0,0 +1 @@
this.actor.deleteEmbeddedDocuments("ActiveEffect", [this.effect.id]);

View File

@ -1,7 +1,7 @@
let choice1 = [
{
type : "skill",
name : "Corps à corps (Base)",
name : "Melee (Basic)",
diff : {
system : {
advances : {
@ -14,7 +14,7 @@ let choice1 = [
let choice2 = [
{
type : "skill",
name : "Corps à corps (Armes d'hast)",
name : "Melee (Polearm)",
diff : {
system : {
advances : {
@ -26,14 +26,14 @@ let choice2 = [
]
let choice = await Dialog.wait({
title : "Choix",
title : "Choice",
content :
`<p>
Choisissez une option
Select your choice
</p>
<ol>
<li>Corps à corps (Base)</li>
<li>Corps à corps (Armes d'hast)</li>
<li>Melee (Basic)</li>
<li>Melee (Polearm)</li>
</ol>
`,
buttons : {
@ -44,7 +44,7 @@ let choice = await Dialog.wait({
}
},
2 : {
label : "Armes d'hast",
label : "Polearm",
callback : () => {
return choice2;
}
@ -71,9 +71,13 @@ for (let c of choice)
let item = await game.wfrp4e.utility.find(c.name, c.type)
if (item)
{
let equip = item.system.tags.has("equippable");
item = item.toObject()
equip(item);
items.push(mergeObject(item, (c.diff || {})))
if (equip)
{
item.system.equipped.value = true;
}
items.push(foundry.utils.mergeObject(item, (c.diff || {})))
}
else
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
@ -82,13 +86,3 @@ for (let c of choice)
}
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.system.worn.value = true
else if (item.type == "weapon")
item.system.equipped = true
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
item.system.worn = true
}

View File

@ -13,7 +13,7 @@ let choices = await ItemDialog.create(ItemDialog.objectToArray(symptoms), roll.t
if (choices.length)
{
let symptomEffects = duplicate(game.wfrp4e.config.symptomEffects)
let symptomEffects = foundry.utils.duplicate(game.wfrp4e.config.symptomEffects)
let added = []
for(let choice of choices)
{

View File

@ -1,8 +1,9 @@
let lore = this.effect.name.split("(")[1].split(")")[0].toLowerCase();
let spellLore = game.wfrp4e.config.magicLores[args.spell.system.lore.value].toLowerCase();
// If channelling corresponding lore
if (args.type == "channelling" && args.spell.system.lore.value == lore)
if (args.type == "channelling" && spellLore == lore)
args.prefillModifiers.slBonus += 2
// If channelling or casting different lore
else if (args.spell.system.lore.value != lore && args.spell.system.lore.value != "petty")
else if (spellLore != lore && args.spell.system.lore.value != "petty")
args.prefillModifiers.slBonus -= 1

View File

@ -0,0 +1,2 @@
args.abort = true;
this.script.notification(game.i18n.localize("SCRIPT.Sightstep"));

View File

@ -1,10 +1,10 @@
let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;
if (!actor || !(actor.system instanceof StandardActorModel))
return ui.notifications.warn("Vous devez contrôler un Acteur capable de réaliser un Test de Force");
return ui.notifications.warn("You must control an Actor capable of performing a Strength Test");
let test = await actor.setupCharacteristic("s", {
skipTargets: true,
appendTitle: " - Renflouement",
appendTitle: " - Bailing Out",
fields: {
difficulty: "challenging"
},
@ -22,7 +22,7 @@ if (test.succeeded) {
let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
if (rating <= 1) {
const scriptData = this.effect.flags.wfrp4e.scriptData;
const scriptData = this.effect.system.scriptData
scriptData[2].trigger = '';
await this.effect.update({disabled: true, "flags.wfrp4e.scriptData": scriptData});
await this.effect.update({disabled: true, "system.scriptData": scriptData});
}

View File

@ -0,0 +1 @@
return args.type !== "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name !== `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` && args.skill?.name !== game.i18n.localize("NAME.OutdoorSurvival");

View File

@ -0,0 +1,8 @@
const locations = [];
for (let [key, loc] of Object.entries(args.AP)) {
if (loc.layers?.some(i => !i.metal && i.source?.system.tags?.has("armour")))
locations.push(key);
}
this.actor.status.addArmour(1, {source: this.effect, magical: true, locations})

View File

@ -0,0 +1,18 @@
if (args.actor.has("Démoniaque")) {
args.totalWoundLoss += 3;
args.modifiers.other.push({label: this.effect.name, value: 3});
}
let test = await args.actor.setupSkill("Endurance", {
appendTitle: ` ${this.effect.name}`,
skipTargets: true,
characteristic: 't',
context: {
failure: "Received 1 Blinded Condition"
}
});
await test.roll();
if (test.failed) {
args.actor.addCondition("blinded");
}

View File

@ -0,0 +1 @@
return args.characteristic === "s" || args.characteristic === "t" || args.weapon?.system?.attackType === "melee";

View File

@ -1,9 +1,9 @@
let column = await ValueDialog.create("Selectionnez la colonne pour déterminer la Tête de Bête", "Sélectionner la colonne", "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]);
let column = await ValueDialog.create({text : "Select the column to roll on to determine Beast Head", title : "Select Column"}, "", ["Undivided", "Khorne", "Nurgle", "Slaanesh", "Tzeentch"]);
if (column)
{
let result = await game.wfrp4e.tables.rollTable("beasthead", {}, column);
this.script.scriptMessage(`<strong>${result.title}</strong><br>${result.result}`);
this.script.message(`<strong>${result.title}</strong><br>${result.result}`);
let uuid = `Compendium.${result.object.documentCollection}.${result.object.documentId}`;
let item = await fromUuid(uuid);
if (item)

View File

@ -1,3 +1,6 @@
let fatigued = args.actor.hasCondition("fatigued")
if (fatigued)
setProperty(fatigued, "flags.wfrp4e.scriptData", getProperty(fatigued, "flags.wfrp4e.scriptData").filter(s => s.trigger != "dialog"))
{
fatigued.system.scriptData = fatigued.system.scriptData.filter(s => s.trigger != "dialog")
fatigued.system._scripts = null;
}

View File

@ -0,0 +1,8 @@
const locations = [];
for (let [key, loc] of Object.entries(args.AP)) {
if (loc.layers?.some(i => i.metal))
locations.push(key);
}
this.actor.status.addArmour(1, {source: this.effect, magical: true, locations})

View File

@ -0,0 +1,5 @@
if (args.opposedTest?.attackerTest?.weapon?.name.toLowerCase().includes("unarmed")) {
const sl = this.effect.getFlag("wfrp4e-archives3", "sl");
args.totalWoundLoss += sl;
args.modifiers.other.push({label: this.effect.name, value: sl});
}

View File

@ -1,6 +1,6 @@
if (isNaN(parseInt(this.item.system.specification.value)))
{
let value = await ValueDialog.create("Saisir la valeur de Terreur", this.effect.name);
let value = await ValueDialog.create({text : "Enter Terror value", title : this.effect.name});
if (value)
{
this.item.updateSource({"system.specification.value" : value});

View File

@ -0,0 +1,7 @@
const uuids = [
"Compendium.wfrp4e-core.items.Item.bxbTiLzbaz4vdukT", // Hunter's Eye
"Compendium.wfrp4e-core.items.Item.XSb3QVB9ipPBFt56", // Shadow
];
const items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));
await this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id});

View File

@ -0,0 +1,14 @@
const uuid = "Compendium.wfrp4e-core.items.Item.mCvZAj5F6hfUZhzR";
const item = await fromUuid(uuid);
const data = item.toObject();
data.name = this.effect.name;
data.type = 'trapping';
data.system.trappingType = {value: 'clothingAccessories'};
data.system.equipped = {value: true};
const effectData = this.effect.sourceItem.effects.find(e => e.disabled).toObject();
effectData.disabled = false;
effectData.system.transferData.equipTransfer = true;
data.effects = [effectData];
const dagger = await this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id});

View File

@ -1,5 +1,5 @@
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
const test = 'Métier (Charpentier)';
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`;
const test = 'Trade (Carpenter)';
const difficulty = 'difficult';
const target = 20;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -1,5 +1,5 @@
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
const test = 'Métier (Charpentier)';
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`;
const test = 'Trade (Carpentry)';
const difficulty = 'easy';
const target = 20;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -0,0 +1,2 @@
let amount = this.effect.sourceTest.result.baseSL;
args.fields.successBonus += amount;

View File

@ -1,4 +1,4 @@
const repaired_message = `<p>Réparation finie de<em>${this.item.name}</em>.</p>`;
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`;
const test = 'Voile';
const difficulty = 'easy';
const target = 10;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -0,0 +1,37 @@
let lore = await ValueDialog.create({text : "Choisissez Lore", title : "Lore"}, "", {"fire" : "Feu", "death" : "Mort", "metal" : "Métal", "shadow" : "Ombres"});
let filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : "petty"
}
]
let petty = await ItemDialog.createFromFilters(filters, 3, "Choisissez 3 Sorts de Magie Mineure")
filters = [
{
property : "type",
value : "spell"
},
{
property : "system.lore.value",
value : [""]
}
]
let arcane = await ItemDialog.createFromFilters(filters, 6, "Choisissez 6 Sorts de Magie d'Arcane")
let items = petty.map(i => i.toObject()).concat(arcane.map(i => {
let spell = i.toObject();
spell.img = `modules/wfrp4e-core/icons/spells/${lore}.png`
spell.system.lore.value = lore;
return spell;
}));
this.actor.createEmbeddedDocuments("Item", items);

View File

@ -1,19 +1,9 @@
let choices = await Promise.all([game.wfrp4e.utility.findItemId("PzimjNx9Ojq4g6mV"), game.wfrp4e.utility.findItemId("rOPmyLWa37e7s9v6")])
let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisir une compétence")
let choices = await Promise.all([warhammer.utility.findItemId("PzimjNx9Ojq4g6mV"), warhammer.utility.findItemId("rOPmyLWa37e7s9v6")])
let items = await game.wfrp4e.apps.ItemDialog.create(choices, 1, "Choisissez a Skill")
items = items.map(i => i.toObject())
items.forEach(i => i.system.advances.value = 20)
items.forEach(i => equip(i))
items.forEach(i => i.system.equipped.value = true;)
this.actor.createEmbeddedDocuments("Item", items);
function equip(item)
{
if (item.type == "armour")
item.data.worn.value = true
else if (item.type == "weapon")
item.data.equipped = true
else if (item.type == "trapping" && item.data.trappingType.value == "clothingAccessories")
item.data.worn = true
}

View File

@ -0,0 +1,12 @@
if (this.actor.system.details.experience.current < 100) {
return this.script.notification(game.i18n.localize("SCRIPT.NotEnoughXP"))
}
let item = await game.wfrp4e.utility.findItem("Animal Telepathy", "trait")
this.actor.createEmbeddedDocuments("Item", [item]);
let expLog = foundry.utils.duplicate(this.actor.details.experience.log || []);
expLog.push({amount : 100, reason: item.name, spent: this.actor.details.experience.spent + 100, total: this.actor.details.experience.total, type: "spent"});
this.actor.update({
"system.details.experience.spent": this.actor.details.experience.spent + 100,
"system.details.experience.log": expLog
});

View File

@ -0,0 +1,6 @@
if (!args.itemCreated) return;
if (args.itemCreated.type !== "critical") return;
if (args.itemCreated.system.location.value.toLowerCase() !== "head") return;
if (Number(args.itemCreated.system.wounds.value) > 0) {
this.script.message(game.i18n.format("SCRIPT.Sallet", {name: args.itemCreated.parent.name, wounds: args.itemCreated.system.wounds.value}))
}

View File

@ -1,11 +1,11 @@
let skill = `Divertissement (Chant)`
let skill = `${game.i18n.localize("NAME.Entertain")} (${game.i18n.localize("SPEC.Singing")})`;
let currentCareer = this.actor.system.currentCareer;
let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
if (!currentCareer) return
let inCurrentCareer = currentCareer.system.skills.includes(skill);
let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
let perfectPitchAdded = this.actor.getFlag("wfrp4e", "perfectPitchAdded") || {};
if (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])
{
@ -14,8 +14,8 @@ if (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])
else
{
perfectPitchAdded[skill] = true;
currentCareer.system.skills.push(skill);
setProperty(this.actor, "flags.wfrp4e.perfectPitchAdded", perfectPitchAdded)
currentCareer.system.addedSkills.push(skill);
foundry.utils.setProperty(this.actor, "flags.wfrp4e.perfectPitchAdded", perfectPitchAdded)
}

View File

@ -0,0 +1 @@
return args.characteristic !== "s" && args.characteristic !== "t" && args.weapon?.system?.attackType !== "melee";

View File

@ -3,21 +3,30 @@ if (this.actor.type != "character")
return;
}
let god = await ValueDialog.create("Saisir une Déité", "Béni")
let god = await ValueDialog.create({text : "Enter a Deity", title : "Blessed"})
if (god)
{
let prayers = await game.wfrp4e.utility.findAll("prayer", "Chargement des Prières")
let prayers = await warhammer.utility.findAllItems("prayer", "Loading Prayers")
let blessings = prayers.filter(p => p.system.god.value.split(",").map(i => i.trim().toLowerCase()).includes(god.toLowerCase()) && p.system.type.value == "blessing")
let godBlessings = game.wfrp4e.config.godBlessings[god.toLowerCase()] || [];
if (god == "Old Faith")
{
blessings = await ItemDialog.create(prayers.filter(i => i.system.type.value == "blessing"), 6, {text : "Select any 6 Blessings", title : "Blessed"})
}
if (godBlessings.length)
{
blessings = blessings.concat(await Promise.all(godBlessings.filter(bls => !(blessings.map(i => i.uuid).includes(bls.uuid))).map(fromUuid)));
}
if (blessings.length)
{
this.script.scriptNotification("Ajout de " + blessings.map(i => i.name).join(", "))
this.script.notification("Adding " + blessings.map(i => i.name).join(", "))
await this.actor.createEmbeddedDocuments("Item", blessings, {fromEffect : this.effect.id})
}
else
{
this.script.scriptNotification(`Impossible de trouver des Bénédictions associées avec ${god}.`)
this.script.notification(`Impossible de trouver any Blessings associated with ${god}.`)
}
this.item.updateSource({name : this.item.name.replace("Savoir divin", god)})
this.item.updateSource({name : this.item.name.replace("Any", god)})
await this.actor.update({"system.details.god.value": god})
}

View File

@ -1,11 +1,11 @@
let skill = `Langue (Magick)`
let skill = `Language (Magick)`
let currentCareer = this.actor.system.currentCareer;
let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
if (!currentCareer) return
let inCurrentCareer = currentCareer.system.skills.includes(skill);
let inCurrentCareer = currentCareer.system.skills.concat(currentCareer.system.addedSkills).includes(skill);
let witchAdded = actor.getFlag("wfrp4e", "witchAdded") || {};
if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])
{
@ -14,6 +14,6 @@ if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])
else
{
witchAdded[skill] = true;
currentCareer.system.skills.push(skill);
setProperty(this.actor, "flags.wfrp4e.witchAdded", witchAdded)
currentCareer.system.addedSkills.push(skill);
foundry.utils.setProperty(this.actor, "flags.wfrp4e.witchAdded", witchAdded)
}

View File

@ -0,0 +1,6 @@
let blinded = args.actor.hasCondition("blinded")
if (blinded)
{
blinded.system.scriptData = blinded.system.scriptData.filter(s => s.trigger != "dialog")
blinded.system._scripts = null;
}

View File

@ -0,0 +1 @@
return !this.actor.attacker || args.item?.system?.attackType !== "melee" || args.skill?.name !== game.i18n.localize("NAME.Dodge");

View File

@ -1,5 +1,5 @@
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
const test = 'Métier (Charpente)';
const repaired_message = `<p>Réparation finie <em>${this.item.name}</em>.</p>`;
const test = 'Trade (Carpentry)';
const difficulty = 'hard';
const target = 30;
@ -24,11 +24,10 @@ const extendedTestData = {
},
effects: [
{
name: `Réparer le ${this.item.name}`,
icon: this.item.img,
flags: {
wfrp4e: {
applicationData: {
name: `Réparer ${this.item.name}`,
img: this.item.img,
system: {
transferData : {
type: "document",
documentType: "Item"
},
@ -38,7 +37,7 @@ const extendedTestData = {
script: `
let id = this.item.flags.wfrp4e.fromEffect;
let effect = this.actor.appliedEffects.find(e => e.id === id);
this.script.scriptMessage("${repaired_message}");
this.script.message("${repaired_message}");
await effect.item.delete();
`,
trigger: "deleteEffect"
@ -46,7 +45,6 @@ const extendedTestData = {
]
}
}
}
]
};

View File

@ -0,0 +1,3 @@
let amount = this.effect.sourceTest.result.overcast.usage.other.current ?? 0;
args.fields.successBonus += 2 + amount;

View File

@ -0,0 +1,7 @@
const uuids = [
"Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR", // Holy Visions
"Compendium.wfrp4e-core.items.Item.mNoCuaVbFBflfO6X", // Sixth Sense
];
const items = await Promise.all(uuids.map(uuid => fromUuid(uuid)));
await this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id});

View File

@ -0,0 +1,7 @@
const diff = foundry.utils.diffObject(this.item.toObject(), args.data);
if (args.data?.system?.APdamage?.head > this.item.system.APdamage.head) {
const result = await game.wfrp4e.tables.rollTable('armet-damage');
this.script.message(result.result);
if (result.total > 5)
delete args.data.system.APdamage.head;
}

Some files were not shown because too many files have changed in this diff Show More