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

Macro command for choosing which weapon to use

1493916156
Surok
Roll20 Production Team
Is there any way to call on a weapons list from the character sheet? I want a drop down menu as a variable. For instance in the character sheet the character has two weapons, short sword and long sword. When activating the 2nd edition attack macro a prompt would pop up letting me choose which weapon I want. I don't want to make individual macros for each weapon and each character. Here's the base macro I'm using: &{template:2Eattack}{{title=@{selected|token_name} USES A @{selected|weapsize} SIZED @{selected|weaponname} TO ATTACK @{target|token_name}}}{{ac_hit=[[@{selected|ThAC0}-((D20?{ATTACK ROLL MODIFIER|+0})+(@{selected|attackadj})+(@{selected|strengthhit}*@{selected|strbonus})+(@{selected|dexmissile}*@{selected|dexbonus}))]]}}{{dmg_s=[[((@{selected|damsm}?{DAMAGE ROLL MODIFIER|+0}))+(@{selected|damadj})+(@{selected|strengthdmg}*@{selected|strbonus})]]}}{{dmg_l=[[((@{selected|daml}?{DAMAGE ROLL MODIFIER|+0}))+(@{selected|damadj})+(@{selected|strengthdmg}*@{selected|strbonus})]]}}{{ crit = Roll extra die for crit }} {{ fumble = You Fumble }} I figure there's some hidden table for what's in the character sheet.
The problem you'll run into is that any macro or drop-down list ability you reference in a Drop-Down query will include special characters   ( } , | ) that will interfere with the Drop-Down query.  Any macro you call has to have HTML ENTITY replacements or it won't work. I don't know about the 2e sheets, but I know sheets like Pathfinder have some hard-coded calls that you can't edit.