Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Client-side 3D Dice don't show in API commands

1437672985

Edited 1437758777
Gen Kitty
Forum Champion
PSA/Minor Bug: API don't roll 3d dice. To replicate this bug Use any Powercard macro that rolls dice Enable 3D Dice Do NOT enable 'Automatically Roll 3D Dice' Use the Powercard.  You'll be asked to roll the 3d dice.  The macro will work just fine, the user may become confused and testy because no dice rolled on the table.  If you have 'Automatically Roll 3D Dice' turned on, you still get no dice but the user hasn't been prompted to do something. Suggested Workaround: Tell your users to either not turn on 3d dice or automatically roll 3d dice, if your campaign uses Powercards or any similar dice-rolling API.
GenKitty said: To replicate this bug Use any Powercard macro that rolls dice Enable 3D Dice Do NOT enable 'Automatically Roll 3D Dice' Use the Powercard.  You'll be asked to roll the 3d dice.  The macro will work just fine, the user may become confused and testy because no dice rolled on the table.  If you have 'Automatically Roll 3D Dice' turned on, you still get no dice but the user hasn't been prompted to do something. Suggested Workaround: Tell your users to either not turn on 3d dice or automatically roll 3d dice, if your campaign uses Powercards or any similar dice-rolling API. I haven't actually changed the sendChat() command in PowerCards to deal with 3D dice yet.
1437674068
Gen Kitty
Forum Champion
That'd explain it.  Still, until it's fixed it'll catch people by surprise. :)
1437753460

Edited 1437753486
Riley D.
Roll20 Team
So I think there are two sides to this going on. 1) API-side: The API can now generate 3D Dice rolls using sendChat(). There's no interaction (in terms of the user "rolling" them) client-side, but you can do that now and see 3D Dice get rolled. 2) Client-side: However, the way that many API scripts (including PowerCards) works is by letting the dice rolls happen first on the client-side, and then taking the results of those rolls and doing something with them. The way the 3D Dice roller works for rolls from the client is, it does the roll on the QuantumRoll server, and then you won't see the results of the roll until the chat message displays. Since it's an API command, and those messages are passed to the API server instead of being displayed on the client, there is no message displayed, and so the 3D Dice rolls never happen. This (as you said) can lead to confusion because with the new agency feature you are doing something and expecting a result, but it never happens. Unfortunately, you can't use the new sendChat() supporting 3D Dice function to re-play a 3D roll, only generate new ones.  I guess the two options here are: 1) Just turn off the 3D Dice (agency) features when you are doing API commands, since you will never see the 3D Dice get rolled anyway 2) Play the 3D Dice roll right away when you are in an API command (instead of waiting for a message). The only downside I see with this is that what you see get rolled on the screen may be totally different than the result you get in chat, depending on what the API script you are using does with the dice results. Thoughts?
1437754591
Gen Kitty
Forum Champion
My thoughts are to go with #1, if the script can turn off the agency that is probably the best way. While discussing 3d dice and API... Back in the Times Before, when API and 3d dice talked to each other, it was impossible to do a blind roll (Powercards --whisper| feature, allowing a player to roll dice that ONLY the GM can see).  Will that still be the case, do you think, Riley?  I'd really like to let my players have their 3d dice, but as long as the dice tattle I have to ban them :/
If we go with option 1), then you would be able to do the blind rolls, yes. Their 3D Dice would roll for any non-API commands, but API commands would not show 3D Dice (blind roll option set or not). What I might just do is Option 1) (which is how it's worked for a long time now anyway), and then work on seeing if it is possible to give the API some sort of "3D Dice replay" method...so if the API script wants to show the 3D Dice roll a player made, they can, but if they don't, they can just skip it.
1437767145
The Aaron
Pro
API Scripter
That sounds great to me. =D
1437782689

Edited 1437782721
Actually powercards completely ignores all the initial rolls from a macro, replaces the inline roll placeholders with the expressions, and then shoves that all through as one sendChat() command.