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

Stat Check macro

I want to create a macro for characters to make stat checks that has a dropdown to pick the stat then roll a d20 and add it, but i can't get the dropdown to work right. Does anyone have a working one they could post here so i can compare and see where I'm going wrong?  thanks
1673537730
Gauss
Forum Champion
Which character sheet? Most likely your problem involves HTML entities, they can be a major pain to get right. The simpler method is to use a chat menu.  If you post your macro we could see what is going on.
1673541291
timmaugh
Pro
API Scripter
Also, queries resolve after inline rolls ( order of operations ), so to do it this way you would need to have a separate roll in each option of the query (adding a d20 to your fluffiness stat, then adding a d20 to your wiggliness stat, then adding a d20 to your permeability stat, etc.). You'd be picking the roll to use with your query. Alternately, you can do a chat menu as Gauss suggested, or you can use some metascript tricks to have a single roll and make it work with your query: !The value is [\][\]?{Which stat?|Fluffiness,@{selected|fluffiness}|Wiggliness,@{selected|wiggliness}|Permeability,@{selected|permeability}}+1d20\]\]{&simple} That would require ZeroFrame. More complexity might introduce the need for another metascript.
1673546582

Edited 1673546628
GiGs
Pro
Sheet Author
API Scripter
Honestly, this sounds a simple macro at its base, but might be made complicated by exactly how you present it. It's impossibe to answer really without more information - like what your stats are called, what attribute names they use, whether you are using a rolltemplate, and so on. But here's a very simple approach: /roll d20+?{Choose Stat| Strength,@{STR}| Wisdom,@{wis}| Charisma,@{cha} }
1673551252
timmaugh
Pro
API Scripter
GiGs said: It's impossibe to answer really without more information - like what your stats are called [and] what attribute names they use... But that's where the fun comes in. Just throw attributes out. Sequin Bedazzlement Dance-Off Fortitude Spaghetti Content Straight-face the delivery: [[@{selected|spaghetti_content}d11]]