From 73b70ca47fb9d88a58f7edfafa9e12e87e7cac33 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Fri, 22 Aug 2025 10:31:14 +0000 Subject: [PATCH] Import gk-greyknight-0.5.3.zip do wg-greyknights (2025-08-22T10:31:14Z) --- wg-greyknights/README.txt | 18 ++++------- wg-greyknights/module.json | 11 +++---- wg-greyknights/packs/gk-items.db | 12 ++++--- wg-greyknights/scripts/auto-loadout.js | 43 ++++++++------------------ 4 files changed, 32 insertions(+), 52 deletions(-) diff --git a/wg-greyknights/README.txt b/wg-greyknights/README.txt index 118f4bc..ecd23d5 100644 --- a/wg-greyknights/README.txt +++ b/wg-greyknights/README.txt @@ -1,13 +1,7 @@ -Grey Knights — Compendium (Wrath & Glory) v0.4.1 -Built from: GK_Foundry_GreyKnight_v5.zip (ONLY the 'foundry/*.json' files) -Built at: 2025-08-21 20:55:51 UTC +Grey Knights — Compendium (Wrath & Glory) v0.5.3 +Fix: New items lacked _id in 0.5.1; v11+ migration skipped them. This build assigns IDs and reverts to v11 folder-path pack. -How to install (manual): -1) Unzip so that you have: Data/modules/gk-greyknight/module.json (i.e. the FOLDER name == id). -2) Restart your World and enable module: 'Grey Knights — Compendium (Wrath & Glory)'. -3) Open Compendium sidebar → you will see: 'Grey Knights — Items'. -4) Import by drag&drop or context menu 'Import All'. - -Notes: -- The compendium path in module.json uses 'packs/gk-items' (no .db) per v11+ packaging. -- The actual data ships as 'packs/gk-items.db'. Foundry will auto‑migrate it to the new format on first load. +Install: +1) Replace Data/modules/gk-greyknight with this folder. +2) Start world, let Foundry migrate packs/gk-items.db -> packs/gk-items/ (LevelDB). +3) In Compendium sidebar → right-click "Grey Knights — Items" → Rebuild Index. diff --git a/wg-greyknights/module.json b/wg-greyknights/module.json index c926abd..1721d15 100644 --- a/wg-greyknights/module.json +++ b/wg-greyknights/module.json @@ -1,11 +1,7 @@ { "id": "gk-greyknight", "title": "Grey Knights — Compendium (Wrath & Glory)", - "esmodules": [ - "scripts/auto-loadout.js" - ], - "description": "Compendium pack built ONLY from the provided 'foundry/' JSONs (6 items).", - "version": "0.5.2", + "version": "0.5.3", "compatibility": { "minimum": "11", "verified": "13" @@ -22,11 +18,14 @@ { "name": "gk-items", "label": "Grey Knights — Items", - "path": "packs/gk-items.db", + "path": "packs/gk-items", "type": "Item", "system": "wrath-and-glory", "private": false } ], + "esmodules": [ + "scripts/auto-loadout.js" + ], "readme": "README.txt" } \ No newline at end of file diff --git a/wg-greyknights/packs/gk-items.db b/wg-greyknights/packs/gk-items.db index 3ccea11..55ca93e 100644 --- a/wg-greyknights/packs/gk-items.db +++ b/wg-greyknights/packs/gk-items.db @@ -2,7 +2,11 @@ {"name": "Grey Knight (Archetype)", "type": "archetype", "img": "icons/svg/book.svg", "effects": [{"_id": "uMkkBfS2rRXluXA6", "name": "Aegis of Titan — Innate Purity", "icon": "icons/svg/aura.svg", "origin": "", "disabled": false, "duration": {"startTime": null}, "changes": [{"key": "system.combat.resolve.bonus", "mode": 2, "value": 1, "priority": 20}], "transfer": true, "flags": {}}], "flags": {"wng-forsaken": {"initialization-folder": "Archetypes", "sort": 0}, "core": {}}, "system": {"tier": 4, "journal": "DMmW708Q5AQvQfuy", "species": {"name": "Adeptus Astartes", "id": "KpwHo0A92bR7iVMB"}, "faction": {"name": "Adeptus Astartes", "id": "CN5E9Z5GqfiR1MDn"}, "influence": 2, "cost": 359, "keywords": ["IMPERIUM", "ADEPTUS ASTARTES", "GREY KNIGHTS", "INQUISITION", "DAEMONHUNTERS"], "attributes": {"strength": 5, "toughness": 5, "agility": 5, "initiative": 5, "willpower": 6, "intellect": 3, "fellowship": null}, "skills": {"athletics": 3, "awareness": 3, "ballisticSkill": 5, "cunning": null, "deception": null, "insight": null, "intimidation": null, "investigation": null, "leadership": null, "medicae": null, "persuasion": null, "pilot": null, "psychicMastery": 4, "scholar": 2, "stealth": 3, "survival": 1, "tech": null, "weaponSkill": 5}, "ability": {"id": "DaEMUDPe8wmrWz70", "name": "Aegis of Titan"}, "wargear": {"freeItems": []}, "suggested": {"attributes": {"strength": null, "toughness": null, "agility": null, "initiative": null, "willpower": null, "intellect": null, "fellowship": null}, "skills": {"athletics": null, "awareness": null, "ballisticSkill": null, "cunning": null, "deception": null, "insight": null, "intimidation": null, "investigation": null, "leadership": null, "medicae": null, "persuasion": null, "pilot": null, "psychicMastery": null, "scholar": null, "stealth": null, "survival": null, "tech": null, "weaponSkill": null}, "talents": {"list": []}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755771384639, "modifiedTime": 1755771384639, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.TCmE7YmUDUVQ3xoz", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "DEb55m6iVZ0NUOxA", "_id": "qSv5JzFRjTYdw1zI"} {"name": "Nemesis Force Halberd", "type": "weapon", "img": "icons/svg/sword.svg", "effects": [], "flags": {"wng-core": {"initialization-folder": "Weapons", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "uncommon", "description": "Force Staves are laced with a complex psy-matrix that allows them to act as a psychic battery, storing psychic energy that can be released with brutal efficiency.

Nemesis: vs DAEMON/PSYKER: +1 ED (homebrew). Two‑Handed.

", "value": 2, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS, MELEE, FORCE", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 4, "bonus": 0, "rank": 0, "ap": {"base": -1, "bonus": 0, "rank": 0}, "ed": {"base": 2, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "melee", "range": {"short": 0, "medium": 0, "long": 0, "melee": 2, "thrown": null}, "ammo": {"id": ""}, "salvo": 0, "traits": {"list": [{"name": "brutal"}, {"name": "force"}, {"name": "twoHanded"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779931196, "modifiedTime": 1755779931196, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.9vfkaU0vc61t7hKO", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "85dkcvhBYli5TJrZ", "_id": "NX6bWADcIa03iGCK"} {"name": "Grey Knight Armour Integrated Storm Bolter", "type": "weapon", "img": "icons/svg/dice-target.svg", "effects": [], "flags": {"wng-core": {"initialization-folder": "Weapons", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "rare", "description": "

Integrated forearm storm bolter. Integrated: does not occupy hands; may fire while wielding two‑handed melee. Treat as Pistol for firing in melee.

", "value": 4, "keywords": "BOLT, INTEGRATED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 10, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "ranged", "range": {"short": 12, "medium": 24, "long": 36, "melee": 1, "thrown": null}, "ammo": {"id": ""}, "salvo": 1, "traits": {"list": [{"name": "brutal"}, {"name": "pistol"}, {"name": "rapidFire", "rating": "2"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779945407, "modifiedTime": 1755779945407, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.Seza6hxnXhHInk8m", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "85dkcvhBYli5TJrZ", "_id": "SDFwequVtp6WsCFj"} -{"name": "Aegis Power Armour", "type": "armour", "img": "icons/svg/shield.svg", "effects": [{"_id": "25aqxUBwyQtSAdxb", "name": "Aegis Wards (Constant)", "origin": null, "disabled": false, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": "1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/aura.svg", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "description": "", "statuses": [], "sort": 0}, {"_id": "LfRNsXknme6JLgSC", "name": "Aegis Warding Runes (Toggle)", "origin": null, "disabled": true, "duration": {"startTime": null, "combat": null, "seconds": null, "rounds": null, "turns": null, "startRound": null, "startTurn": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": "-1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {"wrath-and-glory": {"manualEffectKeys": false}, "effectmacro": {"onEnable": {"script": "// Effect Macro — toggled: ON\nif (!item) return;\nconst candidates = [\n \"system.invulnerable\",\n \"system.armour.invulnerable\",\n \"system.attributes.invulnerable\",\n \"system.defences.invulnerable\"\n];\nconst path = candidates.find(p => foundry.utils.hasProperty(item, p)) ?? \"system.invulnerable\";\nawait item.update({ [path]: true });\n\n// (opcjonalnie) podbij też wartość/bonus na aktorze — odkomentuj jeśli Twój system tego używa\n/*\nconst apaths = [\"system.combat.invulnerable.bonus\", \"system.combat.invulnerable.value\"];\nconst apath = apaths.find(p => foundry.utils.hasProperty(actor, p));\nif (apath) await actor.update({ [apath]: 1 });\n*/\n"}, "onDisable": {"script": "// Effect Macro — toggled: OFF\nif (!item) return;\nconst candidates = [\n \"system.invulnerable\",\n \"system.armour.invulnerable\",\n \"system.attributes.invulnerable\",\n \"system.defences.invulnerable\"\n];\nconst path = candidates.find(p => foundry.utils.hasProperty(item, p)) ?? \"system.invulnerable\";\nawait item.update({ [path]: false });\n\n// (opcjonalnie) wyzeruj bonus na aktorze\n/*\nconst apaths = [\"system.combat.invulnerable.bonus\", \"system.combat.invulnerable.value\"];\nconst apath = apaths.find(p => foundry.utils.hasProperty(actor, p));\nif (apath) await actor.update({ [apath]: 0 });\n*/\n"}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": "ETeghv7x8fjtIEKK", "modifiedTime": 1755820582300}, "img": "icons/svg/explosion.svg", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "description": "", "statuses": [], "sort": 0}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "unique", "description": "

Grey Knights sanctified power armour with hexagrammic wards and storm bolter forearm mount.

", "value": 9, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 5, "base": 0, "traits": {"list": [{"name": "powered", "rating": "3"}]}, "invulnerable": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755818921232, "modifiedTime": 1755820931376, "lastModifiedBy": "ETeghv7x8fjtIEKK", "exportSource": {"worldId": "gilead2", "uuid": "Item.11NZTwYXPlHBlnXC", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "K59Lb8PvaCmIrviu", "_id": "11NZTwYXPlHBlnXC"} -{"name": "Terminator Aegis (Grey Knights)", "type": "armour", "img": "icons/svg/tower.svg", "effects": [{"_id": "25aqxUBwyQtSAdxb", "name": "Aegis Wards (Constant)", "origin": null, "disabled": false, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": "1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/aura.svg", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "description": "", "statuses": [], "sort": 0}, {"_id": "LfRNsXknme6JLgSC", "name": "Aegis Warding Runes (Toggle)", "origin": null, "disabled": true, "duration": {"startTime": null, "combat": null, "seconds": null, "rounds": null, "turns": null, "startRound": null, "startTurn": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": "-1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {"wrath-and-glory": {"manualEffectKeys": false}, "effectmacro": {"onEnable": {"script": "// Effect Macro — toggled: ON\nif (!item) return;\nconst candidates = [\n \"system.invulnerable\",\n \"system.armour.invulnerable\",\n \"system.attributes.invulnerable\",\n \"system.defences.invulnerable\"\n];\nconst path = candidates.find(p => foundry.utils.hasProperty(item, p)) ?? \"system.invulnerable\";\nawait item.update({ [path]: true });\n\n// (opcjonalnie) podbij też wartość/bonus na aktorze — odkomentuj jeśli Twój system tego używa\n/*\nconst apaths = [\"system.combat.invulnerable.bonus\", \"system.combat.invulnerable.value\"];\nconst apath = apaths.find(p => foundry.utils.hasProperty(actor, p));\nif (apath) await actor.update({ [apath]: 1 });\n*/\n"}, "onDisable": {"script": "// Effect Macro — toggled: OFF\nif (!item) return;\nconst candidates = [\n \"system.invulnerable\",\n \"system.armour.invulnerable\",\n \"system.attributes.invulnerable\",\n \"system.defences.invulnerable\"\n];\nconst path = candidates.find(p => foundry.utils.hasProperty(item, p)) ?? \"system.invulnerable\";\nawait item.update({ [path]: false });\n\n// (opcjonalnie) wyzeruj bonus na aktorze\n/*\nconst apaths = [\"system.combat.invulnerable.bonus\", \"system.combat.invulnerable.value\"];\nconst apath = apaths.find(p => foundry.utils.hasProperty(actor, p));\nif (apath) await actor.update({ [apath]: 0 });\n*/\n"}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": "ETeghv7x8fjtIEKK", "modifiedTime": 1755820582300}, "img": "icons/svg/explosion.svg", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "description": "", "statuses": [], "sort": 0}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "artifact", "description": "

Grey Knights Tactical Dreadnought armour with Aegis wards and storm bolter hard‑mount.

Aegis functions: As Aegis Power Armour (constant wards + toggle runes/invulnerable), with Terminator protection values.

", "value": 10, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 7, "base": 0, "traits": {"list": [{"name": "cumbersome"}, {"name": "powered", "rating": "4"}]}, "invulnerable": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779886550, "modifiedTime": 1755779886550, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.sTGTpOfbIveLcFul", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "K59Lb8PvaCmIrviu", "_id": "9XTvCiJElW4LJij9"} -{"name": "Pilgrim Astartes Power Armor", "type": "armour", "img": "modules/wng-core/assets/icons/armour/terminator-armour.webp", "effects": [{"_id": "44rACWx99MiXXe4E", "name": "Pilgrim Disguise Penalties", "icon": "icons/svg/downgrade.svg", "origin": "", "disabled": false, "duration": {"startTime": null, "seconds": null, "turns": null, "startRound": null, "startTurn": null}, "changes": [{"key": "system.attributes.agility.bonus", "mode": 2, "value": -1, "priority": 20}, {"key": "system.skills.stealth.bonus", "mode": 2, "value": -1, "priority": 20}, {"key": "system.combat.speed", "mode": 2, "value": -1, "priority": 20}], "tint": null, "transfer": true, "flags": {}}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "rare", "description": "

Scavenged Black Templars plate, patched & lightened. Designed for incognito operations.

", "value": 6, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, BLACK TEMPLARS (DISGUISE)", "equipped": true, "rating": 4, "base": 0, "traits": {"list": [{"name": "cumbersome"}, {"name": "powered", "rating": "1"}]}, "invulnerable": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779886550, "modifiedTime": 1755779886550, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.sTGTpOfbIveLcFul", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "K59Lb8PvaCmIrviu", "_id": "2P2HioialQdFUCv6"} -{"name": "ORDO MALLEUS", "type": "keyword", "img": "modules/wng-core/assets/factions/the-inquisition.svg", "effects": [{"_id": "xs6DzM62O4RjebzK", "changes": [{"key": "system.combat.conviction.bonus", "mode": 2, "value": "1", "priority": null}, {"key": "system.corruption.current", "mode": 2, "value": "3", "priority": null}], "disabled": false, "duration": {"startTime": null, "seconds": null, "combat": null, "rounds": null, "turns": null, "startRound": null, "startTurn": null}, "transfer": true, "flags": {"wrath-and-glory": {"description": "", "migrated": true, "manualEffectKeys": true}}, "tint": "#ffffff", "origin": null, "name": "ORDO MALLEUS (Choice 1)", "description": "", "statuses": [], "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "modules/wng-core/assets/factions/the-inquisition.svg", "type": "base", "system": {"transferData": {"type": "other", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "sort": 0}, {"_id": "Q0aNWykjDCqeTtQL", "changes": [], "disabled": false, "duration": {"startTime": null, "seconds": null, "combat": null, "rounds": null, "turns": null, "startRound": null, "startTurn": null}, "transfer": true, "flags": {"wrath-and-glory": {"description": "Scholar/Investigation related to Daemons/The Warp", "changeCondition": {"0": {"description": "Scholar/Investigation related to Daemons/The Warp", "script": ""}}, "manualEffectKeys": true}}, "tint": "#ffffff", "origin": null, "name": "ORDO MALLEUS (Choice 2)", "description": "", "statuses": [], "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "modules/wng-core/assets/factions/the-inquisition.svg", "type": "base", "system": {"scriptData": [{"script": "return args.fields.pool += 2;", "label": "Bonus dice on any Scholar (Int) and Investigation (Int) Tests related to daemons and the Warp.", "trigger": "dialog", "options": {"targeter": false, "hideScript": "return ![\"scholar\", \"investigation\"].includes(args.skill);", "activateScript": "", "submissionScript": "", "deleteEffect": false, "defending": false}, "async": false}], "transferData": {"type": "other", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "sort": 0}, {"name": "Choice", "img": "modules/wng-core/assets/factions/the-inquisition.svg", "_id": "tk4CpA9MHTJ47VAe", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [{"script": "let effects = this.item.effects.contents.filter(i => i.id != this.effect.id);\n\nlet choice = await ItemDialog.create(effects, 1, {title : this.item.name, text: this.effect.name});\nchoice[0].updateSource({name : choice[0].baseName, \"system.transferData.type\" : \"document\"})", "label": "Choice", "trigger": "immediate", "options": {"targeter": false, "deleteEffect": true, "defending": false}, "async": false}], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "changes": [], "disabled": false, "duration": {"startTime": null, "seconds": null, "combat": null, "rounds": null, "turns": null, "startRound": null, "startTurn": null}, "description": "", "origin": null, "tint": "#ffffff", "transfer": true, "statuses": [], "sort": 0, "flags": {"wrath-and-glory": {"manualEffectKeys": false}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}}], "flags": {"wng-core": {"initialization-folder": "Ordos", "sort": 0}, "core": {}}, "system": {"description": "

The Daemon Hunters

Smallest amongst the Ordos, duty bound to battle daemons and the corrupting influence of Chaos. Every encounter with their foe, every scrap of arcane lore learnt, degrades body and soul. The Chamber Militant of the Ordo Malleus are the Grey Knights, making rare and terrible crusades together. 

"}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755816946335, "modifiedTime": 1755816946335, "lastModifiedBy": "ETeghv7x8fjtIEKK", "exportSource": {"worldId": "gilead2", "uuid": "Item.mpcvHYlffwcBy9gP", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "SXjZUgQ1pROPVE9j", "_id": "mpcvHYlffwcBy9gP"} +{"name": "Aegis Power Armour", "type": "armour", "img": "icons/svg/shield.svg", "effects": [{"_id": "25aqxUBwyQtSAdxb", "name": "Aegis Wards (Constant)", "icon": "icons/svg/aura.svg", "origin": "", "disabled": false, "duration": {"startTime": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": 1, "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": 1, "priority": 20}], "tint": null, "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true}}}, {"_id": "LfRNsXknme6JLgSC", "name": "Aegis Warding Runes (Toggle)", "icon": "icons/svg/explosion.svg", "origin": "", "disabled": true, "duration": {"startTime": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": 1, "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": -1, "priority": 20}], "tint": null, "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true}}}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "veryRare", "description": "

Grey Knights sanctified power armour with hexagrammic wards and storm bolter forearm mount.

", "value": 9, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 5, "base": 0, "traits": {"list": [{"name": "powered", "rating": "3"}]}, "invulnerable": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779886550, "modifiedTime": 1755779886550, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.sTGTpOfbIveLcFul", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "K59Lb8PvaCmIrviu", "_id": "11NZTwYXPlHBlnXC"} +{"name": "Terminator Aegis (Grey Knights)", "type": "armour", "img": "icons/svg/tower.svg", "effects": [{"_id": "OvE7cPAtNLDdEj6j", "name": "Aegis Wards (Constant)", "icon": "icons/svg/aura.svg", "origin": "", "disabled": false, "duration": {"startTime": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": 1, "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": 1, "priority": 20}], "tint": null, "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true}}}, {"_id": "RXHERg7YjunnEQ8h", "name": "Aegis Warding Runes (Toggle)", "icon": "icons/svg/explosion.svg", "origin": "", "disabled": true, "duration": {"startTime": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": 1, "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": -1, "priority": 20}], "tint": null, "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true}}}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "artifact", "description": "

Grey Knights Tactical Dreadnought armour with Aegis wards and storm bolter hard‑mount.

", "value": 10, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 7, "base": 0, "traits": {"list": [{"name": "cumbersome"}, {"name": "powered", "rating": "4"}]}, "invulnerable": false}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "createdTime": 1755779886550, "modifiedTime": 1755779886550, "lastModifiedBy": "8fThFXcxV83JCCcX", "exportSource": {"worldId": "gilead-wandg", "uuid": "Item.sTGTpOfbIveLcFul", "coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}}, "folder": "K59Lb8PvaCmIrviu", "_id": "9XTvCiJElW4LJij9"} +{"name": "Nemesis Falchions (Pair)", "type": "weapon", "img": "icons/svg/swords.svg", "system": {"quantity": 1, "rarity": "unique", "description": "A matched pair of sanctified force blades. When wielding both, each attack may gain either +1 bonus die to WS or +1ED. Vs DAEMON/PSYKER: +1ED. Requires PSYKER to benefit from Force.", "value": 9, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 12, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0}, "ap": {"base": -3, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ammo": {"id": ""}, "salvo": 0, "traits": {"list": [{"name": "force"}, {"name": "parry"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false, "range": {"short": 0, "medium": 0, "long": 0, "melee": 1, "thrown": null}, "category": "melee"}, "effects": [], "_id": "AUwZwmYWGCSH04m2"} +{"name": "Nemesis Warding Stave", "type": "weapon", "img": "icons/svg/spear.svg", "system": {"quantity": 1, "rarity": "unique", "description": "A sanctified force stave and ward-focus. Vs DAEMON/PSYKER: +1ED. Requires PSYKER to benefit from Force.", "value": 9, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED, 2-HANDED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 12, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0}, "ap": {"base": -1, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ammo": {"id": ""}, "salvo": 0, "traits": {"list": [{"name": "force"}, {"name": "parry"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false, "range": {"short": 0, "medium": 0, "long": 0, "melee": 2, "thrown": null}, "category": "melee"}, "effects": [], "_id": "W9Bf6IFMm7gYYhLa"} +{"name": "Psycannon", "type": "weapon", "img": "icons/svg/cannon.svg", "system": {"quantity": 1, "rarity": "unique", "description": "Anti-daemonic bolt weapon. Vs DAEMON/PSYKER: +1ED. On Critical: gains Rending (1) for the result.", "value": 9, "keywords": "BOLT, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 14, "bonus": 0, "rank": 0, "ed": {"base": 3, "bonus": 0, "rank": 0}, "ap": {"base": -2, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ammo": {"id": ""}, "salvo": 2, "traits": {"list": [{"name": "heavy", "rating": "7"}, {"name": "rapidFire", "rating": "2"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false, "range": {"short": 20, "medium": 40, "long": 60, "melee": 1, "thrown": null}, "category": "ranged"}, "effects": [], "_id": "luQa0ffP6nroOeN8"} +{"name": "Incinerator (GK)", "type": "weapon", "img": "icons/svg/fire.svg", "system": {"quantity": 1, "rarity": "unique", "description": "Psy-reactive flame projector. Vs DAEMON: +1ED. Uses a torrenting gout of warp-seared promethium.", "value": 9, "keywords": "FLAME, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 13, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0}, "ap": {"base": -1, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ammo": {"id": ""}, "salvo": 0, "traits": {"list": [{"name": "spread"}, {"name": "torrent", "rating": "3"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false, "range": {"short": 10, "medium": 15, "long": 20, "melee": 1, "thrown": null}, "category": "ranged"}, "effects": [], "_id": "7MsNVqPRCh3wSoOA"} +{"name": "Psilencer", "type": "weapon", "img": "icons/svg/silenced.svg", "system": {"quantity": 1, "rarity": "unique", "description": "High-rate psykic disruptor. Vs PSYKER: +1ED; hit PSYKER cannot Aim in the same round.", "value": 9, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 11, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}}, "ammo": {"id": ""}, "salvo": 3, "traits": {"list": [{"name": "rapidFire", "rating": "3"}, {"name": "reliable"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false, "range": {"short": 12, "medium": 24, "long": 36, "melee": 1, "thrown": null}, "category": "ranged"}, "effects": [], "_id": "qvk9TxIezbO2C5OK"} +{"name": "Psybolt Ammunition", "type": "ammo", "img": "icons/svg/bullets.svg", "system": {"quantity": 1, "rarity": "unique", "description": "Upgrade for BOLT/Storm Bolter weapons. Grants +1ED. Against DAEMON/PSYKER, attacks gain Rending (1). Apply manually to attack resolving rules; conditional effects are not automated.", "value": 5, "keywords": "BOLT, SANCTIFIED", "effect": "", "traits": {"list": []}}, "effects": [], "_id": "ozxEfipXNkP69SHr"} diff --git a/wg-greyknights/scripts/auto-loadout.js b/wg-greyknights/scripts/auto-loadout.js index 91dc372..d3d3dc7 100644 --- a/wg-greyknights/scripts/auto-loadout.js +++ b/wg-greyknights/scripts/auto-loadout.js @@ -1,7 +1,7 @@ -// gk-greyknight — auto-attach loadout (scoped + incognito revamp + ORDO MALLEUS) v0.4.9 +// gk-greyknight — auto-attach loadout (scoped + incognito + ORDO) v0.5.3 Hooks.once("ready", () => { - const PACK_KEY = "gk-greyknight.gk-items"; // our compendium - const PACK_SRC_PREFIX = `Compendium.${PACK_KEY}.`; // prefix in core.sourceId + const PACK_KEY = "gk-greyknight.gk-items"; // v11-style pack id + const PACK_SRC_PREFIX = `Compendium.${PACK_KEY}.`; const CORE = { knife: "Compendium.wng-core.items.Item.4QVBQYWXXLyvFWkj", pistol: "Compendium.wng-core.items.Item.7b2xcPWBB7up65PM", @@ -18,7 +18,6 @@ Hooks.once("ready", () => { }; const FLAG_SCOPE = "gk-greyknight"; const FLAG_DONE = "autoLoadoutDone"; - // helpers async function fetchFromCompendium(name) { const pack = game.packs.get(PACK_KEY); if (!pack) return null; @@ -28,17 +27,11 @@ Hooks.once("ready", () => { const doc = await pack.getDocument(hit._id); return doc?.toObject(); } - async function fetchFromUuid(uuid) { - try { const doc = await fromUuid(uuid); return doc?.toObject(); } catch(e){ return null; } - } + async function fetchFromUuid(uuid) { try { const doc = await fromUuid(uuid); return doc?.toObject(); } catch(e){ return null; } } async function ensureOnActor(actor, srcDoc, equip=false) { - const name = srcDoc?.name; - if (!name) return null; + const name = srcDoc?.name; if (!name) return null; let have = actor.items.getName(name); - if (have) { - if (typeof have.system?.equipped !== "undefined") await have.update({"system.equipped": !!equip}); - return have; - } + if (have) { if (typeof have.system?.equipped !== "undefined") await have.update({"system.equipped": !!equip}); return have; } if (equip && srcDoc.system && typeof srcDoc.system.equipped !== "undefined") srcDoc.system.equipped = true; const [created] = await actor.createEmbeddedDocuments("Item", [srcDoc]); return created; @@ -56,7 +49,6 @@ Hooks.once("ready", () => { if (it && typeof it.system?.equipped !== "undefined") await it.update({"system.equipped": !!on}); } - // dedupe our hook if (window._gkAutoLoadoutHookId) { Hooks.off("createItem", window._gkAutoLoadoutHookId); window._gkAutoLoadoutHookId = null; } window._gkAutoLoadoutHookId = Hooks.on("createItem", async (item, opts, userId) => { @@ -65,19 +57,17 @@ Hooks.once("ready", () => { const src = item?.flags?.core?.sourceId || ""; const isFromOurPack = src.startsWith(PACK_SRC_PREFIX); const isOurGKByName = item?.name === "Grey Knight (Archetype)"; - if (!isFromOurPack && !isOurGKByName) return; // ignore non-GK archetypes + if (!isFromOurPack && !isOurGKByName) return; if (game.userId !== userId) return; const actor = item.parent; if (!actor) return; if (actor.getFlag(FLAG_SCOPE, FLAG_DONE)) return; await actor.setFlag(FLAG_SCOPE, FLAG_DONE, true); - // Always add ability + ORDO MALLEUS (choice) await ensureByName(actor, ITEMS.ability, false); let ordoDoc = await fetchFromUuid(CORE.ordo); if (!ordoDoc) ordoDoc = await fetchFromCompendium(ITEMS.ordo); if (ordoDoc) await ensureOnActor(actor, ordoDoc, false); - // Labelled dialog (incognito changed) const content = `