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

Custom Roll Function

Hello, 


I have a quick question regarding custom rolls. I'm fairly new to custom character sheets and have trouble with the rolls. 


I have multiple attributes that are used across rolls. Each of the rolls is supposed to take two of these attributes, roll some d6 depending on another attribute and print statements in chat depending on the value of the attributes and the roll results. However I don't need the sum of the dice. 

E.g. Strength ist 5 and stamina is 5, athletics is 3.

3d6 are rolled and the result is 3,5,1

1 and 3 would be considered a failure, the 5 a success with added strength and dex, the others are too low. 

Then I want to print a sentence depending on how many successes there are. 


Is there a way to do this? Custom roll parsing seemed okay but I don't know how to pass the attributes as parameters in HTML as it seemed to take the roll itself as input. Otherwise I'd have to create like 30 functions one for each of my skills. 


Thanks for any help! 


September 20 (1 year ago)
GiGs
Pro
Sheet Author
API Scripter

There are ways to make a single custom roll parsing worker work for multiple rolls. You can also use standard roll templates in a lot of cases to produce apparently custom output (that string of text, for example)

But I think we need more specifics of how your roll works.

  • You say you don't need the sum of the dice - what do you need?
  • Why are the 1 and 3 considered failures and 5 considered a success?
  • Do you roll 3 dice because the skill is 3?

Try explaining the game mechanic as you would explain it to a tabletop player who has never played your game before. Don't mention anything to do with Roll20.