onNewRound/onNewTurn events?

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
User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

onNewRound/onNewTurn events?

Post by Mrugnak »

Is there some way to hook into when a tokens turn comes up in initiative? Or when a new round is started? (those mean different things in some game systems...)

I've got a macro that I am currently running by clicking by hand at the start of my turn; it checks current number of HP and rolls consciousness or death checks as appropriate, resets penalties from "until next turn" effects, that kind of administrivia.

Unfortunately, my brain is swiss cheese and I keep forgetting to run the macro until part way through my turn. I would like to hook it to an event so I don't have to think about it any more. Is there a way to do this?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: onNewRound/onNewTurn events?

Post by aliasmask »

It's something that has been talked about but not implemented, I think. But I do believe the NERPs build does have event handlers when initiative changes.

There is a way to create your own handler by using onChangeSelect. Clicking anywhere on map/tokens will executes this handler. You can then check a variable for the current initiative and execute your code. It can be tricky to do though because you have to ignore duplication of the event.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: onNewRound/onNewTurn events?

Post by JamzTheMan »

My fork doesn't have the initiative events either.

The common solution is to not use the "initiative panel" to advance init. Instead, create a macro (assign a function key if you want as well) to advance the initiative. On each advance, check for end of round or end of "initiative for that token".

To avoid dupes in case of delayed actions, on initiative, I add a "timestamp" to that token. If that timestamp is == to the current timestamp I know he as already done his checks, ie poison, bleed, etc.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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

Re: onNewRound/onNewTurn events?

Post by Full Bleed »

JamzTheMan wrote:The common solution is to not use the "initiative panel" to advance init. Instead, create a macro (assign a function key if you want as well) to advance the initiative. On each advance, check for end of round or end of "initiative for that token".
This is how I do it. I have the following buttons to handle init:

1) Announce Combat (Initializes Combat.)
2) Roll (Rolls enemy inits on the first click, will roll inits of players haven't rolled their own on the second click.)
3) Sort (Sorts inits, deals with beginning of round actions, gives the first token init, fires a "Recieve Init" function.)
4) Next (Advances to the next token in the init panel. Fire the "Receive Init" function. And, at the end of the round fire an "End of Round" function.)
5) End Combat (removes tokens from init and ties up loose ends.)

Disable buttons of actions that can't be done at certain times and you'll be able to move through combat very efficiently without making mistakes.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “Macros”