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

API Request - TORG die-rolling script

A while back, I had asked about exploding dice for TORG in another forum and there was mention that it could be handled through API scripting, along with the corresponding bonus value translation. Here’s my original request that was posted to the other forum: I'm running a game (TORG) that uses a similar mechanic to the Shadowrun exploding dice. However, the character re-rolls 10's and 20's on a d20 (instead of just 20's) and adds all the rolls together as a single roll. Example: a roll of a 20 [explodes], then a 10 [explodes], then a 17 is a single roll value of 47... Here's the bonus translation table: The Bonus Table: Die Roll 1 2 3-4 5-6 7-8 9-10 11-12 Bonus -12 -10 -8 -5 -2 -1 +0 Die Roll 13-14 15 16 17 18 19 20 Bonus +1 +2 +3 +4 +5 +6 +7 Die Roll 21-25 26-30 31-35 36-40 41-45 46-50 +5 Bonus +8 +9 +10 +11 +12 +13 +1 Basically, for every 5 points over 50, add +1 to the bonus. Mechanics for a basic roll are: roll 1d20 and convert to the bonus number from the table. If a 10 or 20 is rolled, add that number and reroll again (as many times as a 10 or 20 comes up). See my example above. Things start to get a bit funky when someone "spends a Possibility point," which allows the player to roll again and add to the previous roll total, but the minimum roll value of the second roll will be 10, even if the actual die roll is lower. If they roll a 6, for example, you add 10 to the previous roll, but a 12 still adds 12. The same exploding on naturally-rolled 10's and 20's applies. Then, there are cards that a player could conceivably use that can be used like a Possibility (which could mean another roll, using the same Possibility rules). The final total is then translated to a bonus value on the same table. Whether or not an individual is spending a possibility and/or using a card isn't generally known before the first roll is made, so if it's a separate API function, the original roll total(s) might need to be input as a parameter. The final translated bonus number is added to your skill, which is handled similar to 3.0/3.5/Pathfinder, where skill value is equal to ranks in the skill plus the corresponding attribute value. If the API could actually show the results of each die roll, the total, and then the resulting bonus number, and resulting skill total with bonus added that'd be great. (In my previous example, it would show the 20, 10, and 17, the total of 47, and the bonus number of +13 that it translates to, X+13=Y for total skill attempt.) To really push things, the previous information assumes that the character has ranks in the skill they just attempted. If they (or other “Possibility-rated” individuals) have no ranks in the skill, only 10's explode, not the 20's. Non-Possibility-rated individuals don't explode on any number if they're untrained in the skill. (All PC's are considered Possibility-rated, so that case would only be for most "ordinary" opponents.) To further complicate things, there are certain skills that apply a -5 to the roll total if you attempt using them unskilled (Pilot Air Vehicle, for example). Keep in mind, this game was designed in the 90's, before anyone thought too much of making game mechanics more simplified. Some people really like that aspect. Don’t get me started on translating real-world measures (10 seconds, 60 mph, etc.) to game values and vice versa.
1441376938
The Aaron
Pro
API Scripter
This can all be done by the API.
Any volunteer work would be greatly appreciated.  I'm able to go in and tweak some existing code (switch bar2 for bar3 in a function, for example), but I'm not good enough to tackle this.
1442172777

Edited 1442172978
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Here's a script which implements a !torg chat command doing what you've described:&nbsp; <a href="https://github.com/Cazra/roll20-api-scripts/tree/torgDice/TorgDice" rel="nofollow">https://github.com/Cazra/roll20-api-scripts/tree/torgDice/TorgDice</a> See the README.md for instructions.
Thanks for the help, Stephen. &nbsp;Not sure how the {modifier} is supposed to be used and the Possibility point is a bit of an issue, yet. During game play, the player generally chooses to spend a Possibility to add to his previous roll once the original roll is known (especially if the original roll was really low or if they're going for a Glory roll, which is 60+ raw roll total). &nbsp;In this case, you take the original roll and continue adding to it. &nbsp;You do not need to be trained in a skill to spend a Possibility to add to the roll. &nbsp;As with normal rolls, you re-roll natural 10's and 20's, but because of the raw power of the Possiblity point, any roll of a natural 1-9 will actually count as an addition of 10 to the original roll with no re-roll). &nbsp;It'd probably have to be a separate function call with an input variable passed to it.
1442375450
Ada L.
Marketplace Creator
Sheet Author
API Scripter
The modifier was supposed to be for adding skill points (if that's my understanding of how the skill ranks work). It sure doesn't seem like a straightforward system to implement. :/
I’ve always felt that one of the core demographics this game tended to attract were math geeks who really enjoyed the complicated mechanics. You’ve given me something great to work with. It’s nice to have something that will take the rolls and do the translation to the bonus number automatically. I’ve seen it done with rollable tables, but I’d like to have something like this API script, especially if there was one to take an input number (for the original roll value) and add it to a separate “Possibility point” roll. I’m not making a character sheet for the game yet, so I’m not going to be too worried about linking the skills in as a passed variable for ranks plus attribute/trained vs. untrained/etc. At least, not until later. For now, I think the players can just take the generated bonus number and add it to their skill. If I ever do a character sheet, then the wish list would expand to having the script deduct a point from the Possibility pool if a point was spent (but not for Hero cards, which can be spent “like a Possibility”).