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

Create Variable inside a Macro

I'm a beginner in Roll20, but I would like to create macro for spellcasting abilities that would ask all the variable to the player and then roll the dice for him. But I don't know how to create these variable.

The idea is to ask :

  1. E = difficulty of the effect [0,7]
  2. D = duration modificator [-1, 8]
  3. T = #targets modif [0,10]
  4. Keep E+D+T as "diff"
  5. S = character skills and Bonuses [1,10]
  6. M = Target and environment maluses [1,10]
  7. and roll |S-diff-M|d6 kh1 (or kl1 if negative)

My difficulty is really to create E, D, T, diff, S and M

Is there a way to do that ?

April 15 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

Roll20 dice macros cant use variables, and cant store results to use them later.

But what you're asking can (I think) be achieved by using queries in a macro. for example, create this as a macro

!?{Effect difficulty|0} ?{Duration Modifier|0} ?{Targets Modifier?|0}
/roll [[?{Skill|0} - (?{Effect difficulty} + ?{Duration Modifier} + ?{Targets Modifier?} - ?{Target Modifier|0}]]d6kh1

My concern is this is a lot of popup queries for every roll.

I would combine E, D, T, and M into a single modifier. You might even combine them all into a single query.

Imagine youre playing at the tabletop, players are discussing actions with the GM, they say what they are doing, the GM tells them the various modifiers and usually adds them to a single total and tells them that.

There's a tendency for people to get the computer to handle all the modifiers, but that makes things much slower than it needs to be. You are still talking to each other, and its much quicker to put in a single number once youve decided on your action.


I have my answer.

Thank you  GIGs