bluegreymouse
bluegreymouse
Accessing data in active effects via @ symbol
okay so i seem to have found it. seems like the system is doing this itself and is not a feature of foundry https://github.com/foundryvtt/dnd5e/blob/04c17cd0bc90e070d7312155228945c8f269597e/module/utils.mjs#L91-L110
4 replies
Accessing data in active effects via @ symbol
looking at DnD they do have a custom active effect class but I don't see anything special to replace @ values 🤔 https://github.com/foundryvtt/dnd5e/blob/04c17cd0bc90e070d7312155228945c8f269597e/module/documents/active-effect.mjs#L117-L192
4 replies
effect in "add" mode continually re-applied to actor/sheet
mmm i see. i was trying to use a form and input with name property. but ended up just managing the update myself in js
5 replies
SchemaField with increasable max?
yup that explains it! thanks 👍
3 replies
update item attribute on actorsheet
ahh! okay that makes sense. Thanks, was starting to go crazy
4 replies
hook preCreateToken update token name
Thanks for your help!
18 replies
hook preCreateToken update token name
so switching the hook to createToken and keeping everything else the same seems to get the functionality i'm looking for.
18 replies
hook preCreateToken update token name
ah okay i see. I'm trying to roll on a rolltable for a random name to apply to a token. is that not something I can do in a hook since it can't contain async calls?
18 replies
hook preCreateToken update token name
No description
18 replies
hook preCreateToken update token name
i can step in and through the update.
18 replies
hook preCreateToken update token name
here it is on the line with a breakpoint
18 replies
hook preCreateToken update token name
No description
18 replies
hook preCreateToken update token name
I don't get any errors but the token name remains the same as the actor or prototype token
18 replies
hook preCreateToken update token name
thanks. though I just tried this to the same result 😕
18 replies
hook preCreateToken update token name
I essentially want this but within the preCreateToken hook where canvas.tokens.controlled[0] is the token being created
canvas.tokens.controlled[0].document.update({name: "bla"})
canvas.tokens.controlled[0].document.update({name: "bla"})
18 replies
hook preCreateToken update token name
i've also tried
Hooks.on("preCreateToken", async function (tokenDocument) {
tokenDocument.update({name: "some dude"});
});
Hooks.on("preCreateToken", async function (tokenDocument) {
tokenDocument.update({name: "some dude"});
});
and every variation in between i can think of 😅
18 replies
hook preCreateToken update token name
I'm trying to update the token name.
18 replies
empty pack
oh i didn't realize there was a cli
3 replies
Error on package install
Thanks for your help!
15 replies
Error on package install
yeah i tried checking the error in the client but couldn't get much out of it. True, might be interesting to surface that in the UI in some way.
15 replies