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

[Script] Rolling Formatting Changer

I have created a script to change the formatting of the roller. This makes it easier to read on gms and players I think, and adds a level of customization to the game.&nbsp; To use it, type !r and then your roll as normal. I have also included a screen print:&nbsp; The colors are all custumizable as you see fit in the indicated global variables. It's namespaced to allow for the best usage with other scripts. Here is the link:&nbsp; <a href="https://gist.github.com/DarokinB/5952022" rel="nofollow">https://gist.github.com/DarokinB/5952022</a>
I do have one question though. I have also applied this to a script where I take /r or /roll commands and reformat them, and it works perfectly. The problem is that it would then double roll, once with the standard format and once with my format.&nbsp; Is there a way to interrupt a chat from someone, delete or change the content as we see fit, and then send it out? Or only api commands?
That is fucking awesome if you can find a way to get rid of the double roll. Does this work on all roll commands? Like if I type /roll {2d6+1d8}KH2, will it work?
Josh said: I do have one question though. I have also applied this to a script where I take /r or /roll commands and reformat them, and it works perfectly. The problem is that it would then double roll, once with the standard format and once with my format.&nbsp; Is there a way to interrupt a chat from someone, delete or change the content as we see fit, and then send it out? Or only api commands? Currently, only API commands. In the future it may be possible. Also, I agree that this is awesome :-)
Thanks. It will work with all rolls the system takes. If you use !r instead or /r, it works fine.
hey josh - more good work. only thing I would like to ask is adding an option to put the total of the roll first, with the 'math' at the end so it would look more like this 18 = [ 1d20 = ( 6 ) ] + 5 + 6 + 1 + 0 (or whatever your personal macros work into the roll) possible? I haven't looked into roll formatting as yet, Working on learning more Javascript and making arrays work, so I'm not sure on that one...
also, doesn't work with /gr as yet&nbsp;
Correct michael, I have to add a gm roll option, but there is a problem with that, as the /direct function does not include whispers (as far as I can tell). I will need to play around with it. Because I included notes, it will get pretty messy if the damage is first, but it certainly is possible to change it to whatever order you like.
Josh, This may seem a simple question, but I (as an API n00b) can't seem to figure it out on my own: How do I get the blue-bordered dice rolls to display on a single line, rather than two lines? I'd prefer to see: 1d10 = (3) rather than the current: 1d10= &nbsp;&nbsp; (3) I've tried changing font sizes, etc.... Halp?
instead of using the /r command, just type it in double brackets. i.e. [[d20+4]]. I'm pretty sure it only works on the dev server ATM though..,.