diff --git a/src/main.mjs b/src/main.mjs new file mode 100644 index 0000000..b56d656 --- /dev/null +++ b/src/main.mjs @@ -0,0 +1,14 @@ +console.log("Hello World! This code runs immediately when the file is loaded."); + +function init() { + console.log("INIT"); + console.log(foundry.documents.BaseItem.metadata.types); + foundry.documents.BaseItem.metadata.types.push("talent"); +} + +function ready() { + console.log("READY"); +} + +Hooks.on("init", init); +Hooks.on("ready", ready); diff --git a/system.json b/system.json index 481f01e..9d7f05c 100644 --- a/system.json +++ b/system.json @@ -1,59 +1,12 @@ { "id": "dsa-4th-edition", - "title": "Das Schwarze Auge 4.1", + "title": "Custom Das Schwarze Auge 4.1", "description": "", - "version": "0.1.0", - "compatibility": { - "minimum": 11, - "verified": 11 - }, - "authors": [{ - "name": "Mike", - "url": "ammerhai.com", - "email": "", - "discord": "" - }], - "esmodules": ["mysystem.mjs"], - "styles": ["styles/system-styles.css"], - "packs": [{ - "name": "monsters", - "label": "My Monsters", - "type": "Actor" - }, - { - "name": "items", - "label": "My Items", - "type": "Item" - }], - "languages": [{ - "lang": "en", - "name": "English", - "path": "lang/en.json" - }, { - "lang": "de", - "name": "Deutsch", - "path": "lang/de.json" - }], - "documentTypes": { - "Actor": { - "hero": { "htmlFields": ["background.biography"] }, - "villain": { "htmlFields": ["background.biography"] }, - "pawn": {} - }, - "Item": { - "weapon": {}, - "spell": {} - } - }, - "socket": false, - "initiative": "1d20", - "grid": { - "distance": 1, - "units": "m" - }, - "primaryTokenAttribute": "resources.health", - "secondaryTokenAttribute": "resources.power", - "url": "https://your/hosted/system/repo/", - "manifest": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/raw/branch/main/system.json", - "download": "https://your/packaged/download/archive.zip" + "esmodules": [ + "src/main.mjs" + ], + + "version": "0.1.5", + "manifest": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/latest/system.json", + "download": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/test2/dsa-4th-edition.zip" } \ No newline at end of file diff --git a/template.json b/template.json new file mode 100644 index 0000000..409c1a4 --- /dev/null +++ b/template.json @@ -0,0 +1,19 @@ +{ + "Item": { + "templates": { + "rarity": { + "rarity": "Common", + "price": 20 + } + }, + "types": ["weapon", "spell"], + "weapon": { + "templates": ["rarity"], + "damage": 5 + }, + "spell": { + "templates": ["rarity"], + "cost": 2 + } + } +} \ No newline at end of file