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 Question

I was just wondering if there was a way to have the group-init API script roll advantage for an initiative roll if I create some kind of attribute on the character sheet to look for it. I've been trying to figure out how to do it with the bonuses, but I'm not sure that it can actually be done. Specifically looking to do this for a 5e game I am DM'ing with a couple of rangers who are using the unearthed arcana versions of the ranger (adv. on init rolls). I can probably hack into the script, but I'd rather not branch it and make my own version if this can already be done (or if Aaron will see this soon and work some super magic on it). Thanks!
1476096546
The Aaron
Pro
API Scripter
This is on my list of things to do. What would be the most convenient interface to this for you?  I want to rewrite the way rules work (that code predates character sheets...). My idea is to have the rule include not just attributes that contribute to the score, but also indicators which dictate if the rule should be chosen (npc=1, etc) and do not contribute a value. 
For my personal taste, I would have probably just gone with something like "initiative_advantage" on the character sheets, and maybe created a script that would have added/removed (or set to 1 or 0) that from the selected token's character sheet. Then I would probably just go from there in your script to check for that, and if it's present and 1, roll twice, taking the highest (if accessing the results was hard, which I don't know since I haven't dug into your code, I'd probably take the first and post both to allow the DM to just edit it later). As it stands now, I will probably select the rangers in the party (2 of 7 of my players), and just remember the numbers, roll again, and set the number to the higher of the two rolls. Was just hoping I could get it done through the awesomeness of your API scripts! If you can't get to it, I may fork your repo and make a pull request, but if you're also making changes to this one I wouldn't want to create conflicts.
1476214007
The Aaron
Pro
API Scripter
I can deal with the conflicts, feel free to send a pull request. =D
1476244906

Edited 1476248115
Jon
Pro
Okay. I'll see what I can come up with. No promises you'll like my code. :P
1476251226

Edited 1476251335
Jon
Pro
I was able to get a bit done on this tonight. The hover-text for the rolls still doesn't really show what I'd like to see, and the config stuff seems messed up, so I'll play with that some more. It seems to be calculating the right number for my limited test cases... Just wanted to post this here in case you wanted to look it over. I'll branch/pull this into your repo at some point when I'm a bit happier with how it's behaving. <a href="https://github.com/Callindrill/roll20-api-scripts/" rel="nofollow">https://github.com/Callindrill/roll20-api-scripts/</a>... (I feel like I should probably mention that I'm super unfamiliar with git, and have spent the better part of 5 years using SVN, which is very different in how things are talked about--but I'm trying!). Cheers.