Help with an Initiative Macro
Posted: Wed Oct 11, 2017 6:59 pm
For my Pathfinder game, I have a fairly basic framework that works as a battle mat and basic combat manager. I have an "Add to Initiative" macro that handles the start of a combat.
The first step is to select the combatants. Then the macro runs a FOREACH loop to generate a form with the characters' names and an input window that defaults to "1d20+<initiative modifier>", but that can also take a specific value so my players can roll their own initiatives. This all works great.
My problem is I want to skip characters that are "connected" to specific PCs. Animal companions, for instance, go on their master's initiative turn. It happens that this group is lousey with these connected characters - two different animal companions, one follower with a mount, and often times mounts for the other PCs as well. This means I'm having to individually click all the combatants to make sure I don't include the tokens that don't roll initiative.
I have added a new property called "Companion" that I am giving a True/False (1/0) value. What I would like is to add a step in the macro that takes the first collection of names, runs a FOREACH to check the status of the Companion property, then spits out a new list that strips the companions and feeds that new list into the existing code. This would allow me to sweep the mouse over the battle field to select everything at once.
The problem is it has been so very long since I worked with this macro that I can't quite figure out how to do this. I'm sure it's got to be pretty easy, but everything I've tried is screwing things up. Ah, the joys of an old brain...
The first step is to select the combatants. Then the macro runs a FOREACH loop to generate a form with the characters' names and an input window that defaults to "1d20+<initiative modifier>", but that can also take a specific value so my players can roll their own initiatives. This all works great.
My problem is I want to skip characters that are "connected" to specific PCs. Animal companions, for instance, go on their master's initiative turn. It happens that this group is lousey with these connected characters - two different animal companions, one follower with a mount, and often times mounts for the other PCs as well. This means I'm having to individually click all the combatants to make sure I don't include the tokens that don't roll initiative.
I have added a new property called "Companion" that I am giving a True/False (1/0) value. What I would like is to add a step in the macro that takes the first collection of names, runs a FOREACH to check the status of the Companion property, then spits out a new list that strips the companions and feeds that new list into the existing code. This would allow me to sweep the mouse over the battle field to select everything at once.
The problem is it has been so very long since I worked with this macro that I can't quite figure out how to do this. I'm sure it's got to be pretty easy, but everything I've tried is screwing things up. Ah, the joys of an old brain...