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

Repeat Droplist Option WITH Roll

1640059140

Edited 1640061216
I need some help on this.  My head is starting to hurt from the back and forth.  I am trying to get a drop list option that repeats the option, while using the roll.  I am working on a macro for picking a weapon and would like to show the weapon used, as well as the roll for damage: {{Roll=[[?{Weapon Name?|Bastard Sword 1-Handed,1d10|Bastard Sword 2-Handed,1d12]]}} So, if they selected Bastard Sword 1-Handed, it would roll the damage AND display the selected option somewhere.  If this even possible, without an API?  The full macro is already rather large, but I would like to get this worked in, as the players don't like having to choose the weapon twice.  Full Macro follows: &{template:default} {{Action=@{selected|token_name}'s Damage Roll}} {{name=?{Weapon Name|Bastard Sword|Battleaxe|Bola|Club|Dagger|Dart|Flail|Greataxe|Greatsword|Hand Crossbow|Handaxe|Heavy Crossbow|Heavy Mace|Javelin|Light Crossbow|Light Hammer|Light Mace|Longbow|Longsword|Magic|Net|Quarterstaff|Rapier|Scimitar|Short Spear|Short Sword|Shortbow|Sling|Spear|Tetsubo|Unarmed Strike|Warhammer|Whip|Unlisted Other}}} {{Roll=[[ floor(( [[?{Weapon Name?|Bastard Sword 1-Handed,1d10|Bastard Sword 2-Handed,1d12|Battleaxe 1-Handed,2d4|Battleaxe 2-Handed,2d6|Bola,1d4|Club 1-Handed,1d4|Club 2-Handed,1d6|Dagger,1d4|Dart,1d4|Flail,1d8|Greataxe,3d4|Greatsword,2d6|Hand Crossbow,1d6|Handaxe,1d6|Heavy Crossbow,1d12|Heavy Mace 1-Handed,1d6|Heavy Mace 2-Handed,1d8|Javelin,1d6|Light Crossbow,2d4|Light Hammer,1d6|Light Mace 1-Handed,1d4|Light Mace 2-Handed,1d6|Longbow,1d10|Longsword 1-Handed,1d8|Longsword 2-Handed,1d10|Quarterstaff,1d6|Rapier,1d8|Scimitar,2d4|Short Spear 1-Handed,1d6|Short Spear 2-Handed,1d8|Short Sword,1d6|Shortbow,1d8|Sling,1d4|Spear 1-Handed,1d8|Spear 2-Handed,1d10|Tetsubo,1d10|Unarmed Strike,1d3|Warhammer,1d8|Whip,1d3} + ?{Modifiers|0}[MOD]  ]]  ) * [[?{Hit Location?|Arm,.5[ARM]|Leg,.5[LEG]|Torso,1[TOR]|Head,2[HED]|Vital Organ,2[ORG]}]]) ]] ?{Select Damage Type|Acid|Bludgeoning|Cold|Electric|Fire|Force|Necrotic|Piercing|Slashing|Sonic|Unlisted Other} damage}}
1640090779

Edited 1640096957
GiGs
Pro
Sheet Author
API Scripter
For this kind of thing you need to expand what is included in each entry of the query. You aren't limited to using: ?{Weapon Name?|Bastard Sword 1-Handed,1d10|Bastard Sword 2-Handed,1d12} You can, for example do: ?{Weapon Name?|Bastard Sword 1-Handed,Magle attacks with the Bastard Sword, doing [[1d10]] damage| Bastard Sword 2-Handed,Magle goes mad and strikes 2-handed, doing [[1d12]] damage} The problem is you'll need to include several }} to include several rolltemplate sections within the query, and that causes the query to break. To fix that you have two solutions: HTML Substitutions Chat Menus The second approach is much easier to create and keep updated.
I haven't been able to appropriately use the HTML Substitutions.  As bad as it seems, I just can't seem to understand their use.
1640107125
GiGs
Pro
Sheet Author
API Scripter
In my opinion they are best used sparingly, when there is no other otion. Chat Menus are almost always superior (and much easier to write).