From 7c35c1bb9c2e1a09f0fe9330bcc845e3bcdd8e81 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Thu, 18 Sep 2025 00:03:27 +0200 Subject: [PATCH] cleanup --- .../Abilities/Aegis of Titan.json | 14 ---- .../Archetypes/Grey Knight (General).json | 13 --- .../Archetypes/Grey Knight Justicar.json | 13 --- .../Archetypes/Grey Knight Paladin.json | 13 --- .../Grey Knight Purgation Marine.json | 13 --- .../Archetypes/Grey Knight Purifier.json | 13 --- .../Weapons/Melee/Nemesis Daemon Hammer.json | 14 ---- .../Weapons/Melee/Nemesis Falchions.json | 14 ---- .../Weapons/Melee/Nemesis Force Halberd.json | 14 ---- .../Weapons/Melee/Nemesis Force Sword.json | 14 ---- .../Weapons/Melee/Nemesis Warding Stave.json | 14 ---- .../Weapons/Ranged/Astartes Incinerator.json | 14 ---- .../Weapons/Ranged/Astartes Psilencer.json | 14 ---- .../Weapons/Ranged/Astartes Psycannon.json | 14 ---- ...Knight Armour Integrated Storm Bolter.json | 14 ---- .../module.json.patch.json | 14 ---- .../packs/gk-items-051.db | 12 --- .../macro/macro-aegis-toggle-glow.js | 59 -------------- .../macro/macro-gk-import-world-items.js | 68 ---------------- wg-greyknights/macros/macro-gk-glow-toggle.js | 35 -------- .../macro-gk-import-world-items-FIXED.js | 80 ------------------- wg-greyknights/macros/macro-gk-importer.js | 29 ------- .../macros/macro-gk-loadout-manager.js | 64 --------------- .../scripts/{macros => }/gk-glow-toggle.js | 0 .../{macros => }/gk-import-from-module.js | 0 .../{macros => }/gk-loadout-manager.js | 0 26 files changed, 566 deletions(-) delete mode 100644 wg-greyknights/content/Daemonhunters/Abilities/Aegis of Titan.json delete mode 100644 wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight (General).json delete mode 100644 wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Justicar.json delete mode 100644 wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Paladin.json delete mode 100644 wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purgation Marine.json delete mode 100644 wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purifier.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Daemon Hammer.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Falchions.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Halberd.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Sword.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Warding Stave.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Incinerator.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psilencer.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psycannon.json delete mode 100644 wg-greyknights/content/Daemonhunters/Weapons/Ranged/Grey Knight Armour Integrated Storm Bolter.json delete mode 100644 wg-greyknights/gk-greyknight-0.5.2-patch/module.json.patch.json delete mode 100644 wg-greyknights/gk-greyknight-0.5.2-patch/packs/gk-items-051.db delete mode 100644 wg-greyknights/macro/macro-aegis-toggle-glow.js delete mode 100644 wg-greyknights/macro/macro-gk-import-world-items.js delete mode 100644 wg-greyknights/macros/macro-gk-glow-toggle.js delete mode 100644 wg-greyknights/macros/macro-gk-import-world-items-FIXED.js delete mode 100644 wg-greyknights/macros/macro-gk-importer.js delete mode 100644 wg-greyknights/macros/macro-gk-loadout-manager.js rename wg-greyknights/scripts/{macros => }/gk-glow-toggle.js (100%) rename wg-greyknights/scripts/{macros => }/gk-import-from-module.js (100%) rename wg-greyknights/scripts/{macros => }/gk-loadout-manager.js (100%) diff --git a/wg-greyknights/content/Daemonhunters/Abilities/Aegis of Titan.json b/wg-greyknights/content/Daemonhunters/Abilities/Aegis of Titan.json deleted file mode 100644 index 360ab36..0000000 --- a/wg-greyknights/content/Daemonhunters/Abilities/Aegis of Titan.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Aegis of Titan", - "type": "ability", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "description": "Passive: +dice to Deny the Witch; +1 Corruption Resistance. Toggle: Fortify Armour (glowing runes) at cost of -Defence vs ranged." - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight (General).json b/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight (General).json deleted file mode 100644 index 8c22bd3..0000000 --- a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight (General).json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Grey Knight (General)", - "type": "archetype", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ] - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Justicar.json b/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Justicar.json deleted file mode 100644 index 06a9137..0000000 --- a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Justicar.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Grey Knight Justicar", - "type": "archetype", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ] - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Paladin.json b/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Paladin.json deleted file mode 100644 index fb1c825..0000000 --- a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Paladin.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Grey Knight Paladin", - "type": "archetype", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ] - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purgation Marine.json b/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purgation Marine.json deleted file mode 100644 index 6d791c0..0000000 --- a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purgation Marine.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Grey Knight Purgation Marine", - "type": "archetype", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ] - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purifier.json b/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purifier.json deleted file mode 100644 index ed4eae8..0000000 --- a/wg-greyknights/content/Daemonhunters/Archetypes/Grey Knight Purifier.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Grey Knight Purifier", - "type": "archetype", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ] - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Daemon Hammer.json b/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Daemon Hammer.json deleted file mode 100644 index 6fdc74c..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Daemon Hammer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nemesis Daemon Hammer", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "melee" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Falchions.json b/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Falchions.json deleted file mode 100644 index d43f29f..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Falchions.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nemesis Falchions", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "melee" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Halberd.json b/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Halberd.json deleted file mode 100644 index 97cd745..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Halberd.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nemesis Force Halberd", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "melee" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Sword.json b/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Sword.json deleted file mode 100644 index 494704e..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Force Sword.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nemesis Force Sword", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "melee" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Warding Stave.json b/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Warding Stave.json deleted file mode 100644 index 930b8ac..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Melee/Nemesis Warding Stave.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Nemesis Warding Stave", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "melee" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Incinerator.json b/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Incinerator.json deleted file mode 100644 index e337536..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Incinerator.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Astartes Incinerator", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "ranged" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psilencer.json b/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psilencer.json deleted file mode 100644 index 4bbe612..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psilencer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Astartes Psilencer", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "ranged" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psycannon.json b/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psycannon.json deleted file mode 100644 index e768033..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Astartes Psycannon.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Astartes Psycannon", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "ranged" - } -} \ No newline at end of file diff --git a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Grey Knight Armour Integrated Storm Bolter.json b/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Grey Knight Armour Integrated Storm Bolter.json deleted file mode 100644 index 9db912b..0000000 --- a/wg-greyknights/content/Daemonhunters/Weapons/Ranged/Grey Knight Armour Integrated Storm Bolter.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Grey Knight Armour Integrated Storm Bolter", - "type": "weapon", - "img": "icons/svg/placeholder.svg", - "system": { - "keywords": [ - "GREY KNIGHTS", - "INQUISITION", - "DAEMONHUNTERS", - "ORDO MALLEUS" - ], - "category": "ranged" - } -} \ No newline at end of file diff --git a/wg-greyknights/gk-greyknight-0.5.2-patch/module.json.patch.json b/wg-greyknights/gk-greyknight-0.5.2-patch/module.json.patch.json deleted file mode 100644 index f1ede33..0000000 --- a/wg-greyknights/gk-greyknight-0.5.2-patch/module.json.patch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "0.5.2", - "packs": [ - { - "name": "gk-items-051", - "label": "Grey Knights — Items (051)", - "path": "packs/gk-items-051", - "type": "Item", - "system": "wrath-and-glory", - "private": false - } - ], - "note": "Add this new pack entry and (optionally) remove/disable the old 'gk-items' entry to avoid stale LevelDB cache." -} \ No newline at end of file diff --git a/wg-greyknights/gk-greyknight-0.5.2-patch/packs/gk-items-051.db b/wg-greyknights/gk-greyknight-0.5.2-patch/packs/gk-items-051.db deleted file mode 100644 index 4074b27..0000000 --- a/wg-greyknights/gk-greyknight-0.5.2-patch/packs/gk-items-051.db +++ /dev/null @@ -1,12 +0,0 @@ -{"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": "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": {}, "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": []} -{"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": []} -{"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": []} -{"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": []} -{"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": []} -{"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": []} diff --git a/wg-greyknights/macro/macro-aegis-toggle-glow.js b/wg-greyknights/macro/macro-aegis-toggle-glow.js deleted file mode 100644 index 3149b04..0000000 --- a/wg-greyknights/macro/macro-aegis-toggle-glow.js +++ /dev/null @@ -1,59 +0,0 @@ -// Aegis: toggle warding + token glow (Foundry v13) — with canvas refresh -(async () => { - const tok = canvas.tokens.controlled[0] ?? null; - const actor = tok?.actor ?? game.user.character; - const token = tok ?? canvas.tokens.placeables.find(t => t.actor?.id === actor?.id); - if (!actor || !token) return ui.notifications.warn("Wybierz token lub przypisz postać do użytkownika."); - - const aegis = actor.items.find(i => i.name.includes("Aegis (Psychic Hood)")); - if (!aegis) return ui.notifications.warn("Nie znaleziono itemu Aegis na postaci."); - const eff = aegis.effects.find(e => e.name?.startsWith("Warding Runes Engaged")); - if (!eff) return ui.notifications.warn("Nie znaleziono efektu toggle w Aegis."); - - const wasDisabled = eff.disabled ?? true; - await eff.update({ disabled: !wasDisabled }); - - const FLAG_SCOPE = "wng-gk"; - const FLAG_KEY = "prevLight"; - - const setGlowOn = async () => { - const prev = token.document.getFlag(FLAG_SCOPE, FLAG_KEY); - if (!prev) await token.document.setFlag(FLAG_SCOPE, FLAG_KEY, foundry.utils.deepClone(token.document.light)); - await token.document.update({ - light: { - color: "#66ccff", - coloration: 2, - alpha: 0.7, - dim: 16, - bright: 0, - angle: 360, - luminosity: 0.5, - attenuation: 0.35, - saturation: 0, - contrast: 0, - shadows: 0, - animation: { type: "pulse", speed: 3, intensity: 4, reverse: false } - } - }); - await canvas.perception.update({ lighting: { refresh: true } }); - }; - - const setGlowOff = async () => { - const prev = token.document.getFlag(FLAG_SCOPE, FLAG_KEY); - if (prev) { - await token.document.update({ light: prev }); - await token.document.unsetFlag(FLAG_SCOPE, FLAG_KEY); - } else { - await token.document.update({ light: { dim: 0, bright: 0, color: null } }); - } - await canvas.perception.update({ lighting: { refresh: true } }); - }; - - if (wasDisabled) { - await setGlowOn(); - ChatMessage.create({ content: `Aegis: Warding Runes ENGAGED. (Akcja)` }); - } else { - await setGlowOff(); - ChatMessage.create({ content: `Aegis: Warding Runes DISENGAGED.` }); - } -})(); diff --git a/wg-greyknights/macro/macro-gk-import-world-items.js b/wg-greyknights/macro/macro-gk-import-world-items.js deleted file mode 100644 index 65317c6..0000000 --- a/wg-greyknights/macro/macro-gk-import-world-items.js +++ /dev/null @@ -1,68 +0,0 @@ -// GK – Import World Items (from JSONs into Items Directory) -(async () => { - const FILES = [ - "fvtt-Item-archetype-grey-knight_v5.json", - "fvtt-Item-ability-aegis-of-titan_v5.json", - "fvtt-Item-nemesis-force-halberd_v4.json", - "fvtt-Item-gk-armour-integrated-storm-bolter_v2.json", - "fvtt-Item-aegis-power-armour_v2.json", - "fvtt-Item-terminator-aegis-gk_v4.json" - ]; - const pick = await new Promise(resolve => { - const content = ` -

Folder z JSON-ami (np. worlds/TwojSwiat/foundry)

-
- - -
-

`; - const dlg = new Dialog({ - title: "GK – Import World Items", - content, - buttons: { - go: { label: "Importuj", icon: '', callback: html => resolve({ok:true, html}) }, - cancel: { label: "Anuluj", callback: () => resolve({ok:false}) } - }, - render: html => { - html.find("button.browse").on("click", () => { - const fp = new FilePicker({ - type: "any", - callback: path => html.find('input[name="path"]').val(path.replace(/\/[^\/]*$/, "")) - }); - fp.browse(); - }); - }, - default: "go" - }); - dlg.render(true); - }); - if (!pick?.ok) return; - const dir = pick.html.find('input[name="path"]').val()?.trim(); - const overwrite = pick.html.find('input[name="overwrite"]')[0].checked; - if (!dir) return ui.notifications.warn("Podaj ścieżkę folderu w danych świata."); - const ensureFolder = async (name, color="#4b6eaf") => { - let f = game.folders.find(x => x.type === "Item" && x.name === name); - if (!f) f = await Folder.create({name, type:"Item", color}); - return f; - }; - const worldFolder = await ensureFolder("Grey Knight Pack", "#4b6eaf"); - const fetchJSON = async (path) => { - const res = await fetch(`/${path}`); - if (!res.ok) throw new Error(`Nie mogę pobrać: ${path} (HTTP ${res.status})`); - return await res.json(); - }; - let created = 0, updated = 0, skipped = 0; - for (const fn of FILES) { - try { - const full = `${dir}/${fn}`; - const data = await fetchJSON(full); - if (data._id) delete data._id; - data.folder = worldFolder.id; - const existing = game.items.getName(data.name); - if (existing) { - if (overwrite) { await existing.update(data); updated++; } else { skipped++; } - } else { await Item.create(data); created++; } - } catch (e) { console.error(`Błąd importu ${fn}`, e); ui.notifications.warn(`Błąd importu: ${fn} (konsola).`); } - } - ui.notifications.info(`GK Import: utworzono ${created}, zaktualizowano ${updated}, pominięto ${skipped}.`); -})(); \ No newline at end of file diff --git a/wg-greyknights/macros/macro-gk-glow-toggle.js b/wg-greyknights/macros/macro-gk-glow-toggle.js deleted file mode 100644 index 4c1d23e..0000000 --- a/wg-greyknights/macros/macro-gk-glow-toggle.js +++ /dev/null @@ -1,35 +0,0 @@ -// Aegis Glow Toggle (robust) — v13 -(async () => { - const tok = canvas.tokens.controlled[0] ?? null; - const actor = tok?.actor ?? game.user.character; - const token = tok ?? canvas.tokens.placeables.find(t => t.actor?.id === actor?.id); - if (!actor || !token) return ui.notifications.warn("Wybierz token lub przypisz postać do użytkownika."); - - const aegisArm = actor.items.find(i => ["armour","armor"].includes(i.type) && /Aegis/.test(i.name)); - if (!aegisArm) return ui.notifications.warn("Nie znaleziono Aegis armour na postaci."); - const eff = aegisArm.effects.find(e => e.name?.toLowerCase().startsWith("aegis warding runes")); - if (!eff) return ui.notifications.warn("Nie znaleziono efektu toggle na Aegis armour."); - const wasDisabled = eff.disabled ?? true; - await eff.update({ disabled: !wasDisabled }); - - const FLAG_SCOPE = "wng-gk"; const FLAG_KEY = "prevLight"; - const setGlowOn = async () => { - const prev = token.document.getFlag(FLAG_SCOPE, FLAG_KEY); - if (!prev) await token.document.setFlag(FLAG_SCOPE, FLAG_KEY, foundry.utils.deepClone(token.document.light)); - await token.document.update({ - light: { color:"#66ccff", coloration:2, alpha:0.7, dim:16, bright:0, angle:360, - luminosity:0.5, attenuation:0.35, saturation:0, contrast:0, shadows:0, - animation:{ type:"pulse", speed:3, intensity:4, reverse:false } } - }); - await canvas.perception.update({ lighting: { refresh: true } }); - }; - const setGlowOff = async () => { - const prev = token.document.getFlag(FLAG_SCOPE, FLAG_KEY); - if (prev) { await token.document.update({ light: prev }); await token.document.unsetFlag(FLAG_SCOPE, FLAG_KEY); } - else { await token.document.update({ light: { dim:0, bright:0, color:null } }); } - await canvas.perception.update({ lighting: { refresh: true } }); - }; - - if (wasDisabled) { await setGlowOn(); ChatMessage.create({ content: `Aegis: Warding Runes ENGAGED. (Akcja)` }); } - else { await setGlowOff(); ChatMessage.create({ content: `Aegis: Warding Runes DISENGAGED.` }); } -})(); \ No newline at end of file diff --git a/wg-greyknights/macros/macro-gk-import-world-items-FIXED.js b/wg-greyknights/macros/macro-gk-import-world-items-FIXED.js deleted file mode 100644 index ffba9df..0000000 --- a/wg-greyknights/macros/macro-gk-import-world-items-FIXED.js +++ /dev/null @@ -1,80 +0,0 @@ -// GK – Import World Items (from JSONs into Items Directory) — FIXED path handling -(async () => { - const FILES = [ - "fvtt-Item-archetype-grey-knight_v5.json", - "fvtt-Item-ability-aegis-of-titan_v5.json", - "fvtt-Item-nemesis-force-halberd_v4.json", - "fvtt-Item-gk-armour-integrated-storm-bolter_v2.json", - "fvtt-Item-aegis-power-armour_v2.json", - "fvtt-Item-terminator-aegis-gk_v4.json" - ]; - - const worldId = game.world?.id || game.world?.name || game.data?.world?.id || game.data?.world?.name; - const defaultDir = `worlds/${worldId}/foundry`; - - const pick = await new Promise(resolve => { - const content = ` -

Folder z JSON-ami (domyślnie: ${defaultDir})

-
- - -
-

`; - const dlg = new Dialog({ - title: "GK – Import World Items (Fixed)", - content, - buttons: { - go: { label: "Importuj", icon: '', callback: html => resolve({ok:true, html}) }, - cancel: { label: "Anuluj", callback: () => resolve({ok:false}) } - }, - render: html => { - html.find("button.browse").on("click", () => { - const fp = new FilePicker({ - type: "any", - callback: path => { - const folder = (path || "").replace(/[/\\][^/\\]*$/, ""); - html.find('input[name="path"]').val(folder || defaultDir); - } - }); - fp.browse("data", defaultDir); - }); - }, - default: "go" - }); - dlg.render(true); - }); - if (!pick?.ok) return; - const dir = pick.html.find('input[name="path"]').val()?.trim() || defaultDir; - const overwrite = pick.html.find('input[name="overwrite"]')[0]?.checked; - - const ensureFolder = async (name, color="#4b6eaf") => { - let f = game.folders.find(x => x.type === "Item" && x.name === name); - if (!f) f = await Folder.create({name, type:"Item", color}); - return f; - }; - const worldFolder = await ensureFolder("Grey Knight Pack", "#4b6eaf"); - - const fetchJSON = async (path) => { - const res = await fetch(`/${path}`); - if (!res.ok) throw new Error(`Nie mogę pobrać: ${path} (HTTP ${res.status})`); - return await res.json(); - }; - - let created = 0, updated = 0, skipped = 0; - for (const fn of FILES) { - try { - const full = `${dir}/${fn}`; - const data = await fetchJSON(full); - if (data._id) delete data._id; - data.folder = worldFolder.id; - const existing = game.items.getName(data.name); - if (existing) { - if (overwrite) { await existing.update(data); updated++; } else { skipped++; } - } else { await Item.create(data); created++; } - } catch (e) { - console.error(`Błąd importu ${fn}`, e); - ui.notifications.warn(`Błąd importu: ${fn} (konsola).`); - } - } - ui.notifications.info(`GK Import: utworzono ${created}, zaktualizowano ${updated}, pominięto ${skipped}.`); -})(); \ No newline at end of file diff --git a/wg-greyknights/macros/macro-gk-importer.js b/wg-greyknights/macros/macro-gk-importer.js deleted file mode 100644 index 93eca1e..0000000 --- a/wg-greyknights/macros/macro-gk-importer.js +++ /dev/null @@ -1,29 +0,0 @@ -// GK Importer: drop a folder path that contains JSON items exported from Foundry and import them. -(async () => { - const dir = await new Promise(resolve => { - new Dialog({ - title: "GK Importer — pick folder URL or paste path", - content: `

Paste a data path (e.g. /worlds/your-world/foundry/items)

`, - buttons: { - ok: { label: "Import", callback: html => resolve(html.find('input[name="path"]').val()) }, - cancel: { label: "Cancel", callback: () => resolve(null) } - }, - default: "ok" - }).render(true); - }); - if (!dir) return; - const response = await FilePicker.browse("data", dir); - const files = response.files.filter(f => f.endsWith(".json")); - for (const f of files) { - try { - const json = await (await fetch(f)).json(); - if (json.type && (json.name || json.label)) { - if (!json.name && json.label) json.name = json.label; - await Item.create(json); - } - } catch (err) { - ui.notifications.error(`Import failed for ${f}: ${err.message}`); - } - } - ui.notifications.info("GK Import complete."); -})(); \ No newline at end of file diff --git a/wg-greyknights/macros/macro-gk-loadout-manager.js b/wg-greyknights/macros/macro-gk-loadout-manager.js deleted file mode 100644 index 4429bc7..0000000 --- a/wg-greyknights/macros/macro-gk-loadout-manager.js +++ /dev/null @@ -1,64 +0,0 @@ -// GK – Loadout Manager (attach from Items Directory, set loadout, wire Synergy) -(async () => { - const NAMES = { - archetype: "Grey Knight (Archetype)", - ability: "Aegis of Titan (Ability)", - nemesis: "Nemesis Force Halberd", - storm: "Grey Knight Armour Integrated Storm Bolter", - aegis: "Aegis Power Armour", - term: "Terminator Aegis (Grey Knights)" - }; - const WORLD_FOLDER_NAME = "Grey Knight Pack"; - - const actor = canvas.tokens.controlled[0]?.actor ?? game.user.character; - if (!actor) return ui.notifications.warn("Zaznacz token albo przypisz postać."); - - const mode = await Dialog.prompt({ - title: "Grey Knight – Loadout Manager", - content: `

Wybierz lub zmień loadout:

-
-
- `, - label: "OK", - callback: html => html.find('input[name="m"]:checked').val() - }); - if (!mode) return; - - const findWorldItem = (name) => { - const inFolder = game.items.filter(i => i.name === name && i.folder?.name === WORLD_FOLDER_NAME); - if (inFolder.length) return inFolder[0]; - return game.items.getName(name) ?? null; - }; - const ensureOnActor = async (name) => { - const have = actor.items.getName(name); - if (have) return have; - const worldIt = findWorldItem(name); - if (!worldIt) { ui.notifications.warn(`Brak w Items Directory: ${name}`); return null; } - const created = await actor.createEmbeddedDocuments("Item", [worldIt.toObject()]); - return created[0]; - }; - - for (const key of Object.keys(NAMES)) await ensureOnActor(NAMES[key]); - - const setEquipped = async (name, on) => { const it = actor.items.getName(name); if (it) await it.update({"system.equipped": !!on}); }; - await setEquipped(NAMES.aegis, false); - await setEquipped(NAMES.term, false); - await setEquipped(NAMES.storm, false); - await setEquipped(NAMES.nemesis, false); - - if (mode === "war") { - await setEquipped(NAMES.aegis, true); - await setEquipped(NAMES.storm, true); - await setEquipped(NAMES.nemesis, true); - } else if (mode === "term") { - await setEquipped(NAMES.term, true); - await setEquipped(NAMES.storm, true); - await setEquipped(NAMES.nemesis, true); - } - - const anyAegisEquipped = !!actor.items.find(i => ["armour","armor"].includes(i.type) && /Aegis/.test(i.name) && i.system?.equipped); - const abilItem = actor.items.getName(NAMES.ability); - if (abilItem) for (const ef of abilItem.effects ?? []) if (ef.name?.includes("Aegis Synergy")) await ef.update({ disabled: !anyAegisEquipped }); - - ui.notifications.info(`Loadout ustawiony: ${mode.toUpperCase()}.`); -})(); \ No newline at end of file diff --git a/wg-greyknights/scripts/macros/gk-glow-toggle.js b/wg-greyknights/scripts/gk-glow-toggle.js similarity index 100% rename from wg-greyknights/scripts/macros/gk-glow-toggle.js rename to wg-greyknights/scripts/gk-glow-toggle.js diff --git a/wg-greyknights/scripts/macros/gk-import-from-module.js b/wg-greyknights/scripts/gk-import-from-module.js similarity index 100% rename from wg-greyknights/scripts/macros/gk-import-from-module.js rename to wg-greyknights/scripts/gk-import-from-module.js diff --git a/wg-greyknights/scripts/macros/gk-loadout-manager.js b/wg-greyknights/scripts/gk-loadout-manager.js similarity index 100% rename from wg-greyknights/scripts/macros/gk-loadout-manager.js rename to wg-greyknights/scripts/gk-loadout-manager.js