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

Need Help Making This Macro Work

1507919042

Edited 1507919070
Ok here is my idea for a macro but when I try to make it work I just seem to be doing something wrong, any help would be appreciated.  ?{Gear or Kit | None, 0 | Item1, ((@{Character|Attribute}+@{Character|Bonus})*?{Multiplier | 0 | 1 | 2 | 3 | 4 | 5}) | Value2, Repeats same steps as value 1 but would reference different attributes | Same ..... on to roughly 20 items Optional, the multiplier query could allow them to enter their own number instead of a dropdown. Thanks.
The main problem is the Multiplier query nested within the Gear or Kit query. The problem is that queries end at the first '}' it comes across (attribute calls (@{}) and ability calls (%{}) are exceptions to this rule). As such there are two ways you can fix this. 1. If each item has a potential multiplier, why not move the multiplier query outside of the gear or kit query? This would be the ideal solution as you would only need to modify the multiplier query once. 2. Use can use HTML encoded values to nest the queries together. Look  here for more information. While not ideal for this use-case, it is good to know that it is possible. 
The goal is to only use the multiplier IF there is Gear or Kit being used, but im not sure how to do that without it being in the Query every time, although I tried it and even if they select none, it still queries the multiplier.  I tried to do it with the HTML encoded values as well, but I got a bit confused and it just started spitting out the code or giving me syntax errors
Here's how I would do it. Going with the Multiplier outside of the Gear or Kit. Yes, it means that the user will be asked even when not using it, but maintenance on the macro would be easier. You'll also notice that I like to put each option in a query on a separate line, it makes viewing/editing the macro simpler and still works for macros so long as you start the query on the same line as previous code and continue the code on the same line as the final '}' for the query. (?{Gear or Kit |None,0 |Item1,(@{Character|Attribute}+@{Character|Bonus}) }*?{Multiplier|0|1|2|3|4|5}) However IF you must have it as a nested query, this is what it is going to look like ?{Gear or Kit |None,0 |Item1,((@{Character|Attribute}+@{Character|Bonus})*?{Multiplier|1|2|3|4|5}) }
Kyle that almost works for me but for some reason the multiplier numbers are showing on the first drop down, it has options as follows: none, item1, 1, 2, 3, 4, 5 Now my ultimate goal here is to put this in a button on a sheet for skill rolls, again i appreciate your help. Feel free to private message me if you want to, or reply here. 
Can you post some screen shots on what you mean? I'm not sure I understand. I also just tested it on my end (I replaced the attribute calls with text versions in my instance.)
Kyle ok I don't know what I did but when i retried it it worked. I cannot get it to replicate what it was doing. But in your first screenshot, it listed both the values for gear or kit and multiplier at once.  Now i just need to figure out how to make it work on the sheet button for each skill and add the other 19 options. (each skill potentially can use different gear or kits).