Update v0.9.42 -- Added --filter-with for --add-group and --with for rolls. (Thanks KeithCurtis!) Sometimes you want to switch between a set of stat groups based on transient information. Lets say you want to make a roll for initiative for a group of tokens with advantage because of a situation, not a character sheet feature. In this case, you might want to flag a stat group with an identifier and then specify it with the roll. !group-init --add-group --label Advantage Beacon --filter-sheet dnd2024byroll20 --filter-with advantage --roll-die-count 2 --roll-die-mod kh1 --computed initiative_bonus --computed init_tiebreaker
!group-init --add-group --label Disadvantage Beacon --filter-sheet dnd2024byroll20 --filter-with disadvantage --roll-die-count 2 --roll-die-mod kl1 --computed initiative_bonus --computed init_tiebreaker
!group-init --add-group --label Beacon --filter-sheet dnd2024byroll20 --computed initiative_bonus --computed init_tiebreaker This sets up new rules for advantage, disadvantage and a regular roll. (Note the --filter-with part). The created rules then will only be matched if the matching --with line is supplied. !group-init --with advantage This will force selection of rules that have the --filter-with advantage. They will only be considered if they are before other rules without --filter-with lines. For example, if you had: !group-init --with tacos The 3rd rule would be matched. Additionally, if the rules were in reverse order, the regular rule would be matched first. Not having a --filter-with clause is not a reason for rejection in the case of a --with being supplied, so keep that in mind when ordering your rules. Code is available here now: <a href="https://github.com/shdwjk/Roll20API/blob/master/GroupInitiative/GroupInitiative.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/GroupInitiative/GroupInitiative.js</a> or you can get it from the 1-click on Tuesday or so.