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!