Initiative macro questions

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Initiative macro questions

Post by MandyRae »

I'm looking at creating an initiative macro (and using the initiative panel) that prompts for the token's initiative, loads them into the initiative panel, sorts the initiative and then applies to flat-footed state. I've gotten this far. However, I have various states the delineate the actions taken by the token in the round and was wondering if there was a way to have the initiative advance to the next token in the panel, apply a state (marker for the current initiative, and remove the various action states taken last round.)

I've looked at the initiative functions on the wiki, and understand how setInitiative, addToInitiative, sortInitiative, and nextInitiative work in regards to what I'm trying to do, but not quite sure how setInitiativeHold works in regards to delaying and readying actions as well.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Initiative macro questions

Post by Full Bleed »

MandyRae wrote:but not quite sure how setInitiativeHold works in regards to delaying and readying actions as well.
As far as I know the "hold" function is just like a state, either a token is holding or it's not. It doesn't, inherently, do anything... it's just a condition/state that you can check for or apply. In the init panel you get a visual representation of whether something is in the held state with it shifting to the right.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Initiative macro questions

Post by MandyRae »

That's what I assumed as well, I just wasn't sure how it was actually implemented. So it's something that one would "turn on" for delay and ready actions. I thank you for clarifying that. Now just need the bigger issue of how to clear and activate states when the initiative switches to the token.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Initiative macro questions

Post by Full Bleed »

MandyRae wrote:Now just need the bigger issue of how to clear and activate states when the initiative switches to the token.
Not too complicated. Here is some simplified code that shows how you would grab the id of the token with init, switch to it, and toggle off a state. I have code like this in my "Receive Init Actions" macro:

Code: Select all

[h: tokId = getInitiativeToken()]

[h: switchToken(tokId)]

[h, if (state.FightDefensively == 1), CODE:
	{
		[h: state.FightDefensively = 0]
	};
	{
	}
]
You could, of course, do any number of things in the Fight Defensively bit (like adjust AC accordingly, etc.)


My core Init macros consist of the following:

1) Roll Init - Rolls bad guy inits and players who haven't rolled for themselves.
2) Sort Init - Sorts init and some other round starting maintenance, launches a "Receive Init Actions" Macro for the token who gets 1st init.
3) Next Init - Advances the init to successive tokens in the init panel and runs the "Receive Init Actions" Macro on each. If there is no one else in the init panel it moves to start a new round.

So, since I have init every round, I "Roll Init", "Sort Init", and then "Next Init" through all of the tokens in the init panel until the end. Then rinse and repeat.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Initiative macro questions

Post by MandyRae »

Thank you, sweetie! That's exactly what I was looking for (and I love the fact that you gave me a sample code, and didn't attempt to write the code for me). This will make everything I've been doing in Maptool that much more wonderful once we start playing! ::hugs::

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Initiative macro questions

Post by Full Bleed »

MandyRae wrote:Thank you, sweetie! That's exactly what I was looking for (and I love the fact that you gave me a sample code, and didn't attempt to write the code for me). This will make everything I've been doing in Maptool that much more wonderful once we start playing! ::hugs::
I'm not sure what to do with that kind of affection around here... man, can't think of the last time Wolph hugged me. ;)


On the init stuff... when I started building my framework, getting it to help me manage rounds and make the most of the init panel was my primary focus. That said, I suggest that you try to keep it real simple at first. Create a basic structure of a few interconnected macros that do simple things (like roll, sort, next, receive init actions, and end of round actions). Limit it to core panel functionality and minor token modifications (like toggling states) at first will help you get a solid base upon which to build in all kind of stuff later. Trust me, it will grow in complexity real fast.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Initiative macro questions

Post by MandyRae »

Full Bleed wrote:Trust me, it will grow in complexity real fast.
I'm actually approaching this framework with the intent to keep it as simple as possible (at least from a player's functionality.) I used d20Pro with the last AP I ran with this group, and they enjoyed it--this was the first time they had a VTT used instead of minuatures--and it had the added bonus of having a full interface wit Hero Lab (me being a diehard HERO System fan, it's so difficult to type "hero" and not cap the whole thing, lol). But I wanted the VBL that Maptool offers. (d20Pro has been promising it since they did their Kickstarter, but they seem to be constantly delaying everything, and haven't given much documentation on what they are doing with the money other than making something that I don't need or want).

Since we meet face-to-face, there's no need for the massive frameworks offered on here, since all we really need it to do is track combat. (They even complained about having d20Pro automate init rolls . . . :roll: ). The fact that we'll be using Hero Lab as well for character tracking makes the massive frameworks even more unnecessary
in most aspects.

That being said, again I thank you sweetie!! (You too Wolph! I hope I didn't come off too confrontational in my statements about the BoT. ::hugs::)

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Initiative macro questions

Post by wolph42 »

That being said, again I thank you sweetie!! (You too Wolph! I hope I didn't come off too confrontational in my statements about the BoT. ::hugs::)
not at all. Its actually appreciatied, would you care to answer the post I wrote in answer to it?

User avatar
StarMan
Dragon
Posts: 939
Joined: Mon Jul 18, 2011 1:10 pm
Location: Toronto

Re: Initiative macro questions

Post by StarMan »

MandyRae wrote:Since we meet face-to-face, there's no need for the massive frameworks offered on here, since all we really need it to do is track combat. (They even complained about having d20Pro automate init rolls . . . :roll: ). The fact that we'll be using Hero Lab as well for character tracking makes the massive frameworks even more unnecessary
in most aspects.
As a "massive framework" developer I will try not to take that personally. :wink: If you click on the link in my sig and go to my videos page (link in first paragraph), you can watch the "Running an Encounter" section where I do most of the stuff you describe. Yes, I know you're playing 3.5 Ed whereas the MPB is 4th Ed but many of the concepts are still the same.
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!

Post Reply

Return to “Macros”