Closed Abourass closed 2 years ago
The macros are not dependant on dnd5e. They're simply checking the module list, getting the introduce-me module and using the included API.
const api = game.modules.get('introduce-me').api;
await api.introduceMe(canvas.tokens.controlled[0]);
The error is saying that api is undefined 🤔 You mention doing major changes, but I doubt you could change something that would interfer with this.
It feels like a silly thing to suggest, but try refreshing inside the world. The API is set up on 'initation', and I can only assume that didn't properly happen somehow. 😅
Edit: A possible source of error would be if you have changed the 'init' Hook in some way. That's the hook I'm listening for when setting up the module. Then again..I'd imagine a lot of modules would complain then.. 🤔
I'm closing this for now, as I can only assume the issue is due to the system complications you mentioned.
Feel free to ping it again if there's any further information.
@WBHarry ->
Noticed that the character lacks the introduce button when right clicked so I went to the macros. These are the errors I get from them:
I doubt it's my game system, but just in case I've linked it https://github.com/Abourass/wondershade-system-for-foundry
Very curious. I downloaded the system, activated the mod, and everything worked fine. The button was there and the introduction went as it should.
I think it would be interesting for you to create a new world in another system, and add the Introduce Me mod there to see if it will work for you in another system at all, or if it's a general thing for you.
Other points of interest:
Well this is interesting!
First, to answer your questions, I'm on the current stable version: 9.269
I've tried going into the electron version of foundry, and tried this is in Brave (a chromium browser).
I tried making a fresh world with my game system and just this mod:
And sure enough it works!
But then that got me thinking, what is the bug here?
I try enabling modules, and none causes the break.
So, I try going back to the original game world, re-enable the mod, still doesn't work. Then I try making a new character and dropping them onto the map, and sure enough they work. It seems any characters out before the mod was installed, cause the bug.
After enabling the mod and trying the macro, I get the following error in DevTools:
I am using a custom game system based on the dnd5e system, but it has major changes, so if this module require the dnd5e game system then this is totally just an issue with my game system