javierriveracastro / betteroll-swade

A Better Rolls port for SWADE
GNU General Public License v3.0
16 stars 32 forks source link

Source Token has no position #551

Closed mrcomac closed 1 year ago

mrcomac commented 1 year ago

When I enable Betterroll-swade all animations from Automated Animations that requires Source Token position don't work.

Animations that get info from target token work fine. below the error and some steps i did

Hi, I did some investigation regarding last issue I'm having (previous message in #sequencer)

PART I

  1. I've created a new Melee animation (Name: Bolt)
  2. I didn't change anything and I can see the preview from the preview button (it shows the animation)
  3. I attack the enemy (I have target selected and my token selected) and I get an error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'width') [Detected 1 package: autoanimations] at AAHandler.getDistance (workflow-data.js:182:42) at Module.melee$3 [as melee] (meleeAnimation.js:39:34) at trafficCop$1 (traffic-cop.js:150:17)

Checking the code line 182 in workflow-data.js shows t1.document.width however, t1.document is undefined. (From module Automated Animations)

t1 is a SwadeActor

PART II

  1. I've created a new Token animation and removed that previous one (same Name: Bolt)
  2. I didn't change anything and I can see the preview from the preview button (it shows the animation)
  3. I attack the enemy and it works
  4. When I add On Token animation I get the error below foundry.js:59187 Sequencer | Effect | size - inSize must be of type number or object

lib.js:409 Uncaught (in promise) Error: Sequencer | Effect | size - inSize must be of type number or object [Detected 2 packages: sequencer, autoanimations] at Module.custom_error (lib.js:409:10) at Proxy._customError (sequencer.js:232:16) at Proxy.size (effect.js:631:88) at DataSanitizer.compileSource (DataSanitizer.js:390:26) at async DataSanitizer._getAnimationData (DataSanitizer.js:16:29) at async trafficCop$1 (traffic-cop.js:24:27)

When I disable BetterRolls the animation works fine.

My configuration is Foundry version 10 (291) Automated Animations 4.1.00 JB2A 0.5.3 (Patreon Version) BetterRolls 3.13

javierriveracastro commented 1 year ago

Yes, we know it's a known bug caused by changes in Better Rolls.

It is already solved in BR git and it will be addressed in next version. As it will break other projects downstream (SWIM) we're trying to make a coordinate release, it will hopefully happen after the holidays.