/** * imperium5 system * Author: Uberwald * Software License: Prop */ /* -------------------------------------------- */ /* -------------------------------------------- */ // Import Modules import { Imperium5Actor } from "./imperium5-actor.js"; import { Imperium5ItemSheet } from "./imperium5-item-sheet.js"; import { Imperium5ActorSheet } from "./imperium5-actor-sheet.js"; import { Imperium5Utility } from "./imperium5-utility.js"; import { Imperium5Combat } from "./imperium5-combat.js"; import { Imperium5Item } from "./imperium5-item.js"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ /************************************************************************************/ Hooks.once("init", async function () { console.log(`Initializing Imperium5 RPG`); /* -------------------------------------------- */ // preload handlebars templates Imperium5Utility.preloadHandlebarsTemplates(); /* -------------------------------------------- */ // Set an initiative formula for the system CONFIG.Combat.initiative = { formula: "1d6", decimals: 1 }; /* -------------------------------------------- */ game.socket.on("system.fvtt-imperium5", data => { Imperium5Utility.onSocketMesssage(data) }); /* -------------------------------------------- */ // Define custom Entity classes CONFIG.Combat.documentClass = Imperium5Combat CONFIG.Actor.documentClass = Imperium5Actor CONFIG.Item.documentClass = Imperium5Item game.system.imperium5 = { } /* -------------------------------------------- */ // Register sheet application classes Actors.unregisterSheet("core", ActorSheet) Actors.registerSheet("fvtt-imperium5", Imperium5ActorSheet, { types: ["character"], makeDefault: true }) Items.unregisterSheet("core", ItemSheet) Items.registerSheet("fvtt-imperium5", Imperium5ItemSheet, { makeDefault: true } ) Imperium5Utility.init() }) /* -------------------------------------------- */ function welcomeMessage() { ChatMessage.create({ user: game.user.id, whisper: [game.user.id], content: `