Closed jacobwojoski closed 1 year ago
The code currently does not pass the roll data to the chatMessage. I don't think there is a specific reason why that is the case, but I will find out if we can support it. Would you expect a Roll
to be in the chatMessage.rolls
array? Something like this:
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)
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.
No, I agree that it should be populating those fields. I'll put the necessary changes in a PR and update when it's merged.
To confirm:
type
to "roll"
Roll
to chatMessage.rolls
The code currently does not pass the roll data to the chatMessage. I don't think there is a specific reason why that is the case, but I will find out if we can support it. Would you expect a
Roll
to be in thechatMessage.rolls
array? Something like this:
could this have something to do with the compatibility issues with Dice so Nice? (https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/issues/367)
Dice Stats works with Dice So Nice on both PF2e and D&D but this most certainly can be be related to why dice so nice isn't working correctly with the system.
The code currently does not pass the roll data to the chatMessage. I don't think there is a specific reason why that is the case, but I will find out if we can support it. Would you expect a
Roll
to be in thechatMessage.rolls
array? Something like this:
If this is something the system could be modified to support it would probably fix multiple compatibility issues, I think there a few other modules that don't work wright with SotDL because of this. Not sure if this is helpful but I opened a separate issue for this here: https://github.com/Xacus/demonlord/issues/118
@jacobwojoski I just tested with v2.2.5 and was able to retrieve rolls from attributes and weapons. If you are able to confirm this is fixed, we can close the issue.
@juanferrer unfortunately this didn't fix the issue with Dice so Nice where you can only see other player's rolls if they use the roll table (i.e. you don't see them if they do a challenge roll, weapon attack, etc). Was hoping that was related but I guess it's some other weird thing
Ah, yeah. I didn't test DSN, only DiceStats. We'll have to investigate.
Ah, yeah. I didn't test DSN, only DiceStats. We'll have to investigate.
I made a post for it on the DSN gitlab but haven't heard anything over there yet https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/issues/367
I was asked to add support of my mod dice-stats and was wondering how you post the chat msg's?
It seems like they're not posted as roll data objects like most systems. I can't seem to even view the roll data anywhere in the msg object. The rolls arrays are empty (Chatmessage.rolls) (View image at bottom)
All I can see is the raw html of the msg.context property.
I was wondering if there was any other way to get the data besides parsing the context as getting the die-type and value would be very difficult
Is there a hook or something that I dont know about that could be used?