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

Help: Applying 2 Variable Modifiers in a Single Macro

Hello,


I'm attempting to build a general macro for a game I'm working on. Essentially it's a simple roll with the dice and primary modifiers already hard built into the macro. However, the feature I'm trying to figure out is for a player to input 2 variables, the secondary modifier, added to individual rolls w/in the same macro. Here's what I got currenty:


&{template:default} {{name=Shoot Skill}} {{accuracy=[[1d12+10]]}} {{damage=[[1d20]]}} {{critical 1=[[1d6]]}} {{critical 2=[[1d6]]}}


I know "+ ?{Modifier|0}" is the general script for the input prompt, but my issue is I'm trying to get 2 prompts: 1 for the "Accuracy" value and the other for the "Damage" value. Even if I have the general script inside the {{ }} for both values, I only get 1 input prompt and that input is applied to both values when that's not something I want.

This ultimately is a superfluous issue, but it'll require more writing or in head math for my players, and I want to avoid that since this is the only technically-complicated roll in the game.

Appreciate any help or advice.

The queries need different names. If multiple queries have the same name, it will apply the first input value to all, regardless of what options the later ones have. Try this:

&{template:default} {{name=Shoot Skill}} {{accuracy=[[1d12 + 10 + ?{Accuracy Mod|0}]]}} {{damage=[[1d20 + ?{Damage Mod|0}]]}} {{critical 1=[[1d6]]}} {{critical 2=[[1d6]]}}

That worked perfectly. Thank you very much.