Feu-Secret / Tokenmagic

A Foundry VTT module that allows you to add animations and graphic effects to tokens, tiles, templates and drawings.
GNU General Public License v3.0
51 stars 36 forks source link

[BUG] TMFX erases template data for Automated Animations #226

Open MrVauxs opened 1 year ago

MrVauxs commented 1 year ago

Module Version: v0.6.1.2

Describe the bug When having Token Magic FX enabled, templateData returns undefined and the following error is posted. image image

To Reproduce Steps to reproduce the behavior:

  1. Enable Automated Animations
  2. Enable Token Magic FX
  3. Place down a template that is animated thanks to Automated Animations
  4. See error

Expected behavior The two working together.

Screenshots

https://user-images.githubusercontent.com/32039708/196032112-06b8c546-411c-4a90-b29f-57db19fb759f.mp4

Browser:

Foundry Version: v10.288

Game System: Pathfinder 2e v4.2.6

otigon commented 1 year ago

I did a little digging on my end, and with some upcoming reworks this issue is cleared up for PF2e since I'll be running my stuff off the createMeasuredTemplate hook.

I still don't understand why it's not working currently, as it runs off the same Hook, just a different part of my module. Only difference being Hooks.on (new way) vs Hooks.once (mid-stream current way). In the current version with Token Magic FX active, for some reason the Template Document that gets passed to Sequencer makes some weird stuff happen, like it can't get the correct data from it. All the data is the same however. I'm stumped