
Just an FYI, this is still a problem with the latest update (not that there was any reason to exactly believe this would be specifically fixed, but tested it anyway).
initiative_overall|current + Tie-Breaker( initiative_overall|current ) + pcinit|currentWhat rules are you using? Are you using the 5e character sheet or the 5e shaped one?
npc_initiative_overall|current + Tie-Breaker( npc_initiative_overall|current )
The Aaron said:
Hmm.. It seems to be working for me with the following rules:initiative_overall|current + Tie-Breaker( initiative_overall|current ) + pcinit|currentWhat rules are you using? Are you using the 5e character sheet or the 5e shaped one?
npc_initiative_overall|current + Tie-Breaker( npc_initiative_overall|current )
For reference, the error message generated was:
evalmachine.<anonymous>:16173
total: (ird.results.total%1===0
^
TypeError: Cannot read property 'results' of undefined
at evalmachine.<anonymous>:16173:52
at Array.map (native)
at Function._.map._.collect (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:97:56)
at _.(anonymous function) [as map] (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:1073:39)
at evalmachine.<anonymous>:16170:34
at checkFinishedOps (
Selecting an individual token does not generate the error and !group-init completes without error (and of course has the tie-breaker as part of the roll).Dylan S. said:
The Aaron said:
Interesting. Can you post your Tracker macros? What is happening is they are adjusting (apparently) whatever attribute is your diceCountAttribute. Through normal setting, the attribute ends up being a string. In this function, the string is pulled up for the character, then anything that looks like @{foo} is replaced with @{charname|foo} so that it can be calculated correctly. However, your tracker macros seem to be setting a number into them (which I frankly though would come back as a string anyway), which means there is no .replace() method, which is what the crash is from. The solution to this is to verify that it is a string and convert it to one if it isn't. I can work on that pretty fast, but to be sure I've got it fixed, I need the macros you're running so I can duplicate the crash.
I'll need to know a bit about your Group Initiative configuration as well. The output of !group-init --help should be sufficient.
Did this ever get resolved?
/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1
orts, require, module, __filename, __dirname)
{ function g(a){throw a;}var j=v
^
TypeError: Object 4 has no method 'replace'
at buildInitDiceExpression (evalmachine.<anonymous>:1596:29)
at rollers.Individual-Roll.func (evalmachine.<anonymous>:1637:28)
at evalmachine.<anonymous>:2321:46
at Array.map (native)
at Function._.map._.collect (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:97:56)
at _.(anonymous function) [as map] (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:1073:39)
at handleInput (evalmachine.<anonymous>:2313:30)
at eval (
!group-init --del-group 1 !group-init --add-group --Bare initiativeNote, you only need to do this once, from then on, you just select the tokens and run:
!group-init
!group-init --help
The Aaron said:
It's not perfect (If you've got tokens you DON'T want to reroll, there's no way to exclude them, TurnMarker being one of them.. I'll fix that at a later point...), but it's pretty good. =D
The Aaron said:
TurnMarker1 Update v1.3.1 -- Observe changes by GroupInitiative and place PlaceTurnMarker back at the top with an order of -1
The Aaron said:
Update v0.9.12 -- Split the rolls for initiative across multiple sendChat() calls. This fixes a problem with complex rolls overloading the API dice roller. (Thanks Kevin!)
The Aaron said:
GroupInitiative: https://github.com/shdwjk/Roll20API/blob/master/Gr...
TurnMarker1: https://github.com/shdwjk/Roll20API/blob/master/Tu...
You can always find the latest versions of my scripts in my repo: https://github.com/shdwjk
I've created pull requests for the Roll20 repo, but it may be a few days before they make it there. Additionally, each script has the URL to itself in the repo as the first line of the file, so if you have one version, you can find the latest version. =D
!group-init --add-group --Bare init2 --Tie-Breaker init2
[[[[floor([[@{DEX-base}+@{DEX-enhance}]]/2)]]-5+[[floor(@{DEX-temp}/2)]]-[[abs(floor(@{DEX-damage}/2))]]-[[abs(floor(@{DEX-penalty}/2))]]- @{condition-Entangled} - @{condition-grappled} - @{condition-Fatigued}]]init2
[[@{init-misc}+@{init-trait}+[[@{DEX-mod2}]]]]
evalmachine.:4827 total: (ird.results.total%1===0 ^ TypeError: Cannot read property 'results' of undefined at evalmachine.:4827:52 at Array.map (native) at Function._.map._.collect (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:97:56) at _.(anonymous function) [as map] (/home/symbly/www/d20-api-server/sandcastle/node_modules/underscore/underscore.js:1073:39) at evalmachine.:4824:34 at checkFinishedOps (If i just use attributes with numbers in them (rather than attributes with calculations like [[something]] then the same tokens work fine. (also each individual token works with !group-init so it's not any particular token.)
No bother! Glad that worked out for you! Let me know if you have any other problems!chris b. said:
That fixed it, thanks! Sorry for the bother i should have checked first.
The Aaron said:I am using my Iron Kingdoms character sheet (just like the one I made for the main Roll20/Github, but with some modifications).
Which character sheet are you using?
So for most characters, you use 2d6, but for a few special characters, you want to add an additional 1d6?
The basic process is that you create groups and it applies them until it finds one that has all the listed attributes. The biggest problem to this is that for character sheets EVERY attribute exists for the character. The easiest way to handle this is to add an attribute to the character that needs the extra 1d6 with the value '[[1d6]]'. Lets assume it's PreternaturalAwareness. You can then add a rule to GroupInitiative for it like this:!group-init --add-group --Bare PreternatualAwarenessMake sure that rule is first if you have more than one rule. Just keep using this command with whatever number it has until it is at 1:!group-init --promote <#>When you run !group-init, it should then add that [[1d6]] in for the one that has it, and skip it for the rest.
If you have more complex rules, you can just add that as part of it, for example if everyone used the initMod attribute, you might have 2 rules:!group-init --add-group --Bare initMod --Bare PreternatualAwareness !group-init --add-group --Bare initModYour aware character will match the first one, the rest will fall through to the second.
Anyway, hope that helps. BTW, if you post on the GroupInitiative thread, I'll get an email and respond much faster! =D
Bob: @{Bob|Preternatural_Awareness-switch}I speculate it will be [[1d6]] for each.
Tom: @{Tom|Preternatural_Awareness-switch}
Tom: @{Tom|MissingAttr}If you add it via adding it to the Character Sheet, it will not be an error. GroupInitiative depends on this relationship in order to match rules (GroupInitiative actually predates the character sheets.
!group-init --add-group --Bare speed_total
!group-init --del-group1
For reference, the error message generated was:
/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1
orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v
^
SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-], [+|\-|*|\/|%] or [0-9] but ")" found.
!group-init --del-group ##where ## is the number of the rule for that group. Check the help for the index numbers:
!group-init --help
!group-init --add-group --Stat-DnD dexterity --Floor halflevel --Bare init-feat --Bare init-item --Bare init-misc !group-init --promote 2
GroupInit: (From GroupInit):So the script doesn't removes tokens that already have a turn. It stops there and I have to remove them for it (no big deal).
!group-init --bonus [[@{selected|init}]]On an individual basis (selecting only 1 token), this works perfectly fine, but it breaks when I select multiple tokens at once. Apparently it seems to only take the initiative modifier of only one of the tokens, and applies it to all of them.
!group-init --add-group --Bare initThis one, on the other hand, pretty much breaks the entire script. When I try out !group-init after adding this to the Bonus Stat Groups, the API console returns this error message:
/home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ SyntaxError: Expected "[" or [ |\t] but "0" found.
!group-init --add-group --Bare DEX-mod --Bare init-trait --Bare init-miscBut the same error pops up on the console.