Using Roll20

I'm starting up a game for a few friends on Roll20. I've found the character sheet and there has clearly been a lot of work put into it.

In messing about with it I've got a question, How do I get it to roll a stress die rather than a simple die?

If it's the same sheet we use on Roll20 (I think there's just the one?) then the "Roll" button on the top left of a character sheet rolls a single simple die and each of the buttons beside characteristics, abilities, and on the magical arts and combat tabs should default to stress dice.

I don't think there is a button for rolling a stress die outside of the ability/spellcasting/combat/characteristic rolls, but a workaround would be to add an ability called "Stress Die" to each character sheet with a score of 0, and not use a characteristic with it - which is equivalent to rolling a stress die +0 +0 (so just a plain stress die).

That's not what it does for me. After reading your reply I rolled a bunch of ability checks until I got both a 0 and a 1. Roll20 gave them both a helpful color but it still treated them as a simple die, as if I'd rolled a 10 and a 1.

But this does work for you? Ergo there is some way to get it to work.

It doesn't in the sense of automatically rolling additional dice for an explosion or botch dice for a botch, you have to do that yourself on the appropriate result (which is highlighted red or green on stress dice for botches and explosions respectively).

It's not very simple to perform the stress die behaviour automatically on roll20, as the dice rolls don't allow for exploding dice on the lowest result rather than the highest (so they would end up exploding on 10s, when we want explosions on 1's and botches on 10) and the power of 2 explosion method Ars uses is not a common one either. There's only a limited amount of flexibility in the dice rolling system. If you have a subscription that gives access to the scripting API then it's possible as that system is much more flexible. It's pretty easy to do in that case.

edit: if the owner of the campaign has a subscription to allow for API use this API script will roll one stress die with automated explosions and botches (trigger by typing "!sd X" where X is the number of potential botch dice):

on("chat:message", function(msg) {

if(msg.type == "api" && msg.content.indexOf("!sd ") !== -1) {
var args = msg.content.split(" ");
var botch_dice = args[1].trim();

    var rint = Math.floor(Math.random() * 10);
    if(rint == 0){
        sendChat(msg.who, "Botch!"); 
        var botch_count = 0;
        for (i = 0; i < botch_dice; i++) {
            var rint = Math.floor(Math.random() * 10);
            log(rint);
            if(rint == 0){
                botch_count = botch_count+1;
            }
        }
        sendChat(msg.who, botch_count + " Botch(es)");
    }
    else{
        end = false;
        total = 0
        round = 0;
        while(end == false){
            var rint = Math.floor(Math.random() * 10);
            if(rint != 1){
                end = true;
                total = rint*(Math.pow(2,round));
            }
            else{
                round = round + 1;
            }
        }
        if(round == 0){
            sendChat(msg.who, "Roll Result: " + total);
        }
        else{
            sendChat(msg.who, "Explosion!");
            sendChat(msg.who, "Roll Result: " + total);
        }
    }
    
    
}

});
2 Likes

Thank you, $100 per year for the Subscription that uses API is a bit rich, but I might consider it.

As someone who does pay for the top tier subscription, I honestly wouldn't recommend it unless you're planning to run games very regularly on the platform. I have two weekly games that have been hosted on Roll20 for years now, so we get our worth out of it. The main advantages are that if the owner of a game has a subscription nobody gets any ads on it, you get much more storage for assets, and the API and custom character sheets. Whether that's worth $100 annually is very situational.

You can do some cool things with the API and custom sheets though, like you could hook the above script into the character sheet so that all the stress dice rolls do the automated botches and explosions. I also have a set of scripts for making grogs very quickly that are quite handy (uses the packages from Grogs but appies them directly to the character sheet on Roll20).

Can you get Roll20 to reroll 1s, count the rerolls, and then output (2^(# of 1s))*(last roll) ? If you are only using the built-in rolling syntax, you wouldn't need to pay for the api access.

Roll20 Dice Syntax

You can have rolls which reroll on a 1, but there isn't a way to keep track of the number of times this has happened (which you need to know how much to multiply by). The normal dice rolls (without the API) can't be recursive or keep track of variables.

Although I have API access, I don't actually use it myself for Stress dice - the stress die roll on the AM5e character sheet highlights an explosion roll in blue, then we just do the rerolls and multipliers manually by rolling d10s (as you would with physical dice).

Ah, recursion! I got into some trouble a while ago implementing stress rolls. While I think the problem came when doing then in MySQL (it happens to deeply dislike recursion), I got a way to get rid of recursion for resolving stress rolls at all. The idea was considering just one random number. Then, non exploding rolls are the values between 0.1 and 1 (it's cut on 0.9 because I ended rounding up, so 0.1... would be 2, 0.2... would be 3, and 0.9... would be a 0), then rolls exploding 1 time are the values between 0.01 and 0.1, rolls exploding 2 times would be numbers between 0.001 and 0.1, and so on. And then to know how many times the dice is rolling, just get the log of the random number in base 10.

Here is the function I got:

function stress_roll() 
{
	var seed = Math.random();
	var roll = 0;
	if (seed < 0.9)
	{
		roll = Math.ceil(
				10 
				* seed
				* Math.pow(10, Math.floor(Math.abs(Math.log10(seed)))))
				* Math.pow(2,  Math.floor(Math.abs(Math.log10(seed))));
	}
	return roll;
}
1 Like