#ActiveEffect Actor Updates

1 messages · Page 1 of 1 (latest)

blazing tundra
#

The best solution I can think of on the CUB side for now is to have a new framework for inspecting an Actor's data when ActiveEffects are added. Because the in-memory data is updated this should be accurate.

#

But I would prefer to listen for this more explicitly at the actor level. I think about it this way:
From a user standpoint the Actor's CON is 0 when the effect is active. It probably doesn't matter to them that this isn't persisted in the CON attribute in the data model of the actor--they would expect that if they have some other trigger that's waiting for CON == 0 that it should now fire.

#

The delta of the derived Actor data vs the original should be tracked somehow also. Like a property on the actor and then an array of changes like:

const actorBob = 
{
  "id": "abcd1234",
  ...
  "temporaryChanges": [
    {
      "property": "data.abilities.con.value",
      "original": 10,
      "current": 0
    }
   ] 
}
#

If any of this seems worthwhile let me know and I'll open an issue.

deft fog
light knoll
sage cairn
#

@blazing tundra sorry for not responding here yet. I think you highlight an important issue, but I don't think slapping an extra hook in is the right solution.

There might be a more general solution by adding a prepareDocument hook that runs at the end of every document preparation workflow, but that feels like a pretty big change to scope for V10 at this point. I'll mull it over.