Here is a metascript solution for this. What it Does This will gather and roll 1d20 for all PC tokens without you having to select them on the VTT (a different roll equation could be substituted, or it could be changed to an individualized reference to an attribute). The token must have a bar1 value over 0. Separately, it will gather and roll 1d20 for all NPC tokens without you having to select them on the VTT (same substitution options are available). The token must have a bar1 value over 0. It will track each return to see if it is higher than the previously best number (tracking highest initiative). It will track the number of NPCs (Enemies) and PCs (Party) tokens that rolled at that highest value for tie-breaking purposes. It will tag tag each token with a status marker and number for their group, red for Enemies and blue for Party (so an Enemy token having rolled a 20 would be in group 1, and would get a red marker with the number "1" on it). It will build the Turn Tracker with 6 entries, three Enemy entries and three Party entries, alternating (Enemies 1, Party 1, Enemies 2, Party 2, etc.); it will choose the starting group based on the tie-breaker methodology listed below in Assumptions . It will output a panel at the end showing the highest initiative rolled, how many Enemies and how many Party tokens rolled that value, as well as each group of tokens, listed by name and showing the initiative that token rolled. Assumptions In the case of ties for the highest initiative rolled between enemies and the party, I assumed that the group with *more* members having rolled that highest value should go first... so if the highest overall Initiative was a 16 and the Enemies had 2 tokens roll that value while the Party only had 1, the Enemies should go first. In a case where even the number of tokens having rolled that highest initiative was tied between Enemies and Party, I assumed the Party would get the benefit of the doubt and could go first. Also, inherent in the SelectManager selection criteria for determining a PC token vs an NPC token, is certain assumptions about how to determine if a token is one or the other. From the SelectManager documentation for the feature: PC - This criteria tests that the object is a token, is on the objects layer, represents a character, and that there is at least one non-gm player with controlling rights to the token. NPC - This criteria simply requires that the object be a token and that there are no non-GM players with controlling rights to the token (or associated character, if the token represents a character). There is no implicit layer requirement. I am also assuming that you're using bar1 for "hit points," and that you don't want to include a token if the bar1 value is 0 or below (ie, no hit points left). Scripts Required These are all available in the 1-click repository: The Metascript Toolbox TokenMod AddCustomTurn Pics or It Didn't Happen For this battle between 4 party tokens and 5 enemy tokens, I got this result: That shows me the party should go first (they had 1 member roll a 20 while the enemies had none), which is what the Turn Tracker shows: Again, based on that result, the Party has one token in group 1, two tokens in group 2, and one token in group 3. You can see that reflected with blue markers on the tokens: ...and the Enemies have no tokens in their first group, two in the second, and three in the third group. You can see that reflected with red markers on the tokens: Setup Required First, make sure your tokens have a "Can be controlled by" setting conforming to the PC or NPC requirements mentioned, above (see the But if you leave the camera rolling... section, below for one way to expand this). Install the required Scripts. Create a character named "InitiativeMule" (no quotation marks). On this character, create 4 Abilities. Name them and fill them with the contents as follows: Initiative Best=0 CountPC=0 CountNPC=0 NPC1=none NPC2=none NPC3=none PC1=none PC2=none PC3=none GroupAssignment >=19=1 >=9=2 >0=3 CustomTurns !{{ !dct Enemies 1 !dct Enemies 2 !dct Enemies 3 !dct Party 1 !dct Party 2 !dct Party 3 {\&if get.InitiativeMule.Initiative.CountPC/get >= get.InitiativeMule.Initiative.CountNPC/get} !act 0 1 --Enemies 3 !act 0 1 --Party 3 !act 0 9 --Enemies 2 !act 0 9 --Party 2 !act 0 19 --Enemies 1 !act 0 19 --Party 1 {\&else} !act 0 1 --Party 3 !act 0 1 --Enemies 3 !act 0 9 --Party 2 !act 0 9 --Enemies 2 !act 0 19 --Party 1 !act 0 19 --Enemies 1 {\&end} }} GroupCombat !{{(~) set.InitiativeMule.Initiative.Best=0/set set.InitiativeMule.Initiative.CountPC=0/set set.InitiativeMule.Initiative.CountNPC=0/set set.InitiativeMule.Initiative.NPC1=none/set set.InitiativeMule.Initiative.NPC2=none/set set.InitiativeMule.Initiative.NPC3=none/set set.InitiativeMule.Initiative.PC1=none/set set.InitiativeMule.Initiative.PC2=none/set set.InitiativeMule.Initiative.PC3=none/set
!forselected(^) token-mod --set statusmarkers|red;get^.InitiativeMule.GroupAssignment.[^[^1d20^]^].value/get {^&if $[^[^0^]^] > get^.InitiativeMule.Initiative.Best/get} set\\\\^.InitiativeMule.Initiative.Best=$[^[^0^]^].value/set set\\\\^.InitiativeMule.Initiative.CountNPC=1/set set\\\\^.InitiativeMule.Initiative.CountPC=0/set {^&elseif $[^[^0^]^] = get^.InitiativeMule.Initiative.Best/get} set\\\\^.InitiativeMule.Initiative.CountNPC={^&math get^.InitiativeMule.Initiative.CountNPC/get + 1}/set {^&end} {^&if $[^[^0^]^] >= 19} {^&if "get^.InitiativeMule.Initiative.NPC1/get"="none"} set\\\\^.InitiativeMule.Initiative.NPC1=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.NPC1=get^.InitiativeMule.Initiative.NPC1/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&elseif $[^[^0^]^] >= 9} {^&if "get^.InitiativeMule.Initiative.NPC2/get"="none"} set\\\\^.InitiativeMule.Initiative.NPC2=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.NPC2=get^.InitiativeMule.Initiative.NPC2/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&else} {^&if "get^.InitiativeMule.Initiative.NPC3/get"="none"} set\\\\^.InitiativeMule.Initiative.NPC3=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.NPC3=get^.InitiativeMule.Initiative.NPC3/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&end} {~&select *,+npc,+bar1>0} !forselected(^) token-mod --set statusmarkers|blue;get^.InitiativeMule.GroupAssignment.[^[^1d20^]^].value/get {^&if $[^[^0^]^] > get^.InitiativeMule.Initiative.Best/get} set\\\\^.InitiativeMule.Initiative.Best=$[^[^0^]^].value/set set\\\\^.InitiativeMule.Initiative.CountPC=1/set set\\\\^.InitiativeMule.Initiative.CountNPC=0/set {^&elseif $[^[^0^]^] = get^.InitiativeMule.Initiative.Best/get} set\\\\^.InitiativeMule.Initiative.CountPC={^&math get^.InitiativeMule.Initiative.CountPC/get + 1}/set {^&end} {^&if $[^[^0^]^] >= 19} {^&if "get^.InitiativeMule.Initiative.PC1/get"="none"} set\\\\^.InitiativeMule.Initiative.PC1=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.PC1=get^.InitiativeMule.Initiative.PC1/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&elseif $[^[^0^]^] >= 9} {^&if "get^.InitiativeMule.Initiative.PC2/get"="none"} set\\\\^.InitiativeMule.Initiative.PC2=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.PC2=get^.InitiativeMule.Initiative.PC2/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&else} {^&if "get^.InitiativeMule.Initiative.PC3/get"="none"} set\\\\^.InitiativeMule.Initiative.PC3=@^(selected.character_name) ($[^[^0^]^].value)/set {^&else} set\\\\^.InitiativeMule.Initiative.PC3=get^.InitiativeMule.Initiative.PC3/get, @^(selected.character_name) ($[^[^0^]^].value)/set {^&end} {^&end} {~&select *,+pc,+bar1>0}
!%~(InitiativeMule.CustomTurns) {~&delay 3}
/w gm {~&template:default} ({)name=Initiative Report(}) ({)Winning Initiative=get~.InitiativeMule.Initiative.Best/get (}) ({)Enemies Count=get~.InitiativeMule.Initiative.CountNPC (}) ({)Party Count=get~.InitiativeMule.Initiative.CountPC (}) ({)Enemies 1 (19+)=get~.InitiativeMule.Initiative.NPC1/get (}) ({)Enemies 2 (9-18)=get~.InitiativeMule.Initiative.NPC2/get (}) ({)Enemies 3 (1-8)=get~.InitiativeMule.Initiative.NPC3/get (}) ({)Party 1 (19+)=get~.InitiativeMule.Initiative.PC1/get (}) ({)Party 2 (9-18)=get~.InitiativeMule.Initiative.PC2/get (}) ({)Party 3 (1-8)=get~.InitiativeMule.Initiative.PC3/get (}) {~&delay .3} }} Usage When you're ready, run the GroupCombat ability (you can put it into your macro bar so you don't have to have the character open). Explanation I could... if you really want me to and if you're enough of a masochist that you're willing to sit through it. Let me know. But if you leave the camera rolling... Originally, this was built to allow for NPC style tokens that are friends of the Party (but GM-controlled) to be included on the Party side of the initiative count. I managed this by including a tag on those characters for "friend". In other words, the "party" tokens would be all PC tokens, plus any NPC tokens that were tagged as "friend." The NPC tokens were all NPC tokens *except* those tagged as "friend". However, this enhanced selection criteria for SelectManager requires the Experimental Sandbox (the tags aren't available in the default script sandbox), but my Experimental Sandbox refused to boot up. So for now I stripped that portion out. If you go with this solution and you want to implement that feature, let me know. I've opened a ticket with Roll20 to get the Experimental Sandbox functional again, so hopefully at some point I'll be able to test out the "friend" variation and share it, too.