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

[Macro design] Adding variable to static dice...

1384270528

Edited 1384270668
Tom
Pro
Sheet Author
I'm running Witch Hunter 2nd edition, which is a dice pool game using d10s very similar to WoD mechanically. I'm very new to Roll20 and a big green macro newbie. So here is what I'm trying to do. As a character ability, I want to create a macro/ability for my melee attack. Here is roughly the formula I need to use: Roll #d10s = to Attribute (Strength) + weapon damage dice (static) + extra successes (quarried); any roll of 10 explodes for a bonus die. The current Macro I have in place looks like this: /me attacks /roll ?{Melee Dice Pool|2}d10!10>7 vs Avoidance /roll ?{Weapon Damage Dice|1}d10!10>7 Damage So my weapon damage dice need to be a variable (Attribute) plus a static number (weapon damage) plus a variable (?[extra successes}). So far, I haven't really found a way to do this. As a test, I tried: /roll [@[Strength}+2}d10!10>7 Damage That did not work. I'd also LOVE to automate the bonus success damage, but I figure that will have to wait until the token targeting feature comes online...or will it? Can anyone tell me what I'm doing wrong here? While we're at it, is there a way to set a macro to roll dice = to 2 attributes? As in: /roll [@{Strength Attribute}+@{Melee Skill}]d10!10>7 Thanks! Tom
You can do this by using inline rolls in your roll statement. Just double up the square brackets, and the roller will evaluate the contents first, then run the roll statement: /roll [[@{Strength Attribute}+@{Melee Skill}]] d10!10>7
1384272645
Tom
Pro
Sheet Author
Alright! So that's working now. So it was just the double brackets that was causing the trouble? Because now this macro line: /roll (2+[[@{Strength}+@{Melee}+?{Bonus Successes|0}]])d10!10>7 Damage Seems to be working fine, too.
1384274561

Edited 1384275785
Tom
Pro
Sheet Author
Ok, a related question. Can I prompt a secret roll from a selected token's ability? Like a Notice roll? So instead of... /gmroll [[@{selected|Notice}+@{selected|Intuition}]]d10!10>7sd Something like... /gmroll #{selected|Notice-Roll} Edit: Ok, slowly figuring it out. According to the macro page, the command should be: %{selected|Ability} But plugging in /gmroll %{selected|Notice-Roll} doesn't work at all. Tom
Usually, abilities usually have the commands at the start of them. Things like /em, or /roll. If you try to add a /gmroll in front of that, it ends up being: /gmroll /roll stuff goes here . The interpreter won't be able to figure out what you're trying to do, because "/gmroll /roll" doesn't mean anything. A different approach would be to put "Notice-Roll" as an ability. This would just contain the die expression [[@{Notice}+@{Intuition}]]d10!10>7sd. This could then be called using /gmroll @{selected|Notice-Roll} or plain old everyone can see /roll @{selected|Notice-Roll}. Either of those calls could be put into macros or abilities.
1384281806
Tom
Pro
Sheet Author
Yeah, see I tried /gmroll %{selected|Notice-Roll} and got all sorts of errors. About the only thing that worked was /w gm %{selected|Notice-Roll}. Now, this could be because the ability includes a /me statement. Maybe I should try it without that. And sure, doing a full Skill+Attribute roll command is my fallback. But I'd really like to figure out how to prompt secret rolls from selected character "abilities" since then the work is already done and the command line is shorter and (theoretically) less prone to error. Notice is just screaming out for this sort of control, along with perhaps Charm rolls, "detect lie" rolls and other odds and ends where the player knowing the result of the roll can color their experience. Tom
1384460605
Tom
Pro
Sheet Author
David, Sorry. Reread your post and it made much more sense. Thanks for the help. I'll adjust my macros. :)
you can also whisper an inline roll to yourself. /w DM [[1d20+?:Init &[tracker}]] is one I use often