Advertisement Create a free account

How to get a choice of sheet roll or 2 (regular) rolls from a Drop-Down Prompt

1539329829

Edited 1539425472
I'm not sure if I should be posting this in (the forum) Character Sheets & Compendium or here (in Specific Use Questions & Macros); moderators please move me if appropriate. I have an ability question, which often is also called macro (but I think technically isn't), for the D&D 5e OGL sheet. I'd like for a single Token Action (an ability option) to take care of something that the sheet doesn't. Ideally there would be a roll exactly like on the sheet but incremented but that currently isn't possible; so I figured I'd trigger that roll (which I got the ability code from dragging the sheet "button" into the macro bar then clicking that new entry (into the macro bar) then in the Chat tab (in sidebar) text area I pressed the ↑ key), and have a text showing a simple value that the GM should take in consideration for the total (which he'd do a simple mental calculation) along with the text of where that increase come from, which in fact contain an Ability Command Button for ease of display for the whole game rule; which my attempt was ?{Which ASPECT to show the added bonus|ASPECT1, %{PC_NAME|ASPECT1}|ASPECT2, %{PC_NAME|ASPECT2}|ASPECT3, %{PC_NAME|ASPECT3}} += [[SHORT_FORMULA_FOR_NUMBER_TO_ADD]] from [RULE_NAME](~PC_NAME|ABILITY_NAME) but realized that wouldn't work as a prompt display with everything in the Drop-Down Prompt formula past the Name of Query. So I thought I might as well make the better of it and make a formula which would have the number added so I did [[d20+?{Which RULE_NAME ASPECT not supported by sheet?|ASPECT1, @{ASPECT1_mod}|ASPECT2, @{ASPECT2_mod}|ASPECT3, @{ASPECT3_mod}}+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] from [RULE_NAME](~PC_NAME|ABILITY_NAME) which worked but does not show a 2nd roll of it as the game often require it (if you know D&D 5e, it's for dis/advantage) so I thought I could enter the whole formula in each Drop-Down Prompt option [[?{Which RULE_NAME ASPECT not supported by sheet?|ASPECT1, ASPECT1 [[d20+@{ASPECT1_mod}+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] [[d20+@{ASPECT1_mod}+SHORT_FORMULA_FOR_NUMBER_TO_ADD]]|ASPECT2, @{ASPECT2_mod}|ASPECT3, @{ASPECT3_mod}}]] from [RULE_NAME](~PC_NAME|ABILITY_NAME) but it failed badly not displaying anything neither a prompt nor text the the Chat tab. If you know D&D 5e, it's for Remarkable Athlete plain ability check (not skill nor tool). I realize I could do this using 3 Token Action but I'd rather not as my Token Action bar (at top) quickly fill up and I don't want a 2nd row for it. Could you provide assistance or give a tip? Thank you kindly Update 1: Between the 2nd & 3rd codeblocks, it should have contained a mention that I just started to work on the formula when it failed, that my intention was for the 2 roll per aspect would have been for all aspects.
1539336681
GiGs
Pro
Sheet Author
Abilities are macros, btw. It's the roll20 name for a macro which is connected to a character. It allows for using shorthand with attribute names (no need to define the character name), but otherwise they are pretty much identical to macros. In your ability, is this text  SHORT_FORMULA_FOR_NUMBER_TO_ADD  in your ability, or have you replaced the formula with that text for posting to the forums? If you've replaced text it's going to make it hard to identify what's causing the issue. I'm wondering if there's something in that replaced text which is causing an issue (I suspect html entities, see the wiki ). You don't need to enclose the query in inline roll brackets, btw. Breaking down your ability into its components below, nothing jumps out at me as causing an issue. ?{Which RULE_NAME ASPECT not supported by sheet?| ASPECT1, ASPECT1 [[d20+@{ASPECT1_mod}+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] [[d20+ @{ASPECT1_mod}+ SHORT_FORMULA_FOR_NUMBER_TO_ADD]]| ASPECT2, @{ASPECT2_mod}| ASPECT3, @{ASPECT3_mod} } from [RULE_NAME](~PC_NAME|ABILITY_NAME)
SHORT_FORMULA_FOR_NUMBER_TO_ADD was a placeholder for ceil(@{pb}/2) so those not familiar with D&D 5e or the sheet wouldn't have to worry about that that mean. If you want to know exactly what the formulas are, it's the following with only the PC name censored: ?{Which ability to show the added bonus|Strength, %{PC_NAME|strength}|Dexterity, %{PC_NAME|dexterity}|Constitution, %{PC_NAME|constitution}} += [[ceil(@{pb}/2)]] from [Remarkable Athlete](~PC_NAME|ftrRemarkableAthlete) [[?{Which Remarkable Athlete ability check not supported by sheet?|Strength, Strength [[d20+@{strength_mod}+ceil(@{pb}/2)]][[d20+@{strength_mod}+ceil(@{pb}/2)]]|Dexterity, @{dexterity_mod}|Constitution, @{constitution_mod}}]] from [Remarkable Athlete](~PC_NAME|ftrRemarkableAthlete) Removing the inline roll brackets around the Drop-Down Prompt from the OP last formula did the trick. I then thought the 1st formula in the OP was wrong and its Drop-Down Prompt was in inline roll brackets but all of my attempts are in the same file and I did undos and found out it wasn't, I tried it again as it was and the OP 1st formula still failed. I used multiple lines as it's clearer and barring being able to do something along what I wanted to do with my OP 1st formula, I'm going with: ?{Which Remarkable Athlete ability check| Strength, **Strength** [[d20+@{strength_mod}[STR]+ceil(@{pb}[PROF]/2)]] | [[d20+@{strength_mod}[STR]+ceil(@{pb}[PROF]/2)]]| Dexterity, **Dexterity** [[d20+@{dexterity_mod}[DEX]+ceil(@{pb}[PROF]/2)]] | [[d20+@{dexterity_mod}[DEX]+ceil(@{pb}[PROF]/2)]]| Constitution, **Constitution** [[d20+@{constitution_mod}[CON]+ceil(@{pb}[PROF]/2)]] | [[d20+@{constitution_mod}[CON]+ceil(@{pb}[PROF]/2)]] } w/ [Remarkable Athlete](~PC_NAME|ftrRemarkableAthlete)
1539356389
Scott C.
Pro
Sheet Author
API Scripter
What aspect of 5e are you trying to take care of? Or is this a home brew/3pp rule? Nothing wrong with those, but just to figure out if the sheet should have this in it's functionality.
1539362259

Edited 1539362572
The 2nd-to-last paragraph of the OP, along with multiple times in my last post, is the aspect mentioned. Type of usage/play is RAW. The sheet is mentioned at the start of the OP 2nd paragraph, in case it's necessary current version is 2.5. One also don't need to know any rule or any specific sheet to try to get the 1st codeblock of the OP to work, which is explained right before (even what key to press). My OP edit was formatting (changing indented paragraphs into codeblocks), none of the text was changed.
1539363297

Edited 1539363361
I think  your issue in the last code portion (to account for adv/disadvantage) is that you are putting the entire query with the multiple rolls into an inline calculation. If you are wanting both roll results, this is instead combining them into a single result. Does this work for what you want? [[d20+?{Which RULE_NAME ASPECT not supported by sheet? |ASPECT1, @{ASPECT1_mod}[ASPECT1]+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] [[d20+@{ASPECT1_mod}[ASPECT1] |ASPECT2, @{ASPECT2_mod}[ASPECT2] |ASPECT3, @{ASPECT3_mod}[ASPECT3] }+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] from [RULE_NAME](~PC_NAME|ABILITY_NAME) I kept the common portions (each is a d20 + ?{MOD} + SHORT FORMULA), outside of the query. The special case with ASPECT1 with wanting multiple rolls I handled by finishing the first roll and starting the second roll within the value for the query, but the remaining common functionality should still function as intended. If you need all of the aspects to have the multiple rolls, this macro could become even simpler. ?{Which RULE_NAME ASPECT not supported by sheet?| ASPECT1, [[d20+@{ASPECT1_mod}[ASPECT1]+SHORT_FORMULA_FOR_NUMBER_TO_ADD]]| ASPECT2, [[d20+@{ASPECT2_mod}[ASPECT2]+SHORT_FORMULA_FOR_NUMBER_TO_ADD]]| ASPECT3, [[d20+@{ASPECT3_mod}[ASPECT3]+SHORT_FORMULA_FOR_NUMBER_TO_ADD]] } ?{Which RULE_NAME ASPECT not supported by sheet?} from [RULE_NAME](~PC_NAME|ABILITY_NAME)
1539424829

Edited 1539425606
That worked great. The only problem is I want a label for the roll, ie: ASPECT1, **ASPECT1** [[d20 ; and AFAICT with this way of doing it, I either get no label or 2, the latter worse than the former. Also what I really want is for the sheet option to be triggered, see OP 1st codeblock (and explanation just before), but it's looking less & less like it's a possibility. Update 1: I diagonally read through your post and focused on the 2nd codeblock (for the previous part of my post). I noticed your 1st codeblock then noticed you though the 1st aspect was a special case which wasn't, I just forgot to write something in the OP, see its Update 1.