kaelad02 / region-active-effects

A Foundry VTT module to attach active effects to regions
MIT License
0 stars 1 forks source link

Dropping effects into the Active Effect section for behavior identity throws an error. #2

Closed Mermut closed 3 months ago

Mermut commented 3 months ago

For testing, I dropped an effect (pf2e system) into the active effect section for behavior identity and got the error: "Incorrect document type "item" provided to document tag field which requires 'ActiveEffect' documents"

In PF2e, effects are a subset of the type 'item'

if this isn't a bug, what constitutes an "Active Effect"?

kaelad02 commented 3 months ago

An Active Effect is a specific Foundry document type that modifies an actor's data. IIRC PF2e created its Rule Elements to do much the same thing before Foundry created the Active Effect and stuck with it.

kaelad02 commented 3 months ago

I looked into it some more, and I see two options.

  1. I could try and adjust the Active Effect behaviors to accept an Item's UUID but I'd have to do the validation on my own instead of letting Foundry's code do that for me.
  2. Create separate, PF2e-specific behaviors to support the Effect items

I know some of the filtering we talked about before is going to have to be system-specific, but I was hoping to limit it there. I think the second option will be cleaner, especially since the behavior could be labeled as something more obvious and relevant (e.g. "PF2e Effect" instead of "Active Effect"). Especially since that system doesn't use Active Effects at all, might be confusing to some users that they have to create that behavior to use a PF2e Effect item.

Mermut commented 3 months ago

I looked into it some more, and I see two options.

1. I could try and adjust the Active Effect behaviors to accept an Item's UUID but I'd have to do the validation on my own instead of letting Foundry's code do that for me.

2. Create separate, PF2e-specific behaviors to support the Effect items

I know some of the filtering we talked about before is going to have to be system-specific, but I was hoping to limit it there. I think the second option will be cleaner, especially since the behavior could be labeled as something more obvious and relevant (e.g. "PF2e Effect" instead of "Active Effect"). Especially since that system doesn't use Active Effects at all, might be confusing to some users that they have to create that behavior to use a PF2e Effect item.

Thanks for looking into it. I'll be keeping my eye on the progress of the effects stuff. In the mean time, I'll still be keeping the mod in my bag of tricks for conditions.

kaelad02 commented 3 months ago

About to make a new release to include a switch for PF2e from Status Effects and Active Effects to Conditions and Effects.