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 choosing between two Attributes

I'm trying to set up macros for my next campaign, and something I'd like to do (and I'm not sure if it's possible yet) is to have the macro check two different attributes of the character using it, and use the higher of the two. I already know I can just make two macros, but I'd like to have it in one. Example: Acrobatics [[1d20 +@{selected|Dexterity}]] and if I wanted to choose the higher of Intelligence or Dexterity (this is just an example, I don't actually want to do that) Acrobatics [[1d20 +@{selected|{Dexterity or Intelligence} } ]] I was looking at the CP or Compare Point modifier, but I don't know if that can be used like this.
There's currently no way to do this. If we had some kind of max() or min() functions, something like this would work: /roll 1d20+max(@{selected|Dex}, @{selected|Int})
Thanks for the quick and helpful reply, HoneyBadger.
You should make a suggestion in the suggestion forums and ask for max() and min() options. They would be useful for a number of rpg systems.
Will do. I figured out a bit of a workaround for now. By making DexInt, WisCha, and StrCon attributes, and putting the higher of the two in it, I can reference that in the macro. Saves some clutter in the macro bar for only a little bit of extra clutter in the sheet. This is for a Gamma World (D&D 4e) game, btw.
1387748282

Edited 1387748343
Gauss
Forum Champion
The following should work. /r 1d20+{@{selected|Dex}, @{selected|Int}}kh1 To get max the format would be: {value1, value2}kh1
You guys are genius, thank you.
1387748515
Gauss
Forum Champion
Happy to help. :)