MapTool 1.3 Development Build 35

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

Post Reply
User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

MapTool 1.3 Development Build 35

Post by trevor »

The "Inching ever closer to 1.3 final" build:

Build 35 (7/14/08)
* Introduce colored and shaped light
* Added set token property macro (stp) that allows setting of properties, halos and states through macros (Contributed by Craig Wisniewski)
* Added support for Shadow Run 4 rolls (Contributed by mortani)
* Updates to spanish translation (Contributed by Patricio Acevedo)
* Show which property is being prompted for when property value dialog pops up (Contributed by Michael Folsom)

* Fix bug: vision cache not updated when clearing light sources
* Fix bug: if localhost isn't resolveable MT doesn't work

Contributed by Craig Wisniewski
* /stp macro to explicitly set a property on a supplied token
* Ability to set token properties via [ ] command (e.g. [HP = HP - 1] )

Contributed by giliath
* The parser now supports hex numbers in the format 0xF
* The dicelib now supports hex numbers in the format #FFF, #FFFFFF and #FFFFFFFF for color support
* Added a new function to the parser hex. Ex. hex(255) -> "0xFF"

Contributed by Ryss
* You can drag & drop copy macro buttons between tokens in selection tab. You can also drop a button onto the common group to copy the macro to every selected token. You cannot drag from the common tab though (by design).
* Common macros are sorted now. Previously the order of them were dependent upon selected tokens which caused confusion.
* Paddings of token macro buttons have been reduced to better utilize screen estate.
* Pressing enter (or numpad enter) anywhere in the main window will make the chat panel gain focus.
* Now you can add and delete macros right from the selection tab via right click menus. Right click operations on common group affects every token that is selected, so you can perform mass aditions and deletions with a few mouse clicks.
* Added help text to selection panel.
* Reduced padding between subgroup label and macro buttons.
* Rounded custom borders for button groups.
* Token image is added to button group labels.
* Bug fix: Some small UI fixes.
* Bug fix: Selection tab now works in all cases whenenever a token is selected (i.e. whenever it has the red-white selection rectangle).

Contributed by Jay
* Bug fix: Burst template size text & paint in Java 6
* Bug fix: Line template failed when drawing with out a border defined.
* Bug fix: Template erase not working
* Blast & Wall templates
* Campaign Properties stored in packed file
* Image token states and flowing token states
* Upgrades to state editor; ordering & update existing
Dreaming of a 1.3 release

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Documentation on token set property from Craig:

Examples of setting a token property
/stp [MaxHP = 10][HP = MaxHP]
/stp [Name = "Fred"]
The user will be prompted for values is does not know about as in
normal rolls, unlike normal
rolls though the value will be saved for other "rolls" on the same
line, the value saved to
the variable is before it is evaluated so if someone types in StrBonus
and then it will
evaluate the StrBonus of each token selected rather than use the value
from the first token
on all of them.

Setting a Halo
Named colors (same as popup menu)
/stp [token.halo="Orange"]
Custom Color
/stp [token.halo="#FEABDD"]
No Halo
/stp [token_halo="None"]
And thankfully the code in the popup menu checks the color against its
list to see which item
should be checked so I didn't have to change anything to make sure its
syncrhonized :)
You cant query halos i.e [A = token_halo] as I cant see any area where
this would be useful


Setting a state
/stp [state.Dead="true"]
or
/stp [state.Dead=1]

So you could have a macro like this (it works but its a bit ugly)
/stp [HP = HP - Damage] [ state.Dead = max(0, min(1, HP)) *-1 + 1 ]
Which takes damage away from HP and if HP reaches 0 or less sets the
Dead state to true.

States can be queried [val = state.Dead], and return either 1 or 0
Dreaming of a 1.3 release

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

NOTE:

Just found a bug in the token halo colorizing code, a patch from giliath to the parser isn't meshing with the set token property code. We'll get that fixed for b36
Dreaming of a 1.3 release

User avatar
thelevitator
Dragon
Posts: 963
Joined: Wed May 17, 2006 2:10 pm
Location: "The Biggest Little City In The World!"
Contact:

Post by thelevitator »

How do you add color to the lighting? I tried following the format, but the OK button doesn't work, nor does the Export in order to save. The only thing I could do was either close out the window by clicking the X or hit the cancel button.
"Neither hexes nor squares can confine me!"

James Anthony
"It's all in your head....."
http://www.spelz.net

User avatar
thelevitator
Dragon
Posts: 963
Joined: Wed May 17, 2006 2:10 pm
Location: "The Biggest Little City In The World!"
Contact:

Post by thelevitator »

I forgot to mention that using color on the D20 lights works, but trying to add it to the generic lights is where I had the problem.
"Neither hexes nor squares can confine me!"

James Anthony
"It's all in your head....."
http://www.spelz.net

User avatar
thelevitator
Dragon
Posts: 963
Joined: Wed May 17, 2006 2:10 pm
Location: "The Biggest Little City In The World!"
Contact:

Post by thelevitator »

I think I found the problem; no space between the range and the hex color. My code-fu is still very weak. :oops:
"Neither hexes nor squares can confine me!"

James Anthony
"It's all in your head....."
http://www.spelz.net

User avatar
thelevitator
Dragon
Posts: 963
Joined: Wed May 17, 2006 2:10 pm
Location: "The Biggest Little City In The World!"
Contact:

Post by thelevitator »

Now that I have it working, it seems like overlapping light sources aren't working properly.
"Neither hexes nor squares can confine me!"

James Anthony
"It's all in your head....."
http://www.spelz.net

User avatar
kat2cute
Dragon
Posts: 297
Joined: Wed Jan 30, 2008 3:46 pm

Post by kat2cute »

Fun new release.

Found a bug with the campaign properties. It won't let you save over an old campaign property file. It gives this error:

Could not save properties: java.util.zip.Zipexception. Error in opening Zip file

I was trying to save over an older property file version (b32) of Maptool, so this is probably why it didn't work. It worked when I saved it under a different filename.
Quote from an underwater D&D fight:
Alright fighter, it's your turn. What do you do?
Fighter: What do you think I do? I FAIL MY F**KING SWIM CHECK

Korpus
Kobold
Posts: 13
Joined: Mon Jun 23, 2008 11:02 am

Post by Korpus »

To help those with the new Light settings:

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

User avatar
wrathchild
Dragon
Posts: 546
Joined: Thu May 24, 2007 9:44 am
Location: Copenhagen, Denmark
Contact:

Post by wrathchild »

Did conic sight make it in? If so, how does it work?

The other stuff seems to work nicely so far. /stp is going to SO rock!
Entering the Digital Age of Roleplaying.
Part of the Resident GURPS Lobby.
Calling for Halos to be Hexified.

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

Post by UntoldGlory »

Very exciting build! I'm so tempted to download it at work, but I'd like to keep my job I think...


Couple Questions:
trevor wrote: So you could have a macro like this (it works but its a bit ugly)
/stp [HP = HP - Damage] [ state.Dead = max(0, min(1, HP)) *-1 + 1 ]
Which takes damage away from HP and if HP reaches 0 or less sets the
Dead state to true.
I have been afflicted by "the dumb". Why do you need the "*-1 + 1 " part? Should just the "max(0, min(1, HP)) " return either 0 (if HP are negative) or 1 (if HP are positive)? What's the extra tag on bit for?
trevor wrote:States can be queried [val = state.Dead], and return either 1 or 0
Having trouble thinking of how this would be useful without some form of if/then dealie. Anybody have any examples?

Thanks for answering my "How do set multiple Token properties on the same line?" question before I asked it! To clarify though, if making a token macro, can it look like this and still function?

/stp You gain [SurgeValue] HP! <br> [HP = HP + SurgeValue] [SurgesRemaining = SurgesRemaining - 1]

Or can only /stp commands go in there?

User avatar
torstan
Great Wyrm
Posts: 1887
Joined: Wed Sep 27, 2006 6:50 am
Contact:

Post by torstan »

The *-1 +1 is needed to set the state accurately. In your version you get 0 if the creature is on 0hp or less and 1 if it is on more than 0hp. Now 0 sets the Dead state to False, and 1 sets the dead state to true. Therefore your version kills a creature if it is on positive hp and says they are alive if they are on negative hp!

The output of your macro works fine when appended by the *(-1)+1 term. This takes the output and changes 1 (the result of positive hp), multiplies it by -1 to give -1, and then adds 1 to give 0=false. In contrast 0 gets multiplied by -1 to give 0 and then has 1 added, to give 1=true. This gives the correct output for dead/alive based on hp values.

Obviously it needs to be altered for situations where people are allowed to be on -ve hp.

As for the multiline macro, I'd expect that the /stp statement should go immediately after the <br> statement. That should fire fine (but I cannot check as I am also at work).

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

Post by Craig »

UntoldGlory wrote:
Couple Questions:
trevor wrote: So you could have a macro like this (it works but its a bit ugly)
/stp [HP = HP - Damage] [ state.Dead = max(0, min(1, HP)) *-1 + 1 ]
Which takes damage away from HP and if HP reaches 0 or less sets the
Dead state to true.
I have been afflicted by "the dumb". Why do you need the "*-1 + 1 " part? Should just the "max(0, min(1, HP)) " return either 0 (if HP are negative) or 1 (if HP are positive)? What's the extra tag on bit for?
You are correct that max(0, min(1, HP)) will return 0 if HP are negative or 0 and 1 otherwise. Unfortunately this is the opposite of what you want since the state is set with a 1 and reset with a 0 and you want to set it if HP are 0 or less. So multiplying by -1 and adding 1 will give you what you want.
(0 * -1 + 1 = 1)
(1 * -1 + 1 = 0)




UntoldGlory wrote:
trevor wrote:States can be queried [val = state.Dead], and return either 1 or 0
Having trouble thinking of how this would be useful without some form of if/then dealie. Anybody have any examples?
Yes if/then would be more useful but we had to start some where (comparisons would mean quite a change to the parser), saying that the numbers 1 and 0 are very handy, it allows you to multiply the token state by a modifier and you get that modifier if the state is on or 0 if it is off, for example if you had a state called CombatAdvantage you could do something like
[CombatAdv = state.CombatAdvantage * 2] Attack Roll [1d20 + AttBonus + CombatAdv]
That is a pretty simplistic example but you get the idea.
I am sure not everyone will use it but there was a thread a few days ago I can't seem to find at the moment about allowing token states to affect properties, while this doesn't allow that to occur automatically it does give a workable way to do what they wanted.

Also two mutually exclusive states. Say for example you were playing 4e and you decided bloodied and dying states would cause too much clutter if both were there. Assuming you have set bloodied and Dying states earlier in the macro based on HP at the end you could do
[ state.Bloodied = state.Bloodied * (state.Dying * -1 + 1) ]

UntoldGlory wrote: Thanks for answering my "How do set multiple Token properties on the same line?" question before I asked it! To clarify though, if making a token macro, can it look like this and still function?

/stp You gain [SurgeValue] HP! <br> [HP = HP + SurgeValue] [SurgesRemaining = SurgesRemaining - 1]

Or can only /stp commands go in there?
If you use /stp output is discarded (otherwise using /stp for many tokens would produce a horrid wall of text).

If you use them inside a token macro you will get the output although if your macros are large the expansion will cause loss of sanity points :) You can hide any parts you want in a span with a font size of 0.

Hope this helps

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

Post by Craig »

torstan wrote: As for the multiline macro, I'd expect that the /stp statement should go immediately after the <br> statement. That should fire fine (but I cannot check as I am also at work).
There was a change done so setting properties works in token macros, for this no /stp command is needed.

For token macros you can just put [HP = HP -1] anywhere you would normally put a dice roll.

If you want to write a macro that does not belong to a token but can operate on a selected token (or tokens) use /stp.

A case where you may want to use /stp is where you have "template" macros. Say you have a token with the properties MaxHP, Gold, and Strength are all die rolls and you want to be able to drag out many of these as you need them.
If the properties were the following
HaxHP -> 2d6
Gold -> 2d10
Strength -> 3d6
(notice the lack of [] around the rolls)
You could make a button macro with the following
/stp [MaxHP = MaxHP][Gold = Gold][Strength = Strength]

And you could drag out many of these tokens select them all and run that macro to fill in the values. Although the above is a contrived example it is still useful for impromptu monster on NPC parties.

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Post by DevoDog »

Any suggestions for calculating a characters current HP after a Healing Surge (4e)?

I'm struggling with making sure a characters's current HP doesn't exceed their max HP after a surge.

Post Reply

Return to “Announcements”