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

I want to see the dice rolling - Scriptcard/Macros

1738941116

Edited 1738943755
Kofi
Pro
**I figured out the Macros** (I just enabled 3D dice in the settings, smh, in case someone is seeking an answer to the same question) I am using Scriptcard and Macros separately and I would like the dice rolling animation to play when they are used.   What do I need to add to get 3D dice to roll? (I'm using Jumpgate if that matters) Scriptcard  Here are a few lines when using Scriptcard where a roll is made :  --:Standard|   --=AttackRoll|1d20 + 4   --^Result|   --:WAdvantage|   --=AttackRoll|2d20kh1 + 4   --^Result|
1738951319
timmaugh
Forum Champion
API Scripter
You're contending with 2 problems there, Kofi. First, ScriptCards (I believe) uses its own roll parser to create the roll data, so this wouldn't trigger the 3D dice. Second, even with inline roll syntax (i.e., [[1d20+4]] ), if this is in a bangsy message (intended for a script) the 3D dice won't be triggered. However, there is some small hope on this front since The Aaron has recently patched the dropped line bug . Here's my thinking... Inline rolls are only natively available in the command line where they originate. This limitation means that if you wanted to move the inline rolls OUT OF a bangsy command line (to be in a previous line within the same message) so that you would at least *see* them: [[1d20+4]] !script {{   ... }} ...you could NOT then refer to them in the later lines (like in the ScriptCards command, above). This would normally be a time when ZeroFrame batching could help, because that would make the rolls available to the later commands within the message, however, this basically moves the rolls BACK into a bangsy message, killing the 3D dice again. So. I probably could expose a way in the Metascript Toolbox to reuse rolls from a previous command (a previous message, as the API sees things, even though it might be another message in the same macro/ability) with a syntax tag. Something like: {&rolls replace} {&rolls add} The first would *replace* the rolls in the current message with those from a previous message; the second would just add the rolls from a previous message to the current. I would have to play with the timing of things to make sure the metascripts could keep track of the non-bangsy messages properly. Also, you might want to suppress the output of the rolls hitting the chat (which you could do-ish with use of a roll template). Also... I'm not sure how ScriptCards would work with Roll20-generated inline rolls (rather than rolls created through the ScriptCards parser), so some creativity might be required (like dumping out the value from a roll where you need it within the ScriptCards syntax). That would lead to a ScriptCard construction more like: &{template:default} [[1d20 + 4]] [[2d20kh1 + 4]] !script {{   {&rolls replace}   ...   --:Standard|   --=AttackRoll|{&rolls 0}.value   --^Result|   --:WAdvantage|   --=AttackRoll|{&rolls 1}.value   --^Result| }} That way the 3D dice would hit chat, but then their roll data could be trapped by the metascripts to be re-used in another message. This is all hypothetical at this point, so if I do this the syntax might take on a slightly different structure, but this would be the idea.
Thank you for your in depth response.  That is way more complicated than I anticipated.  Maybe I' ll just add a dice rolling sound effect and call it a win.  lol