Vauryx / advancedspelleffects

This module will use Sequencer, Tagger, JB2A spell effects and socketlib to create advanced spell functionality without relying on finicky macros to do the heavy lifting.
Other
19 stars 12 forks source link

Missile dialog seems to have a race condition when midi-qol auto damage is enabled. #86

Closed Eligarf closed 2 years ago

Eligarf commented 2 years ago

ase-missile-problem.zip

I'm running into a problem on Forge v9.255 (DnD5e 1.5.7) with both scorching ray and magic missile once the proper number of targets have been selected and Done has been clicked in the dialog box. The missiles seem to fire off properly when targeting a 1000hp training dummy, but the actual result on the target can be anything between no damage done and it losing nearly all of its 1000hp from a 3-dart magic missile. Even worse, the targeting mode of the dialog is still running, so selecting any tokens yields a message about exceeding the number of targets even though I'm dealing with subsequent characters' turns. The only thing that clears this up to to reload the page. It behaves exactly like how I'd expect a race condition to behave, but of course I'm speculating.

I've included a moduleList.json file with the minimal set of modules I need to recreate the problem as well as listing them below. I also have the midi-qol settings I used to march the problem down to the 'auto apply damage to target' setting. The included file has this field set to none, you will need to set this one field to 'Yes + damage card' to recreate the issue. I also included two log files, one with all debug info turned on for midi.

Active Modules:

Advanced Spell Effects v0.9.1.4; Forien's Copy Environment v2.0.7; JB2A - Patreon Complete Collection v0.3.8; libWrapper v1.12.4.0; Midi QOL v0.9.33; Sequencer v2.0.16; socketlib v1.0.10; Tagger v1.3.4; Tidy UI - Game Settings v0.1.31; Warp Gate v1.13.6;

Brimcon commented 2 years ago

I wonder if this is related to #83.

Eligarf commented 2 years ago

Sure seems possible - race conditions can do all sorts of things. Midi seems to want an attack/damage sequence to be fully processed before starting another. You can see this if you turn off automatic damage and then do some kind of multiple attack without waiting for the GM to approve the damage between them, and you'll see each of the attacks apply their damage to the same starting HP, yielding a net result of only one attack actually applying damage in the end.

Vauryx commented 2 years ago

Would you be able to confirm if this is still happening with the newest update to MIDI?

Eligarf commented 2 years ago

I still get related issues with 9.266 foundry, 9.44 midi, and 9.1.4 ASE. I target three orcs with scorching ray, things seem fine. I cast it again, the first time I click on one of the orcs it get two rays assigned. I right click, zero rays assigned. Left click again, two rays assigned, right click, back to zero. Pick a different orc, same thing, two rays or zero rays. image

Vauryx commented 2 years ago

Strange, could you try this now with the ASE 0.9.2.1 update? It should have fixed a lot of these issues.

Eligarf commented 2 years ago

9.2.1 seems to fix it. Fingers crossed!

Vauryx commented 2 years ago

fixed with 0.9.2.1