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

Multiple Macros, 1 Button

1579482668

Edited 1579482915
Hello. I'm creating a home-brew system with weapons that can target multiple targets. I've already created a macro with multiple targets that works as I intended, however I'd like to create a drop-down query which allows the player to select the number of targets before the macro rolls. For example, if the player selects '1 Target' they would return: &{template:default} {{name=@{Selected|token_name}'s Double-Barrelled Shotgun}} {{@{target|token_name} Evasion:= [[11+@{Target|Evasion}]]}} {{@{Selected|token_name} Accuracy= [[(@{Selected|Perception}+@{Selected|Shotgun})+d20]]}} {{Damage Score:= [[d16cs0cf0-@{Target|Blunt}]]}} And if the player selects '2 Targets' they would return: &{template:default} {{name=@{Selected|token_name}'s Double-Barrelled Shotgun}} {{1) @{target|Target1|token_name} Evasion:= [[11+@{target|Target1|Evasion}]]}} {{2) @{target|Target2|token_name} Evasion:= [[11+@{target|Target2|Evasion}]]}} {{@{Selected|token_name} Accuracy:= [[(@{Selected|Perception}+@{Selected|Shotgun})+d20]]}} {{1) @{target|Target1|token_name} Damage Score:= [[d16cs0cf0-@{target|Target1|Blunt}]]}} {{2) @{target|Target2|token_name} Damage Score:= [[d16cs0cf0-@{target|Target2|Blunt}]]}} I apologise in advance for the lengthy macros containing attributes, it's just the way the system I'm making works - it wouldn't be possible on any other platform besides roll20.
1579517719

Edited 1579518001
GiGs
Pro
Sheet Author
API Scripter
The problem is this:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> . I created a very simple example of that kind of thing here:&nbsp;<a href="https://app.roll20.net/forum/permalink/8058803/" rel="nofollow">https://app.roll20.net/forum/permalink/8058803/</a>. It is possible to create a drop down giving those options, but you'd need to replace a bunch of character in your code (all | or } characters that arent part of attribute names , for instance) with the html entities listed on that page. A much simpler method would be to create those two macros separately, then do one or both of: Tick the token action &nbsp;box for each macro. Then when your token is selected, you'll get a button for each macro on your screen, and can click them easily. Create a Chat Menu , and whisper it to yourself, This will put two buttons in chat that only you can see, and you can click the ones you need.
Excellent advice, thank you! I'm going to use a chat menu for now that whispers to the player.
1579518887
GiGs
Pro
Sheet Author
API Scripter
Youre welcome :) Chat menus are great, by the way. You can find lots of ways to use them to streamline GMing, some mentioned in that linked thread.