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

Universal monster attack macro 5e OGL

1518495563
Surok
Roll20 Production Team
So I made this macro based on the work previously done by Robert S. here <a href="https://app.roll20.net/forum/post/5334546/5e-ogl-b" rel="nofollow">https://app.roll20.net/forum/post/5334546/5e-ogl-b</a>... [@{selected|repeating_npcaction_$0_name}](~selected|repeating_npcaction_$0_npc_action) **|** [@{selected|repeating_npcaction_$1_name}](~selected|repeating_npcaction_$1_npc_action) **|** [@{selected|repeating_npcaction_$2_name}](~selected|repeating_npcaction_$2_npc_action) Basically auto populates the API buttons with the proper names of the attack rather than a generic "action1". Works fine but in order to have a clean presentation you have to have the right amount of actions otherwise I get an error and it puts the code into the empty action. Ideally I would like to detect an empty entry and drop that extra action from the choices and not have the error message clutter up the screen. Maybe covert it to a drop down menu?
You could have an api script detect the number of actions and populate the macro, but that's the only way that this could be handled automatically and the macro would then be created as an ability on the character sheet rather than as a global macro. A dropdown would make it more complicated since you would then be running in to HTML problems.