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

Can GroupInitiative access the token?

All the examples i see reference character sheets.  I set init into bar1, and group-init seems to accept it fine !group-init --add-group --Bare bar1_value but it doesnt add it in when I roll (in this case, three tokens with a 2 in bar1) Well the screenshot lost the mouseover where it said Bonus was 0, but you can see from the Nat 20, which should be a 22. Can GroupInit read values from tokens, and what am i doing wrong please?
1471933980
The Aaron
Pro
API Scripter
It is set up to read attributes from characters. I can add token bars, that's a good idea. Might be a few months before I get to it...
thanks!  i code, or used to code a lot, but am semi retired.  is it just a matter of using @{selected|token_id} instead of @{character_id} *IF* certain token-only keywords are detected, or am i dramatically over-simplyifying it? Thanks in advance!  
1472041308
The Aaron
Pro
API Scripter
It's a bit more complicated. In the script, you're dealing with objects. Group Initiative looks for the prescribed attributes' objects and uses their existence to evaluate if a rule should be used. Using the bars will be a slightly different work flow (all tokens have bars and the values are on the token object). I'll want to add them as a new keyword type when declaring rules. I'll probably want to add the option to specify them as immediates on the chat command line. They'll likely need to fall back to their source attributes if they are linked. Etc.  That's probably all that would be needed, though a way to use them for other features (size of die, number of dice, etc) is probably desirable. 
Awesome, i really appreciate the in-depth update and description!