Import wrath-and-glory-gk-0.2.0.zip do wg-greyknights (2025-08-21T20:12:55Z)

This commit is contained in:
2025-08-21 20:12:55 +00:00
parent 24ad39dc6f
commit b4ee703fdc
14 changed files with 208 additions and 43 deletions
-14
View File
@@ -1,14 +0,0 @@
# GK Grey Knight (Wrath & Glory)
This module installs homebrew Grey Knight content for the Wrath & Glory system.
## Contents
- Items: Aegis Power Armour, Terminator Aegis (Grey Knights), Grey Knight Armour Integrated Storm Bolter, Nemesis Force Halberd, Aegis of Titan (Ability), Grey Knight (Archetype).
- Macros (scripts): Import from module, Loadout Manager, Aegis Glow Toggle.
- Preset Actors: GK Incognito, GK Power Armour, GK Terminator (`foundry/actors/*.json`).
## Install
1. Copy the `gk-greyknight` folder into `{UserData}/Data/modules/` and restart Foundry **or** use a manifest URL that points to `module.json`.
2. Enable **Grey Knight Add-on (Wrath & Glory)** in your World.
3. Go to *Configuration → Module Settings → Grey Knight Tools* to open the helper dialog.
4. Click **Import Items from Module** to populate your Items Directory.
5. Use **Loadout Manager** on a GK actor to switch between Incognito / Power Armour / Terminator.
+5
View File
@@ -0,0 +1,5 @@
Wrath & Glory — Daemonhunters (Grey Knights) v0.2.0
Updated: 2025-08-21T20:11:54.099941
Install: In FoundryVTT, install as a regular module. Ensure the system 'wrath-and-glory' is active.
Note: The auto-loadout hook is provided as an ES module via module.json (no 'world' edmodule needed).
@@ -0,0 +1,17 @@
{
"name": "Aegis Power Armour",
"type": "armor",
"img": "icons/svg/shield.svg",
"system": {
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
],
"effects": [
"Aegis Warding (toggleable barrier; visual runes glow)",
"Psychic Hood Integration (+dice to Deny the Witch)"
]
}
}
@@ -0,0 +1,13 @@
{
"name": "Aegis Terminator Armour",
"type": "armor",
"img": "icons/svg/shield.svg",
"system": {
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
]
}
}
@@ -0,0 +1,14 @@
{
"name": "Aegis of Titan",
"type": "ability",
"img": "icons/svg/aura.svg",
"system": {
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
],
"description": "Toggle: +Armour Resilience / -Defence (runes glow). Passive: +dice to Deny the Witch; +1 Corruption Resistance (stacks with archetype)."
}
}
@@ -0,0 +1,19 @@
{
"name": "Grey Knight",
"type": "archetype",
"img": "icons/svg/book.svg",
"system": {
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
],
"wargear": [
"Nemesis Force Halberd",
"Aegis Power Armour",
"Grey Knight Armour Integrated Storm Bolter"
],
"notes": "Innate: +1 vs Corruption; +1 additional vs Corruption when equipped with Aegis armour. Adds Aegis of Titan ability."
}
}
@@ -0,0 +1,15 @@
{
"name": "Grey Knight Armour Integrated Storm Bolter",
"type": "weapon",
"img": "icons/svg/bolt.svg",
"system": {
"category": "ranged",
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
],
"special": "Mounted; can fire while using two-handed melee weapon (RAW: separate action)."
}
}
@@ -0,0 +1,15 @@
{
"name": "Nemesis Force Halberd",
"type": "weapon",
"img": "icons/svg/sword.svg",
"system": {
"category": "melee",
"keywords": [
"GREY KNIGHTS",
"INQUISITION",
"DAEMONHUNTERS",
"ORDO MALLEUS"
],
"special": "Counts as Force Staff; +ED vs Daemons/Psykers"
}
}
+1
View File
@@ -0,0 +1 @@
Drop your real icons here; JSONs point to icons/svg/ (Foundry stock) to avoid broken paths.
@@ -1,15 +0,0 @@
// GK Auto Loadout on Archetype Assignment (world esmodule friendly)
(() => {
if (window._gkAutoLoadoutHook) { return; }
window._gkAutoLoadoutHook = Hooks.on("createItem", async (item, opts, userId) => {
try {
if (item?.type !== "archetype") return;
if (item?.name !== "Grey Knight (Archetype)") return;
const actor = item.parent;
if (!actor || game.userId !== userId) return;
const macro = game.macros.getName("GK Loadout Manager") || game.macros.getName("GK-Loadout-Manager");
if (macro) await macro.execute();
else ui.notifications.warn("Brak makra 'GK Loadout Manager'. Dodaj je do świata (macros/).");
} catch (e) { console.error("GK Auto-Loadout error", e); }
});
})();
@@ -0,0 +1,29 @@
// 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: `<p>Paste a data path (e.g. /worlds/your-world/foundry/items)</p><input type="text" name="path" style="width:100%"/>`,
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.");
})();
+36
View File
@@ -0,0 +1,36 @@
{
"id": "wrath-and-glory-gk",
"title": "Wrath & Glory — Daemonhunters (Grey Knights)",
"description": "Grey Knights add-on: archetype, Aegis armours, Nemesis force halberd, integrated Storm Bolter, Aegis of Titan ability, and helper macros.",
"version": "0.2.0",
"compatibility": {
"minimum": "10",
"verified": "11"
},
"authors": [
{
"name": "ChatGPT (assistant)"
}
],
"systems": [
{
"id": "wrath-and-glory",
"type": "system",
"compatibility": {
"minimum": "5"
}
}
],
"esmodules": [
"scripts/macro-gk-auto-loadout-on-archetype.js"
],
"scripts": [],
"packs": [],
"relationships": {
"systems": [
{
"id": "wrath-and-glory"
}
]
}
}
+24 -14
View File
@@ -1,26 +1,36 @@
{ {
"id": "gk-greyknight", "id": "wrath-and-glory-gk",
"title": "Grey Knight Add-on (Wrath & Glory)", "title": "Wrath & Glory — Daemonhunters (Grey Knights)",
"description": "Homebrew Grey Knights kit for Wrath & Glory: archetype, Aegis armours, integrated storm bolter, Nemesis halberd, ability, macros, and preset actors.", "description": "Grey Knights add-on: archetype, Aegis armours, Nemesis force halberd, integrated Storm Bolter, Aegis of Titan ability, and helper macros.",
"version": "0.1.0", "version": "0.2.0",
"compatibility": { "compatibility": {
"minimum": "13", "minimum": "10",
"verified": "13" "verified": "11"
}, },
"authors": [ "authors": [
{ {
"name": "User & Assistant" "name": "ChatGPT (assistant)"
} }
], ],
"systems": [ "systems": [
"wrath-and-glory" {
"id": "wrath-and-glory",
"type": "system",
"compatibility": {
"minimum": "5"
}
}
], ],
"esmodules": [ "esmodules": [
"scripts/auto-loadout.js" "scripts/macro-gk-auto-loadout-on-archetype.js"
], ],
"readme": "README.txt", "scripts": [],
"license": "LICENSE", "packs": [],
"url": "https://example.com/gk-greyknight", "relationships": {
"manifest": "https://example.com/gk-greyknight/module.json", "systems": [
"download": "https://example.com/gk-greyknight/gk-greyknight-0.1.0.zip" {
"id": "wrath-and-glory"
}
]
}
} }
@@ -0,0 +1,20 @@
// Auto loadout on archetype creation (hook Actor creation)
Hooks.on("createActor", async (actor, options, userId) => {
try {
const arch = actor.items.find(i => i.type === "archetype" && i.name?.includes("Grey Knight"));
if (!arch) return;
const names = ["Nemesis Force Halberd","Aegis Power Armour","Grey Knight Armour Integrated Storm Bolter","Aegis of Titan"];
const toAdd = [];
for (const n of names) {
const packItem = game.items.getName?.(n);
if (packItem) toAdd.push(packItem.toObject());
else {
// fallback: create minimal items
toAdd.push({name:n, type: n.includes("Armour") ? "armor" : (n.includes("Bolter") ? "weapon" : "ability"), img:"icons/svg/placeholder.svg", system:{}});
}
}
await actor.createEmbeddedDocuments("Item", toAdd);
} catch(e) {
console.error(e);
}
});