#DC changing
1 messages · Page 1 of 1 (latest)
My recommendation is either:
- just use that
- just copy the code of that
Okay I'm making a module so the less module dependent I am the better sadly
Ahh you mean to use it as reference
Sure, whichever. What's the module?
sallright, no need to give details if you'd rather not
No no it's not about that
Example should be in hooks.mjs somewhere iirc
ah gotcha
The Alchemist from Indestructoboy (if you're curious)
I'm trying to use babonus but it doesn't seem to work, I think I'm missing something
If you have a token on the scene missing an actor, I just pushed a fix for that.
Idk if that's the case I'll try now, ty
Niente, still nothing, does it work with midi by chance? Maybe it's midi that is giving problems
I mean, I'm sure it does even on the best of days, but far as I have been told Midi works just fine with babonus.
babonus changes the displayed DC in chat, as well as supplying a flag in the chat card for reference if need be.
Okay I really feel like that if I understand how to access the data from the chat card I could have solved my issue, how do I access it?
Sure, it's just a collection of ChatMessage documents found in game.messages.
The ChatMessage itself is returned by Item5e#use.
Item5e#use ? Is it a command?
For a consumable item (and for the babonus data), it's in the chat message's flags.
That's when you use an item.
Okay thanks, I could just edit the DC but since those items can be given to others I prefer the feature to do all the work
Okay never mind chat message definitely not the solution
If these are always consumable items, I reckon you could use updateSource in the preUseItem hook.
As long as the consumable item is always destroyed, otherwise it could get wonky
What does updateSource do in this case?
It's like update, but not async, doesn't save, not even sure it would work, but give it a try
Okay ty so much