State Duration Fields.

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

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

Post Reply
User avatar
Full Bleed
Demigod
Posts: 4583
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

State Duration Fields.

Post by Full Bleed »

I think it would be nice if you could add a duration field into the application of a state that would automatically increment with the Round or upon receiving Initiative.

Something like this:

Code: Select all

[state.StateName(1, 10, "round")]
[state.StateName(1, 5, "init")]



Or using:

Code: Select all

[setState(state, value, id, duration, increment)]


This would make tracking durations so much easier and, presumably, faster than typical macroscript methods.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
wolph42
Deity
Posts: 9883
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: State Duration Fields.

Post by wolph42 »

i have this system embedded in my framework and i know that there are other FW applying the same principle. The issue with this is that you cannot make this system agnostic. Cause *when* would the state time counter decrease by one step?
(here one turn consists out of multiple (n)pc rounds)
- at the start of the turn
- at the end of the turn
- at the start of the initiators round
- at the end of the initiators round
- at the start of the receivers round
- at the end of the receivers round
and im probably missing a couple...

User avatar
Azhrei
Site Admin
Posts: 12067
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: State Duration Fields.

Post by Azhrei »

Yeah, this will be implemented with the generic event mechanism. The initiative tracker will broadcast events and other objects within the system will be able to listen for those events and execute scripts. I hadn't considered having States listen for events but rather the objects that states are attached to, because I figure adding and removing a state from a token is an event of its own so responding to it on the state seems ... illogical.

But yeah, there's a idea for some type of generalized event system. (Meaning your own scripts will be able to generate events as well.)

User avatar
Full Bleed
Demigod
Posts: 4583
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: State Duration Fields.

Post by Full Bleed »

wolph42 wrote:i have this system embedded in my framework and i know that there are other FW applying the same principle. The issue with this is that you cannot make this system agnostic.

True, but the int panel in MT isn't 100% system agnostic. That doesn't mean we shouldn't have gotten one. ;) In fact, it's a feature in MT that I really could not live without and it's flexible enough that most people can bend it to their will with the exception of a few really wonky systems out there.

Cause *when* would the state time counter decrease by one step?
(here one turn consists out of multiple (n)pc rounds)
- at the start of the turn
- at the end of the turn
- at the start of the initiators round
- at the end of the initiators round
- at the start of the receivers round
- at the end of the receivers round
and im probably missing a couple...

Ok, even better, add another flag. :)

Using my example above:

Code: Select all

[setState(state, value, id, duration, increment, execution)]


Increment Event (events that already exist in MT): On Init, On Round.
Execution: 0 for the beginning of the increment event or a 1 for the end of the increment event.


Heck, even opening up the setState TOGGLE-ON to be open-ended would make it more useful. That is, 0 would be still be off, but anything > 0 would be ON. Then we could use the ON state as a counter (wouldn't even need a duration field.) That said, once we did that, going into the expanded system I mentioned above would still be very temping.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

femanon
Cave Troll
Posts: 95
Joined: Sat Jun 16, 2012 10:25 pm

Re: State Duration Fields.

Post by femanon »

wolph42 wrote:i have this system embedded in my framework and i know that there are other FW applying the same principle. The issue with this is that you cannot make this system agnostic. Cause *when* would the state time counter decrease by one step?

Typically, you would decrease it on your initiative. this might not work for situations where time is flowing differently.

Post Reply

Return to “Feature Requests”