MapTool 1.3 Development Build 41

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

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

Re: MapTool 1.3 Development Build 41

Post by jay »

Full Bleed wrote:
* Added functions to add/remove tokens from the init panel and sort or go to next initiative.
What are these functions and how can we use them?
All of the functions are here.
Full Bleed wrote:
* Added token.initHold variable and getter/setter functions for init hold (xxxInitiativeHold) and init value (xxxInitiative).
Can we get an example of this in action too?
Token macros:
  • Add the token to initaitive and allow duplicate:
    [addToInitiative(1)]
  • Toggle token hold using variables:
    [token.initHold = if(token.initHold, 0, 1)]
  • Toggle token hold using functions:
    ['setInitiativeHold() = ' + setInitiativeHold(if(token.initHold, 0, 1))]
  • Get the token hold value using functions:
    ['getInitiativeHold() = ' + getInitiativeHold()]
  • Get the token initiative value then set it to 1d20 using variables:
    [token.init] [token.init = 1d20]
  • Add to token initiative, no duplicates:
    [addToInitiative()]
  • Remove the token from initiative:
    [removeFromInitiative()]
  • Add the token to initaitive, allow duplicates & set the state to 1d20:
    [addToInitiative(1, 1d20)]
  • Get the token initiative value using a function:
    {'getInitiative() = ' + getInitiative()}
  • Set the token initiative to 1d20 using function:
    ['setInitiative() = ' + setInitiative(1d20)]
Regular macros:
  • Add all tokens to initiative without duplicates:
    [addAllToInitiative()]
  • Add all tokens to initiative allowing duplicates:
    [addAllToInitiative(1)]
  • Add all PC tokens to initiative without duplicates:
    [addAllPCsToInitiative()]
  • Add all PC Tokens to initiative allowing duplicates:
    [addAllPCsToInitiative(1)]
  • Add all NPC tokens to initiative without duplicates:
    [addAllNPCsToInitiative()]
  • Add all NPC tokens to initiative allowing duplicates:
    [addAllNPCsToInitiative(1)]
  • Go to the next item in initiative order:
    [nextInitiative()]
  • Remove all tokens from initiative:
    [removeAllFromInitiative()]
  • Remove all PCs from initiative:
    [removeAllPCsFromInitiative()]
  • Remove all NPCs from initiative:
    [removeAllNPCsFromInitiative()]
  • Sort the initiative:
    [sortInitiative()]
  • Get the current initiative index and then set it using variables:
    [init.current], [init.current = init.current + 1]
  • Get the current initiative index and then set it using functions:
    [getCurrentInitiative()], [setCurrentInitiative(getCurrentInitiative() + 1)]
  • Get the round and then set it using variables:
    [init.round], [init.round = init.round + 1]
  • Get the round and then set it using functions:
    [getInitiativeRound()], [setInitiativeRound(getInitiativeRound() + 1)]
  • Get the number of items in the initiative panel:
    [initiativeSize()]

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

Post by jay »

RedDog wrote:Sounds like a nice solid build. It will be interesting to see what the macro builders do with the new additions.

Here are a few quick observations on the Initiative Panel:
- I never noticed before, but I find it difficult to read the NPC initiative and Token Name with the white on blue. Any chance that it can be changed to something like black on blue for better readability?
- Also, when removing a GM name on the token, the parens remain on the Initiative panel.
Fixed. The problems reading them is because I made them use a smaller font to use less space at somebody's request.

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

Post by jay »

RPTroll wrote:So far I can't get
{addAllPCsToInitaitive(0)}
to work. I get the message

Code: Select all

Could not execute the command: Undefined function: addAllPCsToInitaitive
Same message for removeAllPCsFromInitaitive(), removeAllFromInitaitive(), removAllNPCsFromInitaitive(), addAllToInitaitive(), addAllNPCsToInitaitive()
I misspelled initiative in the docs, I'll fix that. I checked and they are working in the latest build.
RPTroll wrote:nextInitiative() only works if the init has already started otherwise it gives

Code: Select all

Could not execute the command: -1
Fixed this bug. Thanks for the help!

User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

thanks for the reply jay--have you seen this thread?

http://forums.rptools.net/viewtopic.php?t=5265

I'm trying to deal with multiple NPC's with the same player name (Troll, Dragon, Goblin, Monster), and it has trouble. Halp?
0+0=1, for very unstable CPUs.

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

Post by jay »

Orchard wrote:I get the same (essential) error for setInitiative(), so I think there are some problems EITHER with my implementation or the function list. What's going on here.

Jay, if you could clarify these, it might help.
The setInitiative() function is only available if there is a token available (token macro etc.)

User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

jay wrote:
Orchard wrote:I get the same (essential) error for setInitiative(), so I think there are some problems EITHER with my implementation or the function list. What's going on here.

Jay, if you could clarify these, it might help.
The setInitiative() function is only available if there is a token available (token macro etc.)
Okay, this is definitely a bug.

If you have multiple tokens with the same PC name, and use the setInitiative() function like such as a token macro:

Code: Select all

[P:token.name] has initiative of [Init = 1d20] 
[H:setInitiative(Init)]
then you can get some strange results. Here's exactly how to replicate this.

Take a token (the troll from the default library is a good choice). Put it on the map, then add the above as a token macro. Duplicate the token numerous times, then add all the duplicates (but not the original) to the initiative list. Select any one of the duplicates and run the macro. You get this error:

Code: Select all

Could not execute the command: The token is not in the initiative list so no value can be set
Delete the original, select a random one of the duplicates, run the macro, and it SEEMS to work. This is deceptive BECAUSE it is simply firing on the FIRST duplicate. This is actually very easy to test by creating the duplicates with incremental numbering, then watching as this happens. If you keep deleting the duplicates in the order they were created it will cascade down the list. At NO TIME can you actually use this to set the initiative of more than one of the duplicates, even if they are all in the initiative panel, which is very frustrating. The ONLY way to set the initiative of multiple tokens is if they all have unique player names OR to do it manually.

I'm filing this as a bug, since it needs to be possible to do this for large-scale battles. I don't mind setting unique player names for 3-5 monsters, but if you are fighting a horde of orcs, there's no way. Or a legion of undead skeletons? Not only no thanks, but it doesn't make sense--they conceptually wouldn't have different names.

And formians really are nothing more than Formian Worker #3423. I'm sure this applies to other games as well. Thanks.
0+0=1, for very unstable CPUs.

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

Post by jay »

Orchard wrote:Okay, this is definitely a bug.
I agree. This is a bug in the code that determines the token that is executing the macro. It is broken for all of the functions(try setting the token name) and token variables and not just the initiative functions. It actually resolves the tokens by name and not by their id. I'm not sure why it works this way.
Orchard wrote:I'm filing this as a bug, since it needs to be possible to do this for large-scale battles. I don't mind setting unique player names for 3-5 monsters, but if you are fighting a horde of orcs, there's no way. Or a legion of undead skeletons? Not only no thanks, but it doesn't make sense--they conceptually wouldn't have different names.

And formians really are nothing more than Formian Worker #3423. I'm sure this applies to other games as well. Thanks.
I think that was the original purpose of automatically numbering the tokens.

Krattack
Kobold
Posts: 18
Joined: Tue Aug 19, 2008 11:01 am
Location: Tampere, Finland

Post by Krattack »

jay wrote:
Orchard wrote:I don't mind setting unique player names for 3-5 monsters, but if you are fighting a horde of orcs, there's no way. Or a legion of undead skeletons? Not only no thanks, but it doesn't make sense--they conceptually wouldn't have different names.

And formians really are nothing more than Formian Worker #3423. I'm sure this applies to other games as well. Thanks.
I think that was the original purpose of automatically numbering the tokens.
How about having an option to rename several tokens at once and MT automatically appends number to the name? Like for said horde of orcs the GM could select them all and click rename. A dialog pops up, GM inputs Orc Warrior and MT renames the tokens as Orc Warrior 1 - Orc Warrior 32.

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

Post by jfrazierjr »

Trevor, did you patch your patch of the patch I sent you to add default properties so that they show up when you open a token's edit window?

If not, are you going to patch that or would you like me to send you a patch? If you want me to do it, it will probably be a day or so before I can get around to it. I just got a new computer and have to set everything up again, including JDK, Eclipse, etc. As an aside, I hope the hell this works since it's 64 bit and I know some software won't work.. already ran into trouble getting GIMP python working (grrrrrr)
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
torstan
Great Wyrm
Posts: 1887
Joined: Wed Sep 27, 2006 6:50 am
Contact:

Post by torstan »

It is because impersonate uses the player token name and picks the first token on its list that has that name. This was changed from picking it using some unique number innate to the token. I don't know why this changed, but I do know that having non-unique player names will seriously screw up your token macros.

Trevor, can we list this as a bug, please?

User avatar
Orchard
Great Wyrm
Posts: 1852
Joined: Fri May 09, 2008 10:45 am
Location: Doylestown PA
Contact:

Post by Orchard »

torstan wrote:It is because impersonate uses the player token name and picks the first token on its list that has that name. This was changed from picking it using some unique number innate to the token. I don't know why this changed, but I do know that having non-unique player names will seriously screw up your token macros.

Trevor, can we list this as a bug, please?
Yeah, please, because now that I know the scope, I'm convinced it has pretty serious potential for causing problems.
0+0=1, for very unstable CPUs.

User avatar
jespley
Cave Troll
Posts: 67
Joined: Thu Oct 26, 2006 9:56 pm
Location: Washington, DC

Bug report

Post by jespley »

Bug report:
-Add a token (a PC in my case but I don't think it matters) to the initiative panel.
-right click on that token.
-remove token.
-The initiative window is now screwed up.

Thanks for all the work everyone! Maptool rocks.
Jared

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

Re: Bug report

Post by Full Bleed »

jespley wrote:Bug report:
-Add a token (a PC in my case but I don't think it matters) to the initiative panel.
-right click on that token.
-remove token.
-The initiative window is now screwed up.
I'm not seeing a problem.

Can you define "screwed up"?

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

Re: Bug report

Post by jay »

jespley wrote:Bug report:
-Add a token (a PC in my case but I don't think it matters) to the initiative panel.
-right click on that token.
-remove token.
-The initiative window is now screwed up.

Thanks for all the work everyone! Maptool rocks.
I can't get this to do anything wrong. I tried right clicking the token on the map and on the init panel and both seem to work correctly. This is something that was broke in b40, could you check the version (Help->About) and make sure you didn't execute the older version by accident?

nwelte1
Giant
Posts: 151
Joined: Mon Nov 19, 2007 10:52 pm

Post by nwelte1 »

Orchard wrote:
Okay, this is definitely a bug.

If you have multiple tokens with the same PC name, and use the setInitiative() function like such as a token macro:

Code: Select all

[P:token.name] has initiative of [Init = 1d20] 
[H:setInitiative(Init)]
then you can get some strange results. Here's exactly how to replicate this.

Take a token (the troll from the default library is a good choice). Put it on the map, then add the above as a token macro. Duplicate the token numerous times, then add all the duplicates (but not the original) to the initiative list. Select any one of the duplicates and run the macro. You get this error:

Code: Select all

Could not execute the command: The token is not in the initiative list so no value can be set
I got the same error on a macro i was working on until I had the macro add the token to initative first before setting initative.

Here is the macro I use:

Code: Select all

/me readies for combat! [H: addToInitiative()][H:token.init=(1d20+Init)]{token.init}
If the addToInitiative command comes after the token init it would not work. Now if the tokens have the exact same name i.e Troll 1 and Troll 1 it will roll the initiative for only one of the tokens. I solved this problem with automatic random number assignments for the tokens set through the preferences options.

I tested with you macro and modified as follows:

Code: Select all

[H:addToInitiative()]
[P:token.name] has initiative of [Init = 1d20] 
[H:setInitiative(Init)]
add it worked fine with random number assignment to tokens.

Post Reply

Return to “Announcements”