MapTool 1.3 Development Build 38

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

Post Reply
User avatar
Brigand
Read-only User
Posts: 1623
Joined: Thu Feb 14, 2008 8:57 am
Location: Nosy GM's can go frak themselves!

Post by Brigand »

Hawke wrote:
Aria wrote:Actually, I can write that in javascript as well. It's part of how I created my HTML character sheet for 4th edition:
http://www.ariagames.net/characters/aria.html
Jeez, now you just needa setup a generator so we can create our own versions and I'll use nothing but your charsheet! ;)
Actually, I'm slowly teaching myself how to better combine javascript and css to create a really neat sheet that will create movable "windows" when you click on a power.

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

Post by UntoldGlory »

Aria that's an awesome character sheet. Me want-e. I might point out though that at least on my screen, the "show all" is the same color as my windows default background, and therefor invisible.

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

Post by hennebeck »

Ok, I can load campaigns again.
I just closed and restarted. Still a bug. Just not a big one.

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

With all these conditional in the parser (my eyes crossed and grey stuff started leaking out of my ears after the second post on the code), is there any way to use it to call a property before the die roller

I know the answer is probably no, but as I understand none of it, I thought I would ask.

I think this in on Giliaths list somewhere, but if this can provide it as an aside, it might help create some time for other projects.
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

User avatar
Mathemagician
Dragon
Posts: 666
Joined: Tue May 22, 2007 2:27 pm

Post by Mathemagician »

Cweord wrote:With all these conditional in the parser (my eyes crossed and grey stuff started leaking out of my ears after the second post on the code), is there any way to use it to call a property before the die roller

I know the answer is probably no, but as I understand none of it, I thought I would ask.

I think this in on Giliaths list somewhere, but if this can provide it as an aside, it might help create some time for other projects.
I'm not sure I fully understand what you want... can you provide an example of the syntax you want to use, or what effect you want to achieve?

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

What I am after, and would be useful for all dice pool systems is a way to call a property before the d (or the sr4 in my case) so I could have Strengthd6

I can do 5d6_strength, but you cant have it the other side of the d

I know it's something complex in the parser, Giliath has said as much - I just wondered if any of these functions might provide a way round it.
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

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

Post by Craig »

Cweord wrote:What I am after, and would be useful for all dice pool systems is a way to call a property before the d (or the sr4 in my case) so I could have Strengthd6

I can do 5d6_strength, but you cant have it the other side of the d

I know it's something complex in the parser, Giliath has said as much - I just wondered if any of these functions might provide a way round it.
The only way I can think of currently doing this is using eval

Code: Select all

[ eval(strength + "d" + "6")]
« eval(strength+ "d" + 6) = eval(6 + "d" + 6) = 19 »
Not pretty but it works. Note you have to do strength + "d" + 6, if you tried to do strength + "d6" the dice roller would pick up the d6 first so it would never work properly.

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

not quite what I am after, I need strength to specify the number of d6 rolled, rather and just put a number in front
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

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

Post by Craig »

Cweord wrote:not quite what I am after, I need strength to specify the number of d6 rolled, rather and just put a number in front
Not sure what you mean sorry, how about a more detailed example and I will see what I can do.

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

Post by hennebeck »

Strength = 6
He wants it to roll 6d6.

If the Strength = 3
He wants it to roll 3d6.

Or if you are way buffed up and you use Karma, you may have a chance to roll ((Strength = 6) + (Karma = 4)) or 10d6

User avatar
Mathemagician
Dragon
Posts: 666
Joined: Tue May 22, 2007 2:27 pm

Post by Mathemagician »

Cweord wrote:not quite what I am after, I need strength to specify the number of d6 rolled, rather and just put a number in front
But that's exactly what Craig gave you.. isn't it?

Cweord
Great Wyrm
Posts: 1343
Joined: Sun Aug 12, 2007 10:49 am
Location: Midsomer Norton, (Near Bath), UK
Contact:

Post by Cweord »

It might be if it will work with the SR4 code

with Shadorun and World Of Darkness it's the number on each dice that counts - I don't know a lot about code - so couldn't tell reading the code, and didn't have a copy on hand.

I was more questioning (badly I will admit) weather it will work with the SR4 mechanism

6SR4 = 2, 5, 3, 6, 4, 6 (3 hits)

that is what the SR4 code puts out, with the number of hits being the number of dice that roll over 5

there are other things, but that is the crux of it

I'll try it as soon as I get a chance
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cw ... er_Tokens/

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Post by RPTroll »

Ok you Savages, this seems to work for a Fighting attack in Savage Worlds. I html commented the values used in the equations but they show up in a chat export if I need to check them. I can also uncomment for debugging. I put some additional carriage returns in there for ease of reading.

Code: Select all

<!--ToHitTarget {TargetNumber=4}
Fatigue {Fat=Fatigue} 
Wounds {Wnd=Wounds} 
Fight {R=Fighting} 
Wild {W=d6e} 
Miss {Miss=if(R<2,1,0)} 
Crit {CritMiss=if(R<2&&W<2>TargetNumber+4,MeleeDamage+d6e,MeleeDamage)}
Hit {Rhit=if(Roll>=TargetNumber,1,0)}-->
{if(CritMiss,' Critically ','')} 
{if(Rhit,' <font>Hits</font> ',' Misses ')} 
{if(Roll>TargetNumber+4,' with a <b>raise</b> ','')} 
on a roll of {Roll} 
{if(Rhit,' for <font>' + Damage + ' damage </font>','')}
It gives the following output

Adelmar the Large: Hits with a raise on a roll of 15 for 13 damage

Adelmar the Large: Hits on a roll of 5 for 9 damage

Adelmar the Large: Critically Misses on a roll of 1

Adelmar the Large: Misses on a roll of 3

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

Post by jfrazierjr »

Cweord wrote:It might be if it will work with the SR4 code

with Shadorun and World Of Darkness it's the number on each dice that counts - I don't know a lot about code - so couldn't tell reading the code, and didn't have a copy on hand.

I was more questioning (badly I will admit) weather it will work with the SR4 mechanism

6SR4 = 2, 5, 3, 6, 4, 6 (3 hits)

that is what the SR4 code puts out, with the number of hits being the number of dice that roll over 5

there are other things, but that is the crux of it

I'll try it as soon as I get a chance

Umm I had no problem doing THIS:

Joe.Frazier:
« eval(Prop +Prop2 + "SR4") = eval(5 + 0 + "SR4") = Hits: 1 Ones: 3 *Glitch* Results: 4 1 1 1 5 »
Joe.Frazier:
« eval(Prop +Prop2 + "SR4") = eval(5 + 4 + "SR4") = Hits: 3 Ones: 2 Results: 1 3 5 4 3 1 5 6 2 »
Joe.Frazier:
« eval(Prop +Prop2 + "SR4") = eval(5 + 5 + "SR4") = Hits: 5 Ones: 1 Results: 4 1 6 6 6 5 2 5 4 4 »

each time, I was prompted for Prop and Prop2 and entered different numbers for Prop2 each time (to simulate Karma??) and had 5 represent Strength as in your example. Each time, it rolled the appropriate number of d6 dice and counted the hits and as you see, I even got a glitch!

Is that not what you want? Here is the code used:

[eval(Prop +Prop2 + "SR4")]

You should be able to swap out Prop and/or Prop2 for whatever toke properties you want...
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..

salmelo
Giant
Posts: 210
Joined: Fri May 23, 2008 10:23 pm

Post by salmelo »

so, looking at all this SR4 stuff with eval, i can't help but think I could use eval to fix one of my little problems, but i'm not sure i'm doing it right, what is the syntax on this command, and what exactly does it do?

Post Reply

Return to “Announcements”