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

GroupInitiative - Possible to Ignore PCs?

To the creator of Groupinitiative, the wondrous and magnificent TheAaron, a huge thank you.  This is one of the best time-saving APIs on my list.  Was wondering, as my script-fu is very weak, is there any way to have it ignore the PCs?  Much as the Group-Check API does, it would be a massive boost if it had an option to ignore certain ids, or characters - my players always prefer to roll their own initiative (they have control issues, and maybe trust issues, and I am sure other issues that I am blissfully unaware of), and often it seems as though I am rolling for initiative, but can't use this wonderful tool because I can not grab just the NPCs, they are all clumped together with the PCs.
1606718002
Kraynic
Pro
Sheet Author
One thing you could do is have your players wait.  You roll initiative for whatever gets grabbed by GroupInitiative.  Then they roll.  Any new roll should overwrite one made previously. That isn't an automatic exclusion, and The Aaron might very will pop in with some edit to that script to make it behave like you want, but that little work around should still allow you to roll all the initiatives you need, while allowing your players to still roll their own.  Make sure that they know that if that is the way they want it, they don't get to choose to stay with a roll from GroupInitiative if it turns out high.  :p
1606741613

Edited 1606741858
David M.
Pro
API Scripter
What we do in our games is have the players roll their initiative first, then the DM selects whatever npc tokens they want and runs GroupInit plus a sort command. Seems to work fine for us.  EDIT - I just saw that you said you can't grab just the npc tokens due to being "clumped together". What I do is have representative monster tokens in an area obscured by dynamic lighting lines (I usually have a dedicated space off to the side of the map with a vertical DL line hiding it). You don't get the token highlighting when mousing over the init window, but that hasn't been an issue for me. I usually just use a single init value for each type of npc token. 
1606743367
The Aaron
Roll20 Production Team
API Scripter
If you turn off Replace Roll, and have the players roll in first, you can select everything and only the tokens that aren't in the turn order will get rolled. I can probably add an option to ignore tokens with controlledby entries. 
1606781037

Edited 1606781205
Oosh
Sheet Author
API Scripter
Is this for 5e? A quick and dirty fix while Aaron does it properly, if you like - find this point in the code (line 1105 on my copy & pasted version): let rollSetup = ids .filter( id => !turnorderIDS.includes(id)) .map(id => getObj('graphic',id)) .filter( g => undefined !== g) .map(g => ({ token: g, character: getObj('character', g.get('represents')) Insert the following above it, including modifying the "rollSetup = ids" line (and leaving everything else alone, obviously): let idsNpc = ids.filter(id => { if (getObj('graphic', id) && getObj('character', getObj('graphic', id).get('represents'))) { return getAttrByName(getObj('graphic', id).get('represents'),'npc') == 1 } }) let rollSetup = idsNpc It's not graceful, but it will filter out all the PC tokens before the magic is worked upon them. You could go a step further and add a toggle pretty easily, but I didn't want to mangle Aaron's script too much.
Thank you all for those - I don't know how I missed something so obvious as simply changing that one setting and then they roll first.  But Oosh, you just made it to my Xmas card list!  Thank you!