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

stupid macro execution question

1534089109
Michael I.
Pro
Sheet Author
Not sure if this should be posted under Macro section or API since its a question of execution, I expect its because it executing the base roll20 commands first and then the Api command. but hoping some one has come across this before and has an explanation or fix.  /em @{selected|token_name} attacks additional functions (displays the em token name attacks then displays the additional functions. If I use an api Color Emote and do  !cem @{selected|token_name} attacks additional functions (displays the additional functions first then displays cem token name attacks. the macro is still functioning correctly just the prefer to get the !cem to display before the other function display  
1534090021
vÍnce
Pro
Sheet Author
Have you tried using separate line(s) in your macro with the API command on the first line? !cem @{selected|token_name} attacks additional functions
1534096444
Michael I.
Pro
Sheet Author
Actually after looking closer  I have one macro that calls 3 macros ( I did it this way to help troubleshoot possible problems in the future) first macro being called is the /em or !cem The second macro called is a Template  and the 3rd Macro calls a Roll when its /em the first macro is displaying first when its !cem it displays last. (The Macro works fine) its just the order of display)
1534100600

Edited 1534102726
vÍnce
Pro
Sheet Author
I believe that due to the order of operations , (although it doesn't mention when API commands are executed...), the API command will execute only after the other parts of the macro have been resolved. So, I'm not sure you would be able to force cem to execute first then process the remaining macros when all three macros are called within the same macro.  ;-( Maybe you could use an additional script like !Delay on the 2nd and 3rd macros to allow cem to post before executing the other macros.   edit/update: quick example that worked for me;  (sadly, it doesn't look like roll templates are currently supported using !Delay.  I've made a request of Kastion.) !cem[@{target|token_id}] Does the things! !delay 0 --[[ 1d20 ]]
1534104168
Michael I.
Pro
Sheet Author
Thanks Vince I will try that and see. Another related stupid question I have an Abilities That calls three macros Eample Name_abilities #macro_name #macro_name #macro_name as GM this abilities works fine and executes the macros  as a player when using the abilities it  just displays  #macro_name #macro_name #macro_name and does not execute the macros so any suggestions or help is appreciated I can combine the macros in the abilities section however it would then be very long, and I would prefer to keep it calling the 3 macros if possible to make it easier for future Troubleshooting.    
1534105179

Edited 1534105215
vÍnce
Pro
Sheet Author
Sounds like your macros are of the global type(collection tab).  If you want those to also be available to your players, make sure to adjust the "Visible to Players" option on the appropriate macro's settings page. Another option is to use ability macros.  You can use a character as a "macro mule".  That contains all of your essential PC macros on the ability tab.  Give player's permission to control said "macro mule" and all they have to do is check "show" on quickbar or call the macros using the macro mule character's name.  ie "PCMacro"  Using a mule also makes it easy to transfer your macros between games(character vault and transmogrifier).  I have one a mule for pc macros and a couple more that are only for the GM.
1534106457
Michael I.
Pro
Sheet Author
Yep something stupid on my part, Vince that also worked thank you so much for your help also thanks for the idea