RPTools.net

Discussion and Support

Skip to content

It is currently Wed Nov 22, 2017 5:24 pm 






Reply to topic  [ 4 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Dragon
 
Joined: Mon Jul 21, 2008 6:38 pm
Posts: 742
 Post subject: onNewRound/onNewTurn events?
PostPosted: Sat Nov 04, 2017 9:36 am 
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?


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7949
Location: Bay Area
 Post subject: Re: onNewRound/onNewTurn events?
PostPosted: Sat Nov 04, 2017 1:14 pm 
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.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1706
Location: Chicagoland
 Post subject: Re: onNewRound/onNewTurn events?
PostPosted: Sat Nov 04, 2017 2:50 pm 
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
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3774
Location: MD
 Post subject: Re: onNewRound/onNewTurn events?
PostPosted: Sat Nov 04, 2017 3:58 pm 
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."


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 4 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman