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

Is it possible to combine attributes for die-rolling macros?

January 17 (12 years ago)
Hi, I've only _just_ begun learning all about Roll20, and so far I'm mighty impressed. I'm having difficulty trying to set up macros for a Shadowrun campaign.

My goal was to use Attributes in the macro - SR uses a "Attribute+Skill" mechanic, so if my Agility was 3 and my Pistol skill was 4, I would roll (3+4=7)d6. Any 5's or 6's would be successes.

My problem is that when I write "/roll (@Agility+@Pistol)d6>5, it actually takes it to mean "Roll 4d6 (pistols attribute level), count 5's or 6's, and add 3 (agility attribute level). It doesn't add the agility value and pistol value together before rolling.

Is this a syntax problem with me? Or can someone suggest a workaround? The only other thing I can see would be to roll each of the two separately as part of the same macro, and do the math manually.

Thanks, Roll20 looks pretty fantastic other than that!

Jamie
January 17 (12 years ago)
Do:

/roll @Agilityd6>5 + @Pistold6>5
January 17 (12 years ago)
That's perfect! Thanks! (And such a quick response, too!)
January 17 (12 years ago)
Does it work? I wasn't sure it would since I was at work and couldn't test it myself.
January 17 (12 years ago)
Nico198X
KS Backer
hey there! i need this capability as well, for nWoD Storyteller system. unfortunately the formula you gave me doesn't work. it produced this:

rolling 3 d10!>8 + 2 d10!>8
3(3)>8+2(7)>8 = 50 Successes

which is not right. =) the formula i used was:

/roll @Dexterityd10!>8 + @Firearmsd10!>8

any other ideas?
January 17 (12 years ago)
Jonathan's fix should work fine, but I suspect that you're going to run into a problem when you try and add modifiers to your die pool. @pistols+@agility works fine, but @pistols +@agility + 2 will just add two the the successes rolled rather than 2d6.

At present, I've not had a great deal of success with getting the macros and abilities to automate with shadow run yet. But I'm hoping they add some features to make it work right soon
January 18 (12 years ago)
Gauss
Forum Champion
Nico, I would suggest deleting the space between @Dexterity and d10!>8 and between @Firearms d10!>8

If you have a space between them it will give you a multiplication result. If you have no space it will work fine.

After typing @Dexterity'space'd10!>8 go back to before the 'd' and hit backspace. This will get rid of the space. Then move it to @Firearms'space'd10!>8 and repeat the process.

Note: I recognize that your example has no spaces between the attribute and the d10 but I am guessing that you do in fact have a space there in your macro. Without the space it works correctly. With the space it multiplies as you demonstrated.

I hope this helps.

- Gauss
January 18 (12 years ago)
Gauss
Forum Champion
Yann, could you go into more detail regarding your shadowrun macro needs? Namely, what exactly would your macro be that you wish to add +2d6 to?

- Gauss
January 18 (12 years ago)
Gauss
Forum Champion
Just a note for everyone using Shadowrun or nWoD mechanics. You can add a set of bonus dice to a macro roll. You can also add bonus dice that check successes to a macro roll.

Note: the following includes a space between the attribute and the 'd' for clarity. Delete the space in your macros to make it work. For the purposes of these examples statone and stattwo will have values of 4 and 5 respectively.

Example of macro (with successes):
/roll @statone d12!>8 + @stattwo d12!>8

Example of macro in chat box:
#macro +2d12!>8

Example of macro results:
rolling 4d12!>8+5d12!>8 +2d12!>8
(10+1+4+4)>8+(3+9+7+8+4)>8+(9+11)>8 = 5 Successes

Note: you cannot combine successes with non-successes. Either the entire macro and the addon must have successes or none of them.

In this way you can add extra success based dice.

- Gauss
January 18 (12 years ago)
Nico198X
KS Backer
thanks everyone! very helpful! it works now. =D

and awesome Gauss, now i can add equipment/environment modifiers to a macro easily! =D
January 18 (12 years ago)
Yann, could you go into more detail regarding your shadowrun macro needs? Namely, what exactly would your macro be that you wish to add +2d6 to?

- Gauss


I can try.

So in Shadowrun, it's all about the die pool. You add a skill and an attribute (say agility and pilot ground craft.) Then you apply the modifier.

That modifier changes how many dice you roll. So attempting a tricky driving stunt under pressure might lower your die pool by 4. So you'd need to be roll @agiltyd6>5+ @groundcraftd6>5 +@modifierd6>5. Let's pretend both agility and pilot ground craft are 5.

/r 5d6>5+5d6>5 +- (or just -) 4d6>5. The problem is that the modifier will be applied to the final number, not the amount of dice thrown. So rather than rolling 6d6, you roll 10, then subtract the result of 4 from your successes. It's similar, but not ideal.

It'll also not work if the modifier is 0 (the dice just won't be thrown.) If you leave the modifier blank, it'll roll it as a one. That's something of a bigger problem.

January 18 (12 years ago)
To clarify - you roll (attribute+skill+modifier)d6>5. If I could type THAT into roll20, I'd be ecstatic.
January 18 (12 years ago)
Two possible workarounds:

One, state a houserule that if the roll involves penalties, you'll disregard the first X dice as it rolls.

Two, use the 'abilities' tabs to create simple text-notes for skills ("Tank the troll soaks damage with @body + @impact-armor + @troll-toughness.") And use #macros to simply roll that many dice. (#8d, #11d, #3d, etc.)

The dice cups get shared via macros without trying to reference specific characters and the abilities are there as reminders to keep the base numbers straight. Unless/until they reprogram how it interprets the syntax of the 'success' die rolling mechanism it'll be ridiculously complex to auto-include bonuses and penalties.
January 18 (12 years ago)
You could even do 'edge' dice cups, which include the auto-explode mechanism (#8e, #11e, #3e) by using the ! Syntax built in.
January 18 (12 years ago)
Yeah, one of my players did the dice cup macros pretty much as you stated. I found it easier just to copy and paste the character sheets from chummer into the roll 20 character sheets and have players /r (amount of dice)d6>5. It's still a fast and easy way to play, but it means that I don't really use the potential to automate a lot of these rolls.

February 06 (12 years ago)

Is there anyway for this to work as a macro that you type

"#macro 3" and it adds 3 dice to the pool or
"#macro -3" and it subtracts the total dice?

Something like:

/roll @agility d6>5 + @firearms d6>5 + input d6>5

I just don't know what to put for the input. 

Thanks,

Casey


February 06 (12 years ago)

Not at this time.

Although if you're not using all three circle buttons at the top of the token, you could set one of them to be an attribute on the token and then change it to increase or decrease a roll.

February 06 (12 years ago)

Thanks Jonathan