From f1ec3be82f1189c0e99a2225198406966ecc7061 Mon Sep 17 00:00:00 2001 From: Histausse Date: Sat, 10 Jun 2023 23:26:53 +0200 Subject: [PATCH] rename packs to match dw system loading --- README.md | 1 + module.json | 14 ++++++-- modules/settings.js | 5 ++- packs/{dwgl-classe.json => dwgl-classes.json} | 0 packs/dwgl-the-beguiler-moves.json | 34 +++++++++++++++++++ 5 files changed, 49 insertions(+), 5 deletions(-) rename packs/{dwgl-classe.json => dwgl-classes.json} (100%) create mode 100644 packs/dwgl-the-beguiler-moves.json diff --git a/README.md b/README.md index 63f741b..6a5e871 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ cat hbw-classe.json | jq -c > hbw-classe.db - Add class description - Add translation +- Open issue to allow multiple compendiumPrefix in dungeonworld system ## Docs diff --git a/module.json b/module.json index abd1630..9bed06e 100644 --- a/module.json +++ b/module.json @@ -28,8 +28,18 @@ { "label": "DW Beguiler Classe", "type": "Item", - "name": "dwgl-classe", - "path": "packs/dwgl-classe.db", + "name": "dwgl-classes", + "path": "packs/dwgl-classes.db", + "system": "dungeonworld", + "package": "world", + "entity": "Item", + "private": false + }, + { + "label": "DW Beguiler Moves", + "type": "Item", + "name": "dwgl-the-beguiler-moves", + "path": "packs/dwgl-the-beguiler-moves.db", "system": "dungeonworld", "package": "world", "entity": "Item", diff --git a/modules/settings.js b/modules/settings.js index f2fb46a..6f2f714 100644 --- a/modules/settings.js +++ b/modules/settings.js @@ -2,8 +2,7 @@ Hooks.on("ready", function() { console.log("Adding the Beguiller class"); - if (game.items.filter((item) => item.name == 'The Beguiler' && item.type == 'class').length == 0) { - game.items.importFromCompendium(game.packs.get("the_beguiler_module.dwgl-classe"), "vtwvUr31f4qcVSWx") - } + game.settings.set('dungeonworld', 'compendiumPrefix', 'dwgl') + }); diff --git a/packs/dwgl-classe.json b/packs/dwgl-classes.json similarity index 100% rename from packs/dwgl-classe.json rename to packs/dwgl-classes.json diff --git a/packs/dwgl-the-beguiler-moves.json b/packs/dwgl-the-beguiler-moves.json new file mode 100644 index 0000000..df3ed9d --- /dev/null +++ b/packs/dwgl-the-beguiler-moves.json @@ -0,0 +1,34 @@ +{ + "_id": "e9EL6vYlvcKowHh1", + "name": "Thoughtsend", + "type": "move", + "flags": {}, + "img": "icons/magic/control/energy-stream-link-teal.webp", + "system": { + "name": "", + "description": "

You may communicate wordlessly and securely via telepathy with anyone you have a Bond with.

", + "choices": "", + "moveType": "starting", + "rollFormula": "", + "moveResults": { + "failure": { "value": "" }, + "partial": { "value": ""}, + "success": { "value": "" } + }, + "class": "The Beguiler", + "rollType": "", + "rollMod": 0, + "requiresLevel": 0, + "requiresMove": "", + "moveGroup": "" + }, + "ownership": { + "default": 0 + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + } +}