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

[Script] GroupInitiative - Strange Tie Breakers

Sorry for the probably newbie question, I'm new to the API and scripts and sometimes it's difficult to understand all parameters, options and such. But here it goes: I'm testing the GroupInitiative script, using it for D&D 5e Roll20 Sheet. I selected the appropriate option on first-time setup and the script seems to work, except for the tie breaker decimals, which seem quite off. For example, a monster with Dex 12 got a tie breaker of .02 instead of the expected .12, a character with a Dex 18 got a tie breaker of .24, and so on. What am I doing wrong?
1620649960
The Aaron
Roll20 Production Team
API Scripter
That is strange. The tiebreaker defaults to their initiative bonus X .01, so a .24 would be pretty strange. I'll take a look at the code and see what I can spot. 
1620672648
David M.
Pro
API Scripter
This may not be helpful, but I've seen something similar-ish before. We had an issue when character sheets had "Add DEX tiebreaker to initiative" checked on the character sheet, plus we told Group-init to use the tie breaker, so it got added twice. Your reported behavior is strange, though. Is there some other setting or attribute on the sheet that might be interfering?
The Aaron said: That is strange. The tiebreaker defaults to their initiative bonus X .01, so a .24 would be pretty strange. I'll take a look at the code and see what I can spot.  When I first saw the .02, I imagined it was the initiative bonus instead of the Ability Score, which I guess is the tie breaker used by the regular non-scripted OGL sheet. But the .24 was what really got me thinking. It might be a coincidence, but it might also help finding the problem, so here is something I found intriguing: This character's initiative bonus is +6 (+4 from Dex 18, +2 from the swashbuckler's Rakish Audacity feature and Cha 14), and his raw Dex ability score is 18. 18+6=24. Could it be that the script is somehow getting both the bonus and the ability score and adding them up for the tie breaker? It doesn't explain the other numbers (0.2 for a Dex 12 monster, for instance), but who knows.
David M. said: This may not be helpful, but I've seen something similar-ish before. We had an issue when character sheets had "Add DEX tiebreaker to initiative" checked on the character sheet, plus we told Group-init to use the tie breaker, so it got added twice. Your reported behavior is strange, though. Is there some other setting or attribute on the sheet that might be interfering? Well, I usually configure my games to have the "Add DEX tiebreaker to initiative" checked by default. So it seems this is probably the cause: it would add the .18 for the DEX 18, as indicated by the character sheet setting, and then add the .6, which is the final Initiative bonus of the character. I would have to retest and see if this sort of pattern would repeat on all characters. But to take the gist of it all, do I have to turn off the sheet's tie breaker to use GroupInit's tie breaker? I plan on using GroupInit only for groups of NPCs, as I like my players to roll the dice themselves. Does it mean that I'd have to choose which group would have tie breakers shown? Regardless, I love the script and all the beautiful work you scripters have done! I had vague hopes that I would test the API and find that it's not worth the trouble and extra subscription money, but I was soooo wrong!
1620732418
David M.
Pro
API Scripter
I use Group Initiative for npcs and have characters roll their own like you want to do. With the 5e by Roll20 sheet, I leave the "Add DEX tiebreaker..." global game setting off , have the players turn on initiative tiebreaker on their individual sheet settings page, and add tiebreaker to Group Initiative. 
1620743470
The Aaron
Roll20 Production Team
API Scripter
What David said is probably the easiest solution, but you could set up GroupInitiative without the tie breaker without too much difficulty and just rely on the tiebreaker in the character sheet.  GroupInitiative predates Character Sheets in Roll20, so there are occasionally strange things that show up when the two go out for coffee together. =D 
Thanks, David and the Aaron! I'll probaly follow David's recommendation as well.
I too had this problem forever with group init and I just figured it out a while back and have the two commands saved and whenever I reinstall in a new session I run these two commands and it always fixes the weird tiebreaker: !group-init --del-group 1 !group-init --add-group --bare initiative_bonus This fixes the problem for me every time with the odd .99 and such tiebreakers.  From what I can tell, the script installs with a different group setup that conflicts with the 5e sheet just for tiebreaker.  
I believe I have figured out what really happens here. To be honest, it was David's suggestion above that got me on the right track. The default Bonus Stat Group for the 5e OGL sheet, as configured in the API, uses initiative_bonus for both the bonus and the tie breaker. However, if the tie breaker is enabled in the sheet corresponding to the tokens you select, the initiative_bonus attribute already includes a tie breaker in the for of a decimal equal to the character's dexterity. So, when you use GroupInitiative, it roll the dice (say, 12), adds the initiative_bonus (say, 2.14) and then adds the initiative bonus again in the form of a tie breaker ( 0.214, in this case), so you get a weird 14.35. Like DM Eddie said above, if instead of using the provided default stat group, you use a stat group that calls for a bare initiative_bonus, it will work perfectly.