Active Effect Help
And it should be the actual ActiveEffect document for the effect, not just the id. I don't have the brain right now to figure out the best way to get that.
10 Replies
I really thought I could figure it out, but the updates just aren't going through.
Here is the current state of the macro:
Some stuff still needs to be adjusted.
DAE list:

(I don't think it pings on thread creation??? So just throwing out a ping. Sorry if it actually did! @badideasbureau
Maybe you need to await the updates?
I thought that as well but tried it and no dice :(
The problem (as far as I understand it) is that the effect.update is not going through. I've double checked the keyname and it is a valid name. I also just tried a really simple key name, but the data wasn't modified either, so I think there's something else going on but I have no idea what.
If anything I'm thinking it might be that I have the wrong effect selected? But that really should be the right one...
Honestly not sure - try throwing in a console.log(effect) to check it's the right one?
I did. Here's the output (afaik it's the right one???).

OH!
effect.update({"changes[1].value":
(the "update" applies to "data", so you skip the first "data")
I think you still want the "data" in armor of agathys, since that's system defined data (so it's actually item.data.data.uses.value
)That would make sense, but it still doesn't work.

Are you allowed to use array indexing in the key field?
I'm starting to think it might be because of this? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#computed_property_names
Okay, it's definitely because of that
If I change the key to "label" then it immediately works
I'm going to throw a general question over into #development