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

Store RollResult (via API) without loosing 3d-Dice-Animation

1509036899
Scaby79
Sheet Author
API Scripter
Hello everybody, is it possible to store an InlineRollResult (for example: in a characters attribute) without loosing the animation of the rolling 3D dices? I tried it with the script ChatSetAttr !setattr --sel --LastRoll|[[1d6]] which works perfectly for storing the RollResult, but that way the dice animation is gone and that one is very important to the players in my group. Is it possible at all to see the the dice rolling and store the RollResult at the same time? Thank you very much in advance for your help, Scaby79 
1509039636
The Aaron
Pro
API Scripter
Not easily, and not without some serious work on the API side.  The basic process (which I've never done but theorized about) would be to split the command into 2 lines, and API command and a chat command, then specify a tag on the roll and pass the tag name as an argument to the script.  The script would then watch for a roll with the same tag and use that as the input where it would want the dice roll.  It would look something like this: !setattr --sel --LastRoll|ROLLTAG:setattr-roll [[1d6 [setattr-roll] ]] In the API script, it would basically need to create an object storing the known parts of the command (Memento Design Pattern) and then watch for rolls coming through the chat:message event with the tags it's interested in, then pull up the stored command data and execute the rest of the command.  quite a few moving pieces there, but doable.
1509197747
Scaby79
Sheet Author
API Scripter
Thank you very much, Aaron. I'm still a rookie when it comes to messing with the api. If you say it requires "some serious work on the API side" it is probably too much for myself at the moment, but it's good to know, that it could be done. Maybe I'll get to that later, when I got more experienced; if so, I will let you know about the results. In the meantime, if anybody out there is working on something I could use, I would be glad to hear about it.
1509377483
Laurent
Pro
Sheet Author
API Scripter
If you have any vote left, there is a suggestion to make that a bit easier:&nbsp; <a href="https://app.roll20.net/forum/post/1239981/obtain-3d-dice-results-for-api-usage" rel="nofollow">https://app.roll20.net/forum/post/1239981/obtain-3d-dice-results-for-api-usage</a>
1509567661
Scaby79
Sheet Author
API Scripter
Ulti said: If you have any vote left, there is a suggestion to make that a bit easier:&nbsp; <a href="https://app.roll20.net/forum/post/1239981/obtain-3d-dice-results-for-api-usage" rel="nofollow">https://app.roll20.net/forum/post/1239981/obtain-3d-dice-results-for-api-usage</a> Thank you for the notice, Ulti. I voted for that suggestion.