demonlord icon indicating copy to clipboard operation
demonlord copied to clipboard

Rolls from SotDL-related macros (challenge rolls, attacks, etc) do not have their "message type" set correctly

Open doctorthoss opened this issue 1 year ago • 2 comments

This was discovered by jacobwojowski in this issue: https://github.com/Xacus/demonlord/issues/115

I'll copy their findings below. Basically rolls made using this system's "built-in" macros like Challenge rolls, rolls triggered by weapon attacks, etc cause msg.isRoll to return false, when in most systems it would return true. This is likely the cause of the compatibility issues between the SotDL and many popular modules that trigger based on rolls, like Dice So Nice and Automated Animations. Below is jacob's message copied:

Normally if you roll you would get a chat msg that has info like this (This was retrieved by rolling /r 20d20 in chat in shadow of the demon lord) image If I was to roll strength in your system is doesn't set msg type to a roll (msg.isRoll returns false unlike if you do a /r 1d20 normally msg.isRoll returns true)

Looks like when you roll something is just makes an HTML section in the ChatMsg.content area rather then populating the msg.rolls[] like most systems do.

Not a system developer so wish I could be more help as to why. Its nbd Was just asked to add the mod and found this issue when looking into it. Its possible for me to get it working by doing some text parsing in the chatMsg.content area but much harder as if you were to ever change the HTML it would break it.

doctorthoss avatar Mar 30 '23 22:03 doctorthoss

@juanferrer mentioned on the discord that they already have a fix for this and will submit it after their current pending pull request gets merged. Thanks so much!!

doctorthoss avatar Mar 31 '23 21:03 doctorthoss

This has been fixed by #119.

juanferrer avatar Apr 01 '23 13:04 juanferrer