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

Can Dice Use Double Value Instead of Exploding?

In one of the games I run, we have a house rule based on the White Wolf dice mechanic. Players roll d10s, and each d10 that exceeds a set target number counts as a "success" on the roll, leading to a roll something like: [[5d10>6]] I know it's possible to make 10s explode, re-rolling, but instead of that, does anyone know a way to just make a 10 count as two successes instead of only one?
1530851962
The Aaron
Pro
API Scripter
You could use a series of Rollable Tables based on the threshold. For your example above, let’s say you create a Rollable Table named d10at6 with 3 possible values (weights in parenthesis): 0 (5) 1 (4) 2 (1) That’s 0 for the numbers 1-5, 1 for the numbers 6-9, and 2 for 10.  You can then get the successes as: [[ 5t[d10at6] ]]
That's a great idea! Do you know if I can have them input a variable Target Number? The default is 6, but it does change sometimes. Even if not, I might be able to get this to work, but I'm curious if you know a syntax to get that working.
1530884291
The Aaron
Pro
API Scripter
You can write it like this to get a target number: [[ {[[ 5t[d10at6] ]],0}>5 ]] The { ,0} makes the result part of a group, and the >5 asks how many members of the group are greater than or equal to 5. The result will be either 0 if there aren't enough successes, or 1 if there are.  Hovering will let you see the total number of successes. I made this script for creating the tables: on('ready',()=>{ const makeRT = (num) => { let name = `d10at${num}`; let table = findObjs({ type: 'rollabletable', name: name }); if(table.length){ return `Table <code>${name}</code> already exists`; } table = createObj('rollabletable', { name: name, showplayers: true }); if(table){ if(num>1){ createObj('tableitem',{ rollabletableid: table.id, name: '0', weight: (num-1) }); } if(num<10){ createObj('tableitem',{ rollabletableid: table.id, name: '1', weight: (10-num) }); } createObj('tableitem',{ rollabletableid: table.id, name: '2', weight: 1 }); return `Created Rollable Table <code>${name}</code>`; } return `Failed to create Rollable Table <code>${name}</code>`; }; on('chat:message',(msg)=>{ if('api'===msg.type && playerIsGM(msg.playerid) && /^!make-d10/i.test(msg.content)){ let at = parseInt(msg.content.split(/\s+/)[1]); const who=(getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname'); if(!Number.isNaN(at) && (at>0 && at<11)){ let res = makeRT(at); sendChat('Make d10',`/w "${who}" ${res}`); } else { sendChat('Make d10',`/w "${who}" Call with a number between 1 and 10: <code>!make-d10 NUM</code>`); } } }); }); Use it like: !make-d10 6 to create d10at6 Hope that helps!
That's amazing--thank you!
1530893418
The Aaron
Pro
API Scripter
No worries. =D You're welcome.