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
This post has been closed. You can still view previous posts, but you can't post any new replies.

New Macro Update

1339327365
Riley D.
Roll20 Team
Hey everyone, We just pushed out an update to the Macro system. It's not really a "full update", more tweaks. - Macros can now be only one character long (e.g. "#n"). - Macros can now contain non-command lines mixed with command-lines, for example: /roll 1d20+5 I smite you! Will now roll, then send the chat message "I smite you!" to all users. And, the big one: - Macros can now be nested, and can also now be used directly next to words/numbers. So you can now do the following oft-requested feature: Macro "r" = d6+8>5 /r 4#r Which would roll 4d6... . So you can set up the "complicated part" of the roll ahead of time, then just specify how many dice to roll. In addition, an example of a nested macro would be: Macro "dmg" = /roll 2d6+4 Macro "attack" = /roll 1d20+5 Macro "both" = #dmg #attack The "#dmg" and "#attack" would first be translated into their proper rolls, then the "#both" macro would be evaluated, performing both rolls at once. Nested macros don't have to be on different lines, and you can really mix and match in a lot of different ways. It's a simple addition that should open up a lot more power in the Roll20 macros system. Note that there is a hard limit of 99 levels deep that you can nest macros, to keep computers from going into an infinite loop and crashing in case you accidentally create an infinite loop. Let me know if you have any comments/questions/bug reports about this new feature. Thanks!
Just stumbled across this and it's very cool. One thing I noticed - I set up the macros you used up there, and had the macro "both" like this: #attack #dmg What I ended up with was in the attached screenshot (it concatenated them into a single roll and divided 5 by 3, then summed them all). Putting the nested macros on separate lines fixed that as a temporary workaround.
WHOOPS. I'd posted a comment on how the "4#r" feature wasn't working, but I misread how to do it; that one is working fine.
Chris, Commands (and macros that begin with commands) still need to be on separate lines. I just meant that you can nest macros on the same line if they just contain part of a command or a number etc.
Ah, okay, that makes sense.
About about variables in macros #dice = "/roll Ad4+B" #dice 3 6 rolls 3d4+6 This is a simple example, but something like this could really add some flexibility.
even better example would be #dice = "/roll AdB+C" #dice 3 4 6 rolls 3d4+6
1339435363
Alicia
Sheet Author
It would be nice to see a feature like the following: /r 1d20+?mod The ?mod would produce a 'pop up' which would ask you the value of "mod". Mod could be replaced by anything you wished to remind you what it's asking. So IE /r 1d20+?bab+?halfLevel+?abil+?mod
1339504801
Bob
KS Backer
Actually, with this you pretty easily mimic a variable. I just finished updating all my Macros. For instance, if you wanted to have a strength mod in various macros for easy updating... #STR = 5 #WEAPON = 2d6+3 #Damage = /roll #STR + #WEAPON now to update the damage you need only update the Str or Weapon macro, and you can only put the #Damage on the bar for easy rolling. For the game I'm in, I have to make 4 or 5 attacks that all relate to weapon damage and a stat, so leveling up would be a chore of updating various macros. Now, I just reference my #STAT macro, and update it once when that stat changes. Nice and simple.
1339582021
Alicia
Sheet Author
That could work, but I'm more thinking for games like Star Wars Saga Edition which has a Condition Track penalty when you start taking damage. The penalty isn't always there, but it would be nice to have a way to include it when the time comes.
You can include a modifier that isn't always there by typing the desired modifier after the name of the macro. Example: I created a macro "test" with text "/roll 3d6". Typing "#test" into the chat window produced rolling 3d6 (5+4+1) = 10 Typing "#test -2" into the chat window produced rolling 3d6 -2 (6+4+6)-2 = 14 Now, that doesn't pop up a reminder the way you want. But dealing with pop-ups every time you use such a macro sounds very awkward and time-consuming to me, anyway.
It's not. A popup to take a modifier is generally a pretty seamless operation; certainly no more unwieldy than typing the dice roll in the first place. I'm not particularly in favor of too many additions to the macro system that are being suggested here and there - if conditions, complex sorting, etc. are not something I'm really interested in (not to suggest that the people who do want them are bad or wrong, just that I personally think a lot of it can be dispensed with). I have other solutions for complex games, as it is. On the other hand, a few things would be nice to see. For instance, as suggested elsewhere, a way to say "best of two dice rolls" (for Savage Worlds). Or just a "min" and "max" option - best of N rolls, worst of N rolls. Similarly, a way to issue a simple popup prompt for a modifier to a roll (default it to 0, let "Enter" close the popup if it's not needed, of course) would be nice for the folks that want to use the macro button bar without having to code a macro for each possible modifier. Since it wouldn't have to be used, it seems like a win. Of course, I am speaking from the POV of someone who would rather change VTTs than be forced to use a manually typed dice roll or macro alias. So I'm kinda out on the fringe.