Nash
Nash
Browsing system data model
Trying to modify an existing UI module to support other systems. The data model of e.g. characters is different in another system. Is there a way to easily browse what kind of data model the system is using and what values it is offering for player characters etc.?
6 replies
Having trouble to get scripts loaded
Trying to make my first module and I have troubles getting anything loaded in Foundry. Here is what I have done so far: 1. Made the module using the Foundry admin UI view. 2. Added that module to one of my worlds. 3. Created a script to scripts/ folder of the module (I edit these files directly in the module folder). 4. Added the script to the module.json
{
"id": "test",
"title": "Test",
"version": "0.0.1",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"scripts": [
"scripts/test.js"
],
}`
{
"id": "test",
"title": "Test",
"version": "0.0.1",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"scripts": [
"scripts/test.js"
],
}`
However, whatever I add to the test.js file does not get loaded when I reload Foundry.
console.log("Hello World! This code runs immediately when the file is loaded.");

Hooks.on('init', () => {
console.log("init");
});

Hooks.on('ready', () => {
console.log("ready");
});
console.log("Hello World! This code runs immediately when the file is loaded.");

Hooks.on('init', () => {
console.log("init");
});

Hooks.on('ready', () => {
console.log("ready");
});
What could be the issue and how do I get started with module development?
12 replies