MapTool 1.3 Development Build 41

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 41

Post by trevor »

The "I'm finished with crunch time at work, I swear !" build

Build 41 (8/26/08)
* Fix bug: add in the token state functions (Contributed by Craig)

Contributed by mkarasek
* Remove ':' from /self (Contributed by mkarasek)
* [ ] Mouse over tooltips for full expression
* [P: ] - plain output. Does the same thing as { }. (long option: "plain")
* [E: ] - expanded output. Same as b40 [ ] rolls. ("expanded")
* [H: ] - the output is hidden completely. Replaces HTML comments for hiding calculations. ("hide", "hidden")
* [T: ] or [T(text): ] - tooltip output. Default behavior for [ ]. text is an optional string; if given, that string will be used as the output with the roll as its tooltip. ("tooltip")
* [C(n): ] or [C(n, sep): ] - execute the roll n times and display each result (for AoE attacks, for example). sep is an optional string used as a separator between each roll; defaults to ", ". The variable roll.count gives the index of the current roll (1 through n). ("count")

Contributed by giliath
* == and != for strings is case insensitive and ignores leading and trailing whitespace.
* Changed function and variable name resolution in the parser to case insensitive.

Contributed by Jay
* Fixed backwards compatibility bug in Init Panel.
* 'Add to Initiative' menu choice added to the token popup menu.
* Fixed multiple entries for the same token in the Init Panel
* Added a init panel specific popup menu to tokens in the Init Panel
* Added the ability for the GM to hide NPC tokens from the players.
* Fixed backwards compatibility problem with state opacity.
* Made init panel font smaller and reduced token images to text size when not showing states
* Halos show in init panel
* Added token.initHold variable and getter/setter functions for init hold (xxxInitiativeHold) and init value (xxxInitiative).
* Added functions to add/remove tokens from the init panel and sort or go to next initiative.
* Added ability for GM to allow owners of tokens to execute add/remove/next on their tokens only


NOTES
- Thanks to all who have helped test or contributed code. Fantastic !
- Please post bugs to this thread, all feature requests or tangent discussions should go into a new thread in the MapTool forum
- I have done very little testing, if someone finds something critical, post it here and I'll get a new build out with the fix
Dreaming of a 1.3 release

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

Post by Azhrei »

Woohoo! First Post!!

(Heh-heh, now it's time for bed. :))

User avatar
RedDog
Dragon
Posts: 393
Joined: Sat Jan 05, 2008 10:02 pm
Location: Clearwater, FL

Post by RedDog »

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.

knizia.fan
Giant
Posts: 197
Joined: Wed Jul 30, 2008 3:43 pm

Post by knizia.fan »

There's a bug with the new expression output. If a [] expression contains a line break, the output now is completely bare -- no highlight, no << >> quotes, no tooltip. Also, the equal sign is missing at the end.

If I write a macro with lots of variables and complex expressions, I need to be able to spread the expression over multiple lines to keep the macro readable, so this is a problem.

Example:
The HTML output for [1d20 + 3] and [e: 1d20+3] are

Code: Select all

<span class="roll" title="« 1d20 + 3 = 19 + 3 »"><font color="#000000">22</font></span>

<span><font color="#000000">«</font></span><span class="roll"><font color="blue"> 1d20 
            + 3 = 20 + 3 = 23 </font></span><span><font color="#000000">»</font></span>
But if I add a line break before the number 3,

Code: Select all

[1d20 +
 3]
the output for the normal and expanded rolls becomes

Code: Select all

<span><font color="#000000">&#30;1d20 + 3 = 9 + 3&#31;12&#30;</font></span>

<span><font color="#000000">&#30;1d20 + 3 = 6 + 3 = 9&#30;</font></span>
This is how it looks in the chat window.

Code: Select all

single line input
22
single line input, expanded option
« 1d20 + 3 = 20 + 3 = 23 »
multi line input
1d20 + 3 = 9 + 312
multi line input, expanded option
1d20 + 3 = 6 + 3 = 9
In b40, both single and multi line inputs result in output identical to the single line [e: 1d20 + 3] example above, i.e. no bug.

Note: If you quote this post, check the "Disable HTML in this post" option. Also, I had to munge the text to get the & and # characters to show up above. If you quote/copy this post, the forum software might still alter the HTML code anyway.

User avatar
Mr. Pokeylope
Giant
Posts: 118
Joined: Mon Aug 11, 2008 9:24 pm

Post by Mr. Pokeylope »

knizia.fan wrote:There's a bug with the new expression output. If a [] expression contains a line break, the output now is completely bare -- no highlight, no << >> quotes, no tooltip. Also, the equal sign is missing at the end.
Okay, I know why it's doing that and it's a simple fix. I'll send Trevor a patch for it.

User avatar
hennebeck
Dragon
Posts: 394
Joined: Sun Jun 01, 2008 12:06 am
Location: THe City of Roses

Post by hennebeck »

[T(text): 1d6 ]

I can't figure out what this one does?
It asks me for the value of "text" each time.

I would think it would be more useful if it always displayed "text" instead of asking me to define it every time.

Like you could make a macro for...
I [T(Damage): 1d8 +7] you.

And it would show...
I Damage you.

And hovering over Damage shows <<1d8>>

User avatar
hennebeck
Dragon
Posts: 394
Joined: Sun Jun 01, 2008 12:06 am
Location: THe City of Roses

Post by hennebeck »

[C(n, sep): ]


And for this one, I can't get "sep" to store in a Macro.

If I make a macro...
I fireball you all for [C(n, ..): 4d6].

I would expect to see...
I fireball you all for 7..21..16..4

But nothing I put in for "sep" works in a macro. Only as a variable that I have to input every time.

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

Post by Krattack »

hennebeck wrote:[T(text): 1d6 ]
Like you could make a macro for...
I [T(Damage): 1d8 +7] you.

And it would show...
I Damage you.

And hovering over Damage shows <<1d8>>
It expects a string so you should enclose the text in quotes, like:

Code: Select all

I [T("Damage"): 1d8 + 7] you.
Same with the separator in [C(n, sep): ], so

Code: Select all

I fireball you all for [C(n, ".."): 4d6]. 
works.

I actually like it this way, you can use a variable there if you want. Simple example:

Code: Select all

[H:roll = 1d20]
[H:Dam = 1d8 + 7]
if(roll>19,DType = "critically damage", DType = "damage")
I [T(Dtype): Dam] you.
darn, that macro fizzles with command: null error... well, you get the idea.

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

Re: MapTool 1.3 Development Build 41

Post by Full Bleed »

trevor wrote:Build 41 (8/26/08)
Can't wait till '09! ;)


Looks like a great build.

* 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?
* 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?

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

Re: MapTool 1.3 Development Build 41

Post by Orchard »

Full Bleed wrote:
trevor wrote:Build 41 (8/26/08)
Can't wait till '09! ;)


Looks like a great build.

* 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?
* 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?
Quoted For Truth

I need more details on some of this stuff.

Thanks.
0+0=1, for very unstable CPUs.

User avatar
hennebeck
Dragon
Posts: 394
Joined: Sun Jun 01, 2008 12:06 am
Location: THe City of Roses

Post by hennebeck »

darn, that macro fizzles with command: null error... well, you get the idea.
I appreciate your help.

But You can't leave me with broken code.
I am not a programer and only make any of my MT work by copying and pasting and begging for help around here.
So the code either has to work or it doesn't do me any good and I don't get the idea.

knizia.fan
Giant
Posts: 197
Joined: Wed Jul 30, 2008 3:43 pm

Post by knizia.fan »

Mr. Pokeylope, another issue for you to look at. Smileys are breaking the output.

Code: Select all

[s=2]....[x=s]
This produces a mess in the output. It's because the =s is being interpreted as a smiley, which inserts an <img> tag in the middle of the output. Build 40 also (annoyingly) puts a smiley in the output, but your new output code is more sensitive to garbage like that.

Similar problems occur for other smiley codes

Code: Select all

[x=s]
[x=p]
[x=D]
[x=(3+2)]
[x=o]
I can fix this by removing the single quotes from SmileyChatTranslationRuleGroup.java line 61, but I'm not sure if the HTML renderer will ever complain if the img src property is not enclosed in quotes.

I'll leave the fix for you to include in your patch to fix the newline problem. A more drastic solution is to eliminate the option for smileys like =s and only accept the colon versions like :s (in smileyMap.xml).

Also, there's a problem with the following statement (no smileys involved)

Code: Select all

[x = 'bob']
The output is breaking because of the single quotes. There's no problem if double quotes are used.




Hm, would it be possible to fix all these problems by replacing quotes with HTML character codes (i.e. ' for single quotes) when you create the tooltip text?

If I type this in chat

Code: Select all

<span title='This is a smiley <img src='smiley.png'> in the tooltip'>The text</span>
I get garbage. But if I type

Code: Select all

<span title='This is a smiley <img src='smiley.png'> in the tooltip'>The text</span>
the tooltip works fine.

Thanks,
--k.fan

User avatar
BigO
Dragon
Posts: 558
Joined: Mon Jul 28, 2008 12:23 pm
Location: Oshkosh, WI
Contact:

Post by BigO »

Woo Hoo! You all know what time it is:
Image
(and for those playing the drinking game, that's two drinks)
Last edited by BigO on Wed Aug 27, 2008 9:21 am, edited 1 time in total.
--O

I am a small and fragile flower.
http://maptool.rocks.andyousuck.com

knizia.fan
Giant
Posts: 197
Joined: Wed Jul 30, 2008 3:43 pm

Post by knizia.fan »

hennebeck wrote:
darn, that macro fizzles with command: null error... well, you get the idea.
I appreciate your help.

But You can't leave me with broken code.
I am not a programer and only make any of my MT work by copying and pasting and begging for help around here.
So the code either has to work or it doesn't do me any good and I don't get the idea.
Hi hennebeck, I think he was trying to do something like this

Code: Select all

[H: Roll = 1d20] 
[H: DamageValue = 1d8 + 7] 
[H: DamageType = if(Roll>19, "critically damage", "damage") ]
I [T(DamageType): DamageValue] you. 
This prints either I damage you or it prints I critically damage you, where the words "damage" or "critically damage" are highlighted and have a tooltip « DamageValue = 8 ».

If you have any questions or want examples of how to use the new features, just post and I or someone else will try to answer. Since people have expressed concern about announcement threads turning into endless discussions on tiny aspects of MapTool, why don't you post your questions in a new thread.

Thanks,
--k.fan

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

Post by Krattack »

knizia.fan wrote: Hi hennebeck, I think he was trying to do something like this

Code: Select all

[H: Roll = 1d20] 
[H: DamageValue = 1d8 + 7] 
[H: DamageType = if(Roll>19, "critically damage", "damage") ]
I [T(DamageType): DamageValue] you. 
This prints either I damage you or it prints I critically damage you, where the words "damage" or "critically damage" are highlighted and have a tooltip « DamageValue = 8 ».
That is exactly what I was trying to do, thank you!

Post Reply

Return to “Announcements”