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 Help

Okay, this has got to be pretty simple. I'm trying a new homebrew opposed dice pool system where the dice pool is created by the most relevant stat (Agility, Vigor, Intellect, and Wits) and situational Advantage or Disadvantage. All of the dice are d6 with the following possibilities: 1 Success + Complication, 2 Failure, 3 Success, 4 Failure, 5 Success, and 6 Success x 2. I need a macro that asks which Ability from the character sheet and prompts for Advantage or Disadvantage as +1d or -1d6 from the dice pool then rolls and counts successes only.  If I could link custom dice images for the faces, that would be cool too.  Anyone?

Edited 1443052603
Forum Champion
You could accomplish this with Rollable Tables (minus the success count), pending API assistance.
Hi! I'm relatively new to the API but am looking for any opportunity to practice my scripting skills and would be happy to take a stab at this. I'm confident I can very easily adapt on of my current scripts to this if you would like (though custom dice faces are beyond my skills at the moment). If you are interested I will just need a few questions answered to make sure it will work the way you want it to. 1) Will there there be characters that have the relevant stats on them that the script could pull from or will those be manually entered in the macro? 2) If yes to 1), Will you be using tokens that are associated with the character that could be selected when the roll is made?
The Aaron
API Scripter
For custom dice images you could either use a Rollable Table, or just add images to the output in chat as images: on('ready',function(){ "use strict"; var diceImageURLs=[ '<a href="" rel="nofollow"></a>', '<a href="" rel="nofollow"></a>' ], roll = (randomInteger(2)-1); sendChat('','Die: &lt;img src="'+diceImageURLs[roll]+'"&gt;'); });