MapTool 1.3 Development Build 41

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

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

Post by trevor »

hennebeck wrote:Another thought regarding the codes stuck in this thread, I personally don't think the announcement thread is the place for asking questions.
Just me and I'm not a moderator, but I think this thread should be for reporting bugs.
If you have a question about the build, I would suggest making the post in the MapTools forum and then it will be simple to find.
Good recommendation. But I won't tell if you don't tell :)
Dreaming of a 1.3 release

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Post by palmer »

BigO wrote:
palmer wrote:
Full Bleed wrote: I agree. I worked this out (with assistance) through a couple other threads and a PM or two and I think it's probably a fairly common effect that many users would like.

The trick is to give the developers some time and they'll get around to making stuff like this a little more accessible.
Next on the hit list - is there any way to do dice rolls inside of if() and still have the tooltip breakdown? Thusfar it doesn't seem to work, and I can't find any way of looking up the if() syntax with any reasonable chance of success.
I'm not sure what you mean. Can you provide an example?
4e Goblin Skullcleaver. d10+5 damage, or 2d10+5 if bloodied. I have:

Code: Select all

Damage: {if(state.Bloodied == 1, 2d10+5, 1d10+5)} damage.
Macro output will just spit out the result. It won't be highlighted, it has no tooltip, theres no way to actually see the die roll.

The result is accurate, certainly. Dozens of test runs proved that. I just have no way of actually seeing the die roll proper.

If I try square brackets, braces or evals, it just throws errors. Maybe eval is the trick, but I don't know how to properly format it in that case.

If I go

Code: Select all

Damage: {if(state.Bloodied == 1, "[2d10+5]", "1d10+5")} damage.
It returns the result to chat as literal string, unrolled.
I get either

Code: Select all

Damage: 1d10+5 damage.
or
Damage: [2d10+5] damage.
I'm not sure this could be considered a bug proper, but at least from my perspective it is undesired, and more importantly, unexpected behaviour.

Lindharin
Dragon
Posts: 668
Joined: Sat Apr 21, 2007 4:51 pm

Post by Lindharin »

It would be nice if you could nest [] inside {} or [], but I've never gotten that to work either.

There are several ways to accomplish what you are describing. If you want just a tool tip to show whether it rolled 1d10 or 2d10, you can use this:

Code: Select all

Damage: [eval(if(state.Bloodied == 1, "2d10+5", "1d10+5"))] damage.
If you want to actually see the dice rolls, then you have to try something more complicated like:

Code: Select all

[h: DieRoll1=1d10]
[h: DieRoll2=1d10]
[h: DamRoll=if(state.Bloodied == 1, DieRoll1+"+"+5, DieRoll1+"+"+DieRoll2+"+"+5)]
Damage: [eval(DamRoll)] damage.
or if you want "prettier" tooltips without the eval() stuff, you could do build your own tool tip like this:

Code: Select all

[h: DieRoll1=1d10]
[h: DieRoll2=1d10]
[h: DamRoll=if(state.Bloodied == 1, DieRoll1+"+"+DieRoll2+"+"+5, DieRoll1+"+"+5)]
Damage: <span class=roll title="{DamRoll}={eval(DamRoll)}">{eval(DamRoll)} damage.

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

Post by jfrazierjr »

Lindharin wrote:It would be nice if you could nest [] inside {} or [], but I've never gotten that to work either.

There are several ways to accomplish what you are describing. If you want just a tool tip to show whether it rolled 1d10 or 2d10, you can use this:

Code: Select all

Damage: [eval(if(state.Bloodied == 1, "2d10+5", "1d10+5"))] damage.
If you want to actually see the dice rolls, then you have to try something more complicated like:

Code: Select all

[h: DieRoll1=1d10]
[h: DieRoll2=1d10]
[h: DamRoll=if(state.Bloodied == 1, DieRoll1+"+"+5, DieRoll1+"+"+DieRoll2+"+"+5)]
Damage: [eval(DamRoll)] damage.
or if you want "prettier" tooltips without the eval() stuff, you could do build your own tool tip like this:

Code: Select all

[h: DieRoll1=1d10]
[h: DieRoll2=1d10]
[h: DamRoll=if(state.Bloodied == 1, DieRoll1+"+"+DieRoll2+"+"+5, DieRoll1+"+"+5)]
Damage: <span>{eval(DamRoll)} damage.
Yep... using all my rolls inside an html title tag is one way I am getting around all that silliness, hopefully, MrPokeLope will have the formatting fixed in b42.
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..

Lindharin
Dragon
Posts: 668
Joined: Sat Apr 21, 2007 4:51 pm

Post by Lindharin »

jfrazierjr wrote:Yep... using all my rolls inside an html title tag is one way I am getting around all that silliness
What do you mean by that? Could you give an example?

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

Post by jfrazierjr »

Lindharin wrote:
jfrazierjr wrote:Yep... using all my rolls inside an html title tag is one way I am getting around all that silliness
What do you mean by that? Could you give an example?
Pretty much just like you did in your very last line of your last example...Hopefully, with the fix MrPokeylope is putting in, it will now work correctly.
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..

Post Reply

Return to “Announcements”