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

[Request] OVA Dice Roller

Hey everyone, trying to put together a dice rolling thing for the OVA system, but my partner is having a lot of issues coding the script we need for our game. The core dice rolling mechanic of OVA is that you roll X D6's (X is determined by your character's levels in "abilities" and "weaknesses" that add or take away from the number of dice rolled), then all the duplicate numbers are added together, with the highest number rolled being the result of the roll (so a roll of 6, 6, 4, 4 and 2 would be a roll of 12, since the 2 6's are added together). What I've been doing in the past for OVA games is just using the following macro /roll ?{Dice|2}d6s, then adding them together myself, but I'd prefer something that outputs the highest value, (or the lowest, in the case of a roll that you have so many penalties for it that your dice pool for the roll becomes '0' or a negative number of dice). It'd also be cool if you could see the dice roll on a mouse over of the output result, just so people can check what was rolled for their own peace of mind. Thanks for taking the time to read my request, have a good day.
1441111980
The Aaron
Pro
API Scripter
That sounds very similar to the mechanics in CthulhuTech, except you're using d6s instead of d10s. &nbsp;I have a script for CthulhuTech dice, but it actually doesn't care about the size of the die when applying it's rules. &nbsp;See if this is close to what you need: &nbsp; <a href="https://app.roll20.net/forum/post/2084635/cthulhut" rel="nofollow">https://app.roll20.net/forum/post/2084635/cthulhut</a>... Try: !cd [[?{Dice|2}d6]] The script should be easily modified to suite your system.
The Aaron said: The script should be easily modified to suite your system. Seems like it was, for sure! Thank you for the help.
1441198776
The Aaron
Pro
API Scripter
Great! &nbsp;Let me know if you need any help deciphering it. &nbsp;(most of the script is just formatting the output) &nbsp;=D
Sorry to bring this back up, but we're getting an odd error... sometimes, when we go into our API scripts. It reads as follows; API Output Console Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._listen2 (net.js:1023:19) at listen (net.js:1064:10) at Server.listen (net.js:1132:5) at Sandbox.start (/home/symbly/www/d20-api-server/sandcastle/lib/sandbox.js:35:15) at Object.&lt;anonymous&gt; (/home/symbly/www/d20-api-server/sandcastle/bin/sandcastle.js:11:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) The stranger thing is if we just save the script again (without changing anything) it works totally fine, but if we don't do that it stops working in the campaign. We've also modified the original script a fair bit to fit the appearance of the system's rulebook, as well as tried to hack out some functionality we didn't need (such as botching, and the roll sometimes taking the best "run" of consecutive numbers), so I'll share you a version of the script as it is now: Cthulhu Tech Dice Script Modified for OVA Thank you in advance for taking a look.
1441893251
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Katie, that is a known issue with the API. It is similar to the 'unexpected identifier' issue that some users see when the game has been inactive for a short while (effectively timed out). As you state, a simple save to refresh the sandbox will clear it. But please be aware that the development team are very aware of these irritating errors and are working hard to find the root cause/fix the issue as always. In the mean time please continue to monitor your API console each time you return to a game after a short time off the site to ensure that the error can be cleared before it can affect play. Thanks.