From 8fe7cf519dc4c00da9d1a501d745c6edbfeeaddf Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Thu, 21 Aug 2025 23:12:29 +0000 Subject: [PATCH] Import gk-greyknight-0.4.9-patch.zip do wg-greyknights (2025-08-21T23:12:29Z) --- .../packs/gk-items.db | 3 +- .../scripts/auto-loadout.js | 84 +++++++++++++------ 2 files changed, 60 insertions(+), 27 deletions(-) rename wg-greyknights/{gk-greyknight-0.4.8-patch => gk-greyknight-0.4.9-patch}/packs/gk-items.db (63%) rename wg-greyknights/{gk-greyknight-0.4.7-patch => gk-greyknight-0.4.9-patch}/scripts/auto-loadout.js (58%) diff --git a/wg-greyknights/gk-greyknight-0.4.8-patch/packs/gk-items.db b/wg-greyknights/gk-greyknight-0.4.9-patch/packs/gk-items.db similarity index 63% rename from wg-greyknights/gk-greyknight-0.4.8-patch/packs/gk-items.db rename to wg-greyknights/gk-greyknight-0.4.9-patch/packs/gk-items.db index 21a88da..b400153 100644 --- a/wg-greyknights/gk-greyknight-0.4.8-patch/packs/gk-items.db +++ b/wg-greyknights/gk-greyknight-0.4.9-patch/packs/gk-items.db @@ -1,7 +1,8 @@ {"name": "Aegis of Titan (Ability)", "type": "ability", "img": "icons/svg/aura.svg", "_id": "DaEMUDPe8wmrWz70", "effects": [{"_id": "WD4ApIMZ3pnaPDtl", "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": {}}, {"_id": "OybEJ8Tl1hRkI5zJ", "name": "Aegis of Titan — Aegis Synergy", "icon": "icons/svg/upgrade.svg", "origin": "", "disabled": true, "duration": {"startTime": null}, "changes": [{"key": "system.combat.resolve.bonus", "mode": 2, "value": 1, "priority": 20}], "transfer": true, "flags": {}}], "flags": {"core": {}}, "folder": null, "system": {"description": "Innate purity (+1 vs Corruption). While equipped with Aegis armour, enable Synergy for an additional +1 vs Corruption.", "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS"}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1"}} -{"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": "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": []}}, "description": "

ORDO MALLEUS (Keyword) — Choice: Po dodaniu archetypu zostanie dodany item ORDO MALLEUS (z Core), który wyświetli wybór:
Choice 1: +1 Conviction oraz +3 Corruption; Choice 2: +2 kości do testów Scholar (Int) i Investigation (Int) związanych z demonami i Immaterium.

"}, "_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)", "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": {}}, {"_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": {}}], "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": {}}, {"_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": {}}], "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": "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"} diff --git a/wg-greyknights/gk-greyknight-0.4.7-patch/scripts/auto-loadout.js b/wg-greyknights/gk-greyknight-0.4.9-patch/scripts/auto-loadout.js similarity index 58% rename from wg-greyknights/gk-greyknight-0.4.7-patch/scripts/auto-loadout.js rename to wg-greyknights/gk-greyknight-0.4.9-patch/scripts/auto-loadout.js index 4840d1d..91dc372 100644 --- a/wg-greyknights/gk-greyknight-0.4.7-patch/scripts/auto-loadout.js +++ b/wg-greyknights/gk-greyknight-0.4.9-patch/scripts/auto-loadout.js @@ -1,16 +1,24 @@ -// gk-greyknight — auto-attach loadout (scoped, no clashes) v0.4.7 +// gk-greyknight — auto-attach loadout (scoped + incognito revamp + ORDO MALLEUS) v0.4.9 Hooks.once("ready", () => { const PACK_KEY = "gk-greyknight.gk-items"; // our compendium const PACK_SRC_PREFIX = `Compendium.${PACK_KEY}.`; // prefix in core.sourceId + const CORE = { + knife: "Compendium.wng-core.items.Item.4QVBQYWXXLyvFWkj", + pistol: "Compendium.wng-core.items.Item.7b2xcPWBB7up65PM", + ordo: "Compendium.wng-core.items.Item.mpcvHYlffwcBy9gP" + }; const ITEMS = { ability: "Aegis of Titan (Ability)", nemesis: "Nemesis Force Halberd", storm: "Grey Knight Armour Integrated Storm Bolter", aegisPA: "Aegis Power Armour", - aegisTerm: "Terminator Aegis (Grey Knights)" + aegisTerm: "Terminator Aegis (Grey Knights)", + pilgrim: "Pilgrim Astartes Power Armor", + ordo: "ORDO MALLEUS" }; 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; @@ -20,47 +28,56 @@ Hooks.once("ready", () => { const doc = await pack.getDocument(hit._id); return doc?.toObject(); } - async function ensureOnActor(actor, name, equip=false) { + 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; let have = actor.items.getName(name); 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; + } + async function ensureByName(actor, name, equip=false) { + const have = actor.items.getName(name); + if (have) { if (typeof have.system?.equipped !== "undefined") await have.update({"system.equipped": !!equip}); return have; } let src = await fetchFromCompendium(name); if (!src) { const world = game.items.getName(name); if (world) src = world.toObject(); } if (!src) return null; - if (equip && src.system && typeof src.system.equipped !== "undefined") src.system.equipped = true; - const [created] = await actor.createEmbeddedDocuments("Item", [src]); - return created; + return ensureOnActor(actor, src, equip); } async function setEquipped(actor, name, on) { const it = actor.items.getName(name); 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; - } + // dedupe our hook + if (window._gkAutoLoadoutHookId) { Hooks.off("createItem", window._gkAutoLoadoutHookId); window._gkAutoLoadoutHookId = null; } window._gkAutoLoadoutHookId = Hooks.on("createItem", async (item, opts, userId) => { try { - // 1) only archetypes if (item?.type !== "archetype") return; - // 2) only our GK archetype coming from our pack (prevents clashes with Cubicle7 archetypes) 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 all others (e.g. Inquisitor, Guardsman, etc.) - // 3) only the client that created the item + if (!isFromOurPack && !isOurGKByName) return; // ignore non-GK archetypes if (game.userId !== userId) return; - // 4) once per actor const actor = item.parent; if (!actor) return; if (actor.getFlag(FLAG_SCOPE, FLAG_DONE)) return; await actor.setFlag(FLAG_SCOPE, FLAG_DONE, true); - // Dialog + // 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 = `