caewok / fvtt-walled-templates

Foundry VTT templates that interact with walls
MIT License
9 stars 4 forks source link

Error attaching to tokens in dnd5e 3.x #89

Closed strongpauly closed 5 months ago

strongpauly commented 5 months ago

In the latest dnd5e 3.1.1 an error is thrown whenever attempting to attach a template to a token.

active-effect.mjs:63 Uncaught (in promise) Error: undefined. Invalid status ID "Zy2iPC4OW4NGqjwS" provided to ActiveEffect.fromStatusEffect
[Detected 2 packages: system:dnd5e, walledtemplates]
    at ActiveEffect5e.fromStatusEffect (active-effect.mjs:63:26)
    at TokenDocument5e.toggleActiveEffect (token.mjs:165:54)
    at Token5e.attachTemplate (Token.js:110:24)
    at async MeasuredTemplate.attachToken (MeasuredTemplate.js:457:24)
    at async MeasuredTemplateConfig.onTargetedTokenButton (MeasuredTemplateConfig.js:119:3)

It appears as if in version 3.x + (and possibly in version 12+ of Foundry) creating a new ActiveEffect with the same id as the template won't work as it does not exist in CONFIG.statusEffects