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

Drop down prompts question

My apologies if this has already been answered, couldn't find it for myself. I have an existing macro which rolls the following: [[?{Number of Dice|1}d10+3+?{Charge Level|Standard, 0|Overcharge, 1|Overload, 2}]] What I want is if Overload is selected the result has an additional piece of text saying "Penetration 2". How can I do this? Thanks!
1483215518
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Two ways to do this I think. Use roll labels and have the "penetration 2" show up in the tooltip [[?{Number of Dice|1}d10+3+?{Charge Level|Standard, 0|Overcharge, 1|Overload, 2 [Penetration 2]}]] Nest the end inline roll brackets in the query to allow you to have the penetration 2 notice outside the roll [[?{Number of Dice|1}d10+3+?{Charge Level|Standard, 0]]|Overcharge, 1]]|Overload, 2]] Penetration 2} Hope that helps, Scott
That was perfect thank you!
1483218764
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Happy to help
One other question if I may, I'm using the following macro: &{template:default} {{name=Lasgun}} {{Damage=[[3+?{Number of Hits|1}d10+?{Charge Level|Standard, 0[Penetration 1]|Overcharge, 1[Penetration 1]|Overload, 2 [Penetration 3]})]]}} {{Damage Type=**Energy**}} The only thing I need to fix is that in this instance it needs to sum each 1d10 individually adding the relevant bonus. So instead of it being 3+3d10+2 (on overload) it should be 3 seperate rolls of 3+1d10+2.  Is this possible?
1483249771

Edited 1483249829
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sort of. If you need to see each roll with mods separately, there's no easy way to do that as you'd need to write out each roll and bonus (e.g. 3+1d10+2 + 3+1d10+2 + ...). However, if you just care about the final total, and just need to have the bonuses added for each dice rolled, you can do this: [[ [[?{Number of Hits|1}*3]]+?{Number of Hits}d10+[[?{Number of Hits}*?{Charge Level|Standard, 0]][Penetration 1]|Overcharge, 1]][Penetration 1]|Overload, 2]][Penetration 3]} ]] The nested inline roll brackets are just there to clean the tooltip up a bit. Also, took out the hanging parentheses you had in there.
1483250248

Edited 1483251091
Michael R.
Sheet Author
Dude that's awesome thanks! I realised I do need to know the individual rolls as each hit is soaked individually. I've moved the +3 into the numbers for charge level so it's now: [[ [[?{Number of Hits|1}]]+?{Number of Hits}d10+[[?{Number of Hits}*?{Charge Level|Standard, 3]][Penetration 1]|Overcharge, 4]][Penetration 1]|Overload, 5]][Penetration 3]} ]] The only issue is, for example, if there's 3 hits at standard level it has to show 3 separate instances of 1d10+3, how could you suggest I do this?
1483252831

Edited 1483252901
Andrew C
Marketplace Creator
Maybe you can do a set of 'Keep Highest' checks or Greater Than checks? [[ [[ ({?{Hits|1}>0})*(1d10+?{Charge Level|Standard, 3|Overcharged, 4}) ]] [Hit 1] + [[(?{Hits}>1)*(1d10+?{Charge Level})]] [Hit 2]+... ]]
I'm unfamiliar with the system, but if you're looking to compare against some target number, you can wrap things in a Target Number function to output the number of successes: [[ {[[?{Number of Hits|1}]] + ?{Number of Hits}d10 + [[?{Number of Hits} * ?{Charge Level|Standard, 3]][Penetration 1]|Overcharge, 4]][Penetration 1]|Overload, 5]][Penetration 3]}}>?{Target Number|7} ]]
I'm still not figuring it out, might be new years day syndrome! The issue I have is the following, my characters are firing a semi automatic weapon with a variable power setting.   I want the macro to pick up on both the number of hits which are successful and the power setting of each hit. We need the total power of each hit (for example two hits should show the results  of 1d10+3, 1d10+3) but unfortunately now I'm coming up with a result which is either 2d10+3 or 2d10+6, both of which aren't correct. Is it possible to do this?  If you already answered this then forgive me!
Another question for an alternative: Can I use a macro which will let me repeat another macro a number of times using [[?{Hits|1|2|3}]]?
1483282412

Edited 1483282768
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
So, I'm guessing there is an upper limit on the number of attacks you can make, and therefore the number of hits you can score. In order to have each hit separated out, I'd probably use  advanced roll query nesting to do this: &{template:default} {{name=Lasgun}} ?{Number of Hits|1, {{Damage=[[3+1d10+?{Charge Level|Standard, 0[Penetration 1]|Overcharge, 1[Penetration 1]|Overload, 2[Penetration 3]} ]]}} |2, {{Damage1=[[3+1d10+?{Charge Level|Standard, 0[Penetration 1]|Overcharge, 1[Penetration 1]|Overload, 2 [Penetration 3]} ]]}} {{Damage2=[[3+1d10+?{Charge Level} ]]}} } {{Damage Type=**Energy**}} I've only done it out for two hits, but you should get the idea from there. -Scott EDIT: Fixed some over-escaped and mis-escaped entities. If you wanted/didn't mind having all the damage rolls in one template field, you could do with just having to replace the bars, commas, and end curly braces in the charge level queries
Dude this is awesome, thank you.  I've tried saving what you've done as a macro but it reverts back the replacements so it can be tested but not saved, could you tell me what I need to do to retain the replacements in the macro?
1483290641

Edited 1483290693
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, sorry, forgot to mention that. If you use it as a global macro, it will eat the replacements every time you open and resave it. The best way around this is to save it as a character ability. Make a character called abilities or something similar and save the above as an ability. You can put that ability on your macro bar at the bottom or make a global macro that will then call the ability via %{abilities|lasgundamage}. Edit: just realized, you're probably a player. Just make the ability on your character instead of as a global macro and you should be fine.
Man you're awesome, I'm a GM and my players will be really grateful for this, thanks again!
1483294881

Edited 1483294949
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, make sure to give your players edit control of the abilities char sheet so that they can access the macro. To prevent them from breaking it through well intentioned meddling you can archive the abilities char sheet. They'll still be able to call the macro, but won't be able to access the sheet to adjust anything. Happy rolling, Scott P.S. did you ever get the command for your players to access player tagged songs sorted for Roll20AM?
Here's a way to minimize on the HTML entites, might make the macro a bit more manageable for you: &{template:default} {{name=Lasgun ?{Charge Level|Standard, 0[Penetration 1]|Overcharge, 1[Penetration 1]|Overload, 2[Penetration 3]} }} {{Damage=?{Number of Hits|   1, [[ 3 + 1d10 + ?{Charge Level} ]] |   2, [[ 3 + 1d10 + ?{Charge Level} ]]      [[ 3 + 1d10 + ?{Charge Level} ]] |         3, [[ 3 + 1d10 + ?{Charge Level} ]]      [[ 3 + 1d10 + ?{Charge Level} ]]      [[ 3 + 1d10 + ?{Charge Level} ]]   } }} {{Damage Type=**Energy** }}
Scott C. said: Ah, make sure to give your players edit control of the abilities char sheet so that they can access the macro. To prevent them from breaking it through well intentioned meddling you can archive the abilities char sheet. They'll still be able to call the macro, but won't be able to access the sheet to adjust anything. Happy rolling, Scott P.S. did you ever get the command for your players to access player tagged songs sorted for Roll20AM? Good tip on archiving the sheet and no I'm still not able to get the songs working for my players, I've tried tagging it but I must be doing something wrong.