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

Need help to complete Initiative Macro

Hey folks ! I'm trying to create a Macro for my players to roll Initiative. Everything works fine, until time comes to add the roll to the Turn Order. Since I'm really not versed in macros, I need someone to provide the last input to complete it ! Intention :  The player can select his token, then presses the macro. He is prompted with a drop down menu, selecting the correct roll between Normal, Adv or Disadv. The roll checks for different values (there's another working formula in core_die), compiling Initiative_Bonus with Wisdom_Mod, and needs to display Crits and Fumbles. Then the correct result (r1 or r2, depending on norm, adv, disadv) needs to be added to the Turn Order. Version 1 :  It's basically completed, except that I need to find a way to place the &{tracker} somewhere, allowing it to add the correct result to the TO. @{selected|wtype}&{template:simple} {{rname=Initiative - @{selected|token_name}}}{{r1=[[@{selected|core_die}cs>@{default_critical_range}+@{selected|initiative_bonus}+@{selected|wisdom_mod}]]}}{{?{Roll?|Normal,normal|Avantage,advantage|Désavantage,disadvantage}=1}} {{r2=[[@{selected|core_die}cs>@{default_critical_range}+@{selected|initiative_bonus}+@{selected|wisdom_mod}]]}} Version 2 : This one works fine, but it lacks automation if it needs to be rolled with adv/disadv, forcing the player to roll twice and potentially edit the TO. Is there a way to make that roll with a query adv/disadv other than what I did in the version 1 above ? @{selected|wtype}&{template:simple} {{rname=Initiative -  @{selected|token_name}}}{{r1=[[@{selected|core_die}cs>@{default_critical_range}+@{selected|initiative_bonus}+@{selected|wisdom_mod}&{tracker}]]}} {{normal=1}} Hopefully, one of you will be smarter than me ^^
1755630409

Edited 1755630815
Gauss
Forum Champion
Hi Nathan N, Here is the macro I use.  @{selected|wtype}&{template:simple} {{rname=^{init-u}}} {{mod=@{selected|initiative_bonus}}} {{r1=[[?{Normal, Advantage, or Disadvantage?|Normal,1d20[Normal]|Advantage,2d20kh1[Advantage]|Disadvantage,2d20kl1[Disadvantage]} +@{selected|initiative_bonus}@{selected|pbd_safe}[INIT] &{tracker}]]}} {{normal=1}} @{selected|charname_output} Note that I don't have an r2 section because I do not believe that will work with the tracker.  Edit: confirmed, I tested and &{tracker} will not play nice with r2 (specifically, the tracker will ALWAYS come from r2, even if r1 is the higher score).
1755655836

Edited 1755655976
Andrew R.
Pro
Sheet Author
Since you’re a Pro subscriber, a ScriptCards script would do this properly, since it has variables & conditionals. I’ve used it for a custom Initiative roll. OR MetaScriptToolbox will let you do conditionals in a Macro too.