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

Having Part of a macro roll before a query is asked.

1551358150

Edited 1551358206
Hi, I'm trying to get a macro to roll a table (figured out that) and then have a query pop up. Since the option I will want to choose from the query will depend on that table roll. At the moment it asks the query first, then rolls the table even though it is after in the macro. Idk if this is possible but if it is I would like to know. Thanks!!!
I believe you need to put the query on a separate line than the query. [[1t[table]]] ?{Query}
1551361657

Edited 1551362172
Kirsty
Pro
Sheet Author
Due to the order of operations , I don't think it's possible to have the query pop up after the table is rolled. You could put in an API button that would show up in chat and then ask for the mod. It would be one more click, but it would give you the result you want. Edit: I did some messing around to give an example. Make a new macro called "mod" with the following code: ?{mod} Make a new macro and paste this: [[1t[tabel]]] [Modifier](!
#mod)
Kyle G. said: I believe you need to put the query on a separate line than the query. [[1t[table]]] ?{Query} This is what I tried first and what happens is that it asks for you to pick a query and once you do it rolls the table.
Kirsty said: Due to the order of operations , I don't think it's possible to have the query pop up after the table is rolled. You could put in an API button that would show up in chat and then ask for the mod. It would be one more click, but it would give you the result you want. Edit: I did some messing around to give an example. Make a new macro called "mod" with the following code: ?{mod} Make a new macro and paste this: [[1t[tabel]]] [Modifier](!
#mod) I dont think i can use API stuff, I'm not a pro member
1551364209
GiGs
Pro
Sheet Author
API Scripter
The name "API button" is misleading - it can be used by free members.
1551377459

Edited 1551377509
GiGs said: The name "API button" is misleading - it can be used by free members. Still couldn't get Kirsty's macro to work though. I also don't really understand it.
1551378632
Kirsty
Pro
Sheet Author
Hi Ben. Sorry my instructions weren't very clear. Let me try again! Step 1: Make a macro and call it "query" (capitalization matters!). Inside the macro, type "?{query}" and then save it. Please note, this macro should not be on a character sheet. It should be in the Macros section of your journal. Step 2: Make another macro and call it whatever you want. I'm going to call mine "Table-Roller". Step 3: Inside "Table-Roller" type  [[1t[table]]] [Query](!
#query) Step 4: Replace the word "table" in the above macro with the name of the table that you'd like to roll.  Expected output: When you click on the "Table-Roller" macro, you should see the output from your table in the chat window. Next to it will be a pink button that says "Query". When you click on the "Query" button, it will ask you for input.
Kirsty said: Hi Ben. Sorry my instructions weren't very clear. Let me try again! Step 1: Make a macro and call it "query" (capitalization matters!). Inside the macro, type "?{query}" and then save it. Please note, this macro should not be on a character sheet. It should be in the Macros section of your journal. Step 2: Make another macro and call it whatever you want. I'm going to call mine "Table-Roller". Step 3: Inside "Table-Roller" type  [[1t[table]]] [Query](!
#query) Step 4: Replace the word "table" in the above macro with the name of the table that you'd like to roll.  Expected output: When you click on the "Table-Roller" macro, you should see the output from your table in the chat window. Next to it will be a pink button that says "Query". When you click on the "Query" button, it will ask you for input. This worked Thanks, Idk why it didnt work before It seems to be the same thing but I'm not going to question it.
1551387169
Kirsty
Pro
Sheet Author
I'm so glad to hear you got it working! :D