/** * Ecryme system * Author: Uberwald * Software License: Prop */ /* -------------------------------------------- */ /* -------------------------------------------- */ // Import Modules import { EcrymeActor } from "./actors/ecryme-actor.js"; import { EcrymeItemSheet } from "./items/ecryme-item-sheet.js"; import { EcrymeActorSheet } from "./actors/ecryme-actor-sheet.js"; import { EcrymeAnnencySheet } from "./actors/ecryme-annency-sheet.js"; import { EcrymeUtility } from "./common/ecryme-utility.js"; import { EcrymeCombat } from "./app/ecryme-combat.js"; import { EcrymeItem } from "./items/ecryme-item.js"; import { EcrymeHotbar } from "./app/ecryme-hotbar.js" import { EcrymeCharacterSummary } from "./app/ecryme-summary-app.js" import { ECRYME_CONFIG } from "./common/ecryme-config.js" /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ /************************************************************************************/ Hooks.once("init", async function () { console.log(`Initializing Ecryme RPG`); game.system.ecryme = { config: ECRYME_CONFIG, EcrymeHotbar } /* -------------------------------------------- */ // preload handlebars templates EcrymeUtility.preloadHandlebarsTemplates(); /* -------------------------------------------- */ // Set an initiative formula for the system CONFIG.Combat.initiative = { formula: "1d6", decimals: 1 }; /* -------------------------------------------- */ game.socket.on("system.fvtt-ecryme", data => { EcrymeUtility.onSocketMesssage(data) }); /* -------------------------------------------- */ // Define custom Entity classes CONFIG.Combat.documentClass = EcrymeCombat CONFIG.Actor.documentClass = EcrymeActor CONFIG.Item.documentClass = EcrymeItem /* -------------------------------------------- */ // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); Actors.registerSheet("fvtt-ecryme", EcrymeActorSheet, { types: ["pc"], makeDefault: true }); Actors.registerSheet("fvtt-ecryme", EcrymeActorSheet, { types: ["npc"], makeDefault: true }); Actors.registerSheet("fvtt-ecryme", EcrymeAnnencySheet, { types: ["annency"], makeDefault: false }); Items.unregisterSheet("core", ItemSheet); Items.registerSheet("fvtt-ecryme", EcrymeItemSheet, { makeDefault: true }); EcrymeUtility.init() console.log("Babele INIT!") Babele.get().setSystemTranslationsDir("translated"); }); /* -------------------------------------------- */ function welcomeMessage() { if (game.user.isGM) { ChatMessage.create({ user: game.user.id, whisper: [game.user.id], content: `