Maptool intergrated initiative tracking USE CASES

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

I've just added a bunch of macro functions and variable support. The following macro variables are available:
  • token.init Get the initiative value of the first instance of a token in the initiative list and set the initiative value for all instances of a token in the initiative list.
  • token.initHold Get the initiative hold value of the first instance of a token in the initiative list and set the initiative value for all instances of a token in the initiative list. The value is 0 to clear the hold flag and 1 to set it.
  • init.roundGet and set the initiative round. Only the GM can set the initiative round.
  • init.currentGet and set the current initiative index. Only the GM can get and set the current initiative index.
The list of functions is below. Arguments that are in italics are optional. For token arguments to be optional the macro must be a token macro. The token argument is the GUID of the token. The following functions are available:
  • getInitiative(token) Get the initiative value of the first instance of a token in the initiative list.
  • setInitiative(token, value) Set the initiative value for all instances of a token in the initiative list.
  • getInitiativeHold(token) Get the initiative hold value of the first instance of a token in the initiative list. The value is a 0 if false and 1 if true.
  • setInitiative(token, value) Set the initiative hold value for all instances of a token in the initiative list. The value can be a number (0 == false, all others true) or a string (true == true, all others false ignoring case).
  • addToInitiative(token, allow-duplicates, initiative) Add a token to the initiative list. If the allow-duplicates flag is false (default is false) then the macro will not add the token if it is already in the initiative list. If the initiative value argument is passed then the value of the initiative will be set for the token whether it was actually added or not. To set the initiative argument you must set the allow-duplicates argument.
  • removeFromInitiative(token) Removes all instances of a token from the initiative list. This method can only be executed by the GM.
  • addAllToInitiative(allow-duplicates) Add all tokens to the initiative panel. If the allow-duplicates flag is false (default is false) then the macro will not add a token if it is already in the initiative list.
  • addAllPCsToInitiative(allow-duplicates) Add all PC tokens to the initiative panel. If the allow-duplicates flag is false (default is false) then the macro will not add a token if it is already in the initiative list.
  • addAllNPCsToInitiative(allow-duplicates) Add all NPC tokens to the initiative panel. If the allow-duplicates flag is false (default is false) then the macro will not add a token if it is already in the initiative list.
  • nextInitiative() Move to the next item in the initiative list. This function can only be executed by the GM.
  • sortInitiative() Sort the items in the initiative list by their initiative value. May only be executed by the GM.
  • initiativeSize() Get the number of items in the initiative list.
  • removeAllFromInitiative() Remove all tokens from the initiative panel, reset the round counter and clear the current token.
  • removeAllPCsFromInitiative() Remove all PC tokens from the initiative panel, reset the round counter and clear the current token.
  • removAllNPCsFromInitiative() Remove all NPC tokens from the initiative panel, reset the round counter and clear the current token.
  • getInitiativeRound() Get the initiative round.
  • setInitiativeRound(value) Set the initiative round. Only the GM can call this function.
  • getCurrentInitiative() Get the index of the item that currently has initiative. This function can only be called by the GM.
  • setCurrentInitiative(value) Set the index of the item that currently has initiative. Only the GM can call this function.
Last edited by jay on Wed Aug 27, 2008 3:19 pm, edited 4 times in total.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Full Bleed wrote:
Mrugnak wrote:
Full Bleed wrote:Likewise, if you broke out the init number into its own bubble, double click on that bubble could allow for "Manual Entry."
That would be a good option, if the init number is visually discriminated from the token.
Like this:

Image
Like the picture. If you can draw what it would look like when the token is holding we can talk about implementing it.

The underlying component for the initiative panel (JList) doesn't support selecting specific areas (like your state bubble) for an item in the list. You always select the whole line. It could be replaced with a table instead of a list, but tables don't support buttons very well. The only way to get it to work is to make a bunch of components and 'fake' a list. The problem here is that you have to reimplement all of the rest of the list support that is handled by the java component. So it's going to be difficult to do, and I'm not sure that it is worth all that effort to display an edit dialog with one click instead of 2.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Mrugnak wrote:
Full Bleed wrote:I think that double clicking should either:

1) Remove the token from the init window
2) Or put the token in Hold mode
I would find Hold the most "expected behavior" option of the two. Also Hold is the least damaging - it's easy to double click by accident after all and having my token get zapped would cheeze me off.

An acceptable alternate would be editing the position in the initiative order, or other analogies for "editing" the token.
I actually think the most expected behavior would be to 'open' the item; a popup up a dialog to edit the token initiative value. It can edit the hold state too, and whatever else might show up later. I agree that editing the token isn't the proper thing to do on a double click. I changed it in my latest code to center the token w/in the map. I liked that better, but it still isn't what someone unfamiliar with the app would expect.

Any comments on having double click popup a dialog to edit the token initiative value and hold state?

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

Centering on map might not be the expected behaviour for someone whose never used maptools before, but I think it would be the expected behavior for anyone who has. ("Okay, it's this tokens turn, where the crap are they?) And the preferred behaviour I would expect Change init, Move Up, Move Down, and Hold to be right click functions if they did not have buttons on the panel.

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

Post by Full Bleed »

jay wrote:I actually think the most expected behavior would be to 'open' the item; a popup up a dialog to edit the token initiative value.
Why not break out the init value (as in my example above) and make a double click on *it* edit the init value?

Then we can have a double click on the token do something else.

I just want it to do something meaningful that we'll all be doing enough to justify moving the command out of the drop-down into a big simple move like double-clicking the tokens.

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

Post by Full Bleed »

UntoldGlory wrote:Centering on map might not be the expected behaviour for someone whose never used maptools before, but I think it would be the expected behavior for anyone who has. ("Okay, it's this tokens turn, where the crap are they?) And the preferred behaviour I would expect Change init, Move Up, Move Down, and Hold to be right click functions if they did not have buttons on the panel.
Move Up and Move Down can be accomplished by simply dragging the tokens within the init window. Why clutter the right click menu?

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Post by Craig »

Full Bleed wrote:
jay wrote:I actually think the most expected behavior would be to 'open' the item; a popup up a dialog to edit the token initiative value.
Why not break out the init value (as in my example above) and make a double click on *it* edit the init value?

Then we can have a double click on the token do something else.

I just want it to do something meaningful that we'll all be doing enough to justify moving the command out of the drop-down into a big simple move like double-clicking the tokens.
I like this idea its easy and intuitive, maybe it could be achieved with a table that uses a custom cell renderer so it looks like a button even if its only text.

User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

Post by Mrugnak »

Full Bleed wrote:Why not break out the init value (as in my example above) and make a double click on *it* edit the init value?
Because there isn't a java control available "out of the box" that lets you do that, so they'd have to write one from scratch?

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

jay wrote: [*]nextInitiative() Add all tokens to the initiative panel. If the allow-duplicates flag is false (default is false) then the macro will not add a token if it is already in the initiative list.[/list]
????

The function name does not seem to match what the text says it does? is this right or did you input the wrong information for this function? I would expect this to change the initiative to the next token in the lists based on the init number order:

20
15

If 20 has init and uses the nextInitiative() function, it would change to 15 to having init.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

Full Bleed wrote:
UntoldGlory wrote:Centering on map might not be the expected behaviour for someone whose never used maptools before, but I think it would be the expected behavior for anyone who has. ("Okay, it's this tokens turn, where the crap are they?) And the preferred behaviour I would expect Change init, Move Up, Move Down, and Hold to be right click functions if they did not have buttons on the panel.
Move Up and Move Down can be accomplished by simply dragging the tokens within the init window. Why clutter the right click menu?
Good point, ignore that. Question though, don't have it at work to check, but if you drag a token to a new location (say your token has a 20 init, but you drag it down between two tokens that have 14 and 16), does the init value change, or just it's order?

User avatar
Pyroman
Cave Troll
Posts: 68
Joined: Wed Dec 26, 2007 12:42 pm
Location: Tampa, FL

Post by Pyroman »

jay wrote:I actually think the most expected behavior would be to 'open' the item; a popup up a dialog to edit the token initiative value. It can edit the hold state too, and whatever else might show up later. I agree that editing the token isn't the proper thing to do on a double click. I changed it in my latest code to center the token w/in the map. I liked that better, but it still isn't what someone unfamiliar with the app would expect.

Any comments on having double click popup a dialog to edit the token initiative value and hold state?
I agree with double-clicking centering the view on the token.

The only time that I would want to manually change initiative is when something that is holding comes back in, so the menu access to manually change initiative is actually where I would prefer it.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Post by jfrazierjr »

UntoldGlory wrote:
Full Bleed wrote:
UntoldGlory wrote:Centering on map might not be the expected behaviour for someone whose never used maptools before, but I think it would be the expected behavior for anyone who has. ("Okay, it's this tokens turn, where the crap are they?) And the preferred behaviour I would expect Change init, Move Up, Move Down, and Hold to be right click functions if they did not have buttons on the panel.
Move Up and Move Down can be accomplished by simply dragging the tokens within the init window. Why clutter the right click menu?
Good point, ignore that. Question though, don't have it at work to check, but if you drag a token to a new location (say your token has a 20 init, but you drag it down between two tokens that have 14 and 16), does the init value change, or just it's order?

Panel totally ignores the init value until you hit sort. It's just moved down in the list order.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

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

Post by Full Bleed »

Pyroman wrote:I agree with double-clicking centering the view on the token.

The only time that I would want to manually change initiative is when something that is holding comes back in, so the menu access to manually change initiative is actually where I would prefer it.
Not a fan of this. First, I've never "lost" a token. Second, if I did I could just use the map explorer and double click on the token's name to center on it. Third, centering on the token is not an innately initiative related function.

Again, double clicking the token in the init panel should do something that most people will be constantly doing in the panel. It should be specifically initiative related. Centering on the token just doesn't seem to fit that bill as far as I'm concerned.

Now, if there are people out there that do think they will be doing that all the time, maybe give them an auto-center option for when a token has init. I'd keep that option off, but it sounds like some might like that.

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

Mmmm, I'd use double click to center a *lot*, but I'd never turn on an auto-center, especially if it gets set so that players can advance the init by clicking "Done" or something.

However, if whatever token's turn it was got a state or glowy underlay or something, or even if single clicking on them in the init window selected the token (which would be awesome), then I'd have no problem if double clicking did something else. Not that it's a deal breaker for me anyway.

User avatar
Amaril
Great Wyrm
Posts: 1058
Joined: Sun Nov 26, 2006 11:44 am
Location: Atlanta, GA
Contact:

Post by Amaril »

Full Bleed wrote:Not a fan of this. First, I've never "lost" a token. Second, if I did I could just use the map explorer and double click on the token's name to center on it. Third, centering on the token is not an innately initiative related function.

Again, double clicking the token in the init panel should do something that most people will be constantly doing in the panel. It should be specifically initiative related. Centering on the token just doesn't seem to fit that bill as far as I'm concerned.

Now, if there are people out there that do think they will be doing that all the time, maybe give them an auto-center option for when a token has init. I'd keep that option off, but it sounds like some might like that.
I agree with the idea that it should not center on the token for two reasons:

1) It doesn't seem inline with the function of the init panel'
2) That's what the Map Explorer is for.

I think what it should be used for is editing the initiative value, in case you want to be more precise than dragging-and-dropping, or setting the hold state.

Post Reply

Return to “MapTool”