Warhammer FRP Macro Questions

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
ScarSacul
Kobold
Posts: 2
Joined: Mon Sep 22, 2008 4:56 am

Warhammer FRP Macro Questions

Post by ScarSacul »

Hey guys!

First of all: Great job you're doing here! :)

I tyied to create some macros (maptool 1.3.b43) for my Warhammer Fantasy Roleplay Group last weekend. But there are some (sincerly noobish) problems I can't get along with.

:!: First Problem:
In Warhammer rules you make a 1d100 Attack Roll. This Roll in reverse is used to show HitLocation (Head, right Arm, left Arm, Body, right Leg, left Leg) of this Attack) at the same time.

Example:
Attack: Roll 1d100 = 32
HitLocation: 23 (-> right Arm)

:?: Question 1:
Can you show me, how to reverse a diceroll?


:!: Second Problem:
Warhammer uses different HitLocation Tables (f.e. Humans, Birds, Animals). I created a couple of HitLocation Tables (I build them in reverse because of first problem). If I use them on different macro buttons, they run like this examples:

Code: Select all

[x=(1d100)] [tbl("HitLocationHumans",x)]
or

Code: Select all

[x=(1d100)] [tbl("HitLocationBirds",x)]
But I want to do this in only one macro, with a selection window like this:

Code: Select all

[H: input("HitLocation | Humans , Birds , Animals | Choose Enemy | List | select=0")]
:?: Question 2:
Can you show me, how I can combine my HitLocation selection window with the HitLocation macros?


May the Dice be with you! 8)
“For a long time I was embarrassed to say I was a 'B' movie actor, ... But now that I see what Hollywood's putting out, I realized 'B' actually means better.” -- Bruce Campbell

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Post by PyroMancer2k »

Actually the flip X is more of a mathematical problem. Anyhow I don't think there is a command to flip them but here is an equation that does it for you.

Code: Select all

[x=1d100]
[FlipX=(x-((floor(x/10))*10))*10+(floor(x/10))]
As for roll the tables off a selection box that is possible with some minor changes to the code you posted.

Code: Select all

[H: input("HitLocation | Humans , Birds , Animals | Choose Enemy | List | select=0, VALUE=STRING")]
[x=(1d100)] [tbl("HitLocation"+HitLocation,x)]

JoeNotCharles
Kobold
Posts: 14
Joined: Wed Sep 17, 2008 11:17 pm

Post by JoeNotCharles »

For the flip, I'd say it's clearer to roll each die separately.

[x=1d10]
[y=1d10]
[hit_roll=10*x+y]
[flipped=10*y+x]

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

Post by Orchard »

JoeNotCharles wrote:For the flip, I'd say it's clearer to roll each die separately.

[x=1d10]
[y=1d10]
[hit_roll=10*x+y]
[flipped=10*y+x]
That doesn't quite do what is needed...

With that, you could never roll some of the lower numbers...

even if you put in parentheses to get an order of operations even remotely resembling what I'm guessin you want, it's not appropriate. (eg, I'm guessing you meant to add the numbers first then mulitply...as written, rolling an 8 and a 1, the maptool should produce an 81, but I'm guessing you were expecting 90)*.

But either way, this isn't a good solution because if you roll two 1's, that still produces a 10*1=10; 10+1=11. That's your minimum roll under this method, whereas, with 1d100, you can roll a 01, reversed to be a 10 (I'm guessing here about the mechanic). Which is a very different thing. Stick with the formula given earlier--that's a more appropriate method, even though it's more complex computationally, it should produce a more accurate result.

*I can't check--at work.
0+0=1, for very unstable CPUs.

JoeNotCharles
Kobold
Posts: 14
Joined: Wed Sep 17, 2008 11:17 pm

Post by JoeNotCharles »

You're right, I forgot that you get numbers from 1 to 10 instead of 0 to 9. It should be

[x=1d10 - 1]
[y=1d10 - 1]
[hit_roll = 10*x+y]
[reversed = 10*y+x]

Which gives you numbers from 00 to 99. You'd need to add something else to convert 00 to 100.

I don't understand why you thought "x+y" should be done first before multiplying by 10. This is doing exactly the same thing you do when rolling two dice by hand.

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

Post by Orchard »

JoeNotCharles wrote:You're right, I forgot that you get numbers from 1 to 10 instead of 0 to 9. It should be

[x=1d10 - 1]
[y=1d10 - 1]
[hit_roll = 10*x+y]
[reversed = 10*y+x]

Which gives you numbers from 00 to 99. You'd need to add something else to convert 00 to 100.

I don't understand why you thought "x+y" should be done first before multiplying by 10. This is doing exactly the same thing you do when rolling two dice by hand.
Ah, you're right there....I see the effect you are going for. Which makes sense.
0+0=1, for very unstable CPUs.

User avatar
ScarSacul
Kobold
Posts: 2
Joined: Mon Sep 22, 2008 4:56 am

Post by ScarSacul »

You're so quick, thank you guys! :)

My finished macro:

Code: Select all

<!-- [x=1d10 - 1]
[y=1d10 - 1]-->
My Attack Roll:[hit_roll = 10*x + y]
[H: input("Hitzones | Human , Animal , Bird | Choose your Enemy | List | select=0, VALUE=STRING")]
<!--[z=(10*y + x)]--> 
Hitzone:[tbl("Hitzone"+Hitzones,z)]
Names of the Hitzone Tables I use

Code: Select all

HitzoneHuman 
HitzoneAnimal
HitzoneBird
Works perfectly for me! :D
“For a long time I was embarrassed to say I was a 'B' movie actor, ... But now that I see what Hollywood's putting out, I realized 'B' actually means better.” -- Bruce Campbell

JoeNotCharles
Kobold
Posts: 14
Joined: Wed Sep 17, 2008 11:17 pm

Post by JoeNotCharles »

Until you roll 00 and it counts as a hit instead of a miss - wait, I guess you're just printing the roll anyway, so the user knows that 0 means 100.

User avatar
Bengalelf
Dragon
Posts: 396
Joined: Tue Mar 18, 2008 3:07 pm

Post by Bengalelf »

ScarSacul
Have you posted your Campaign properties and macros anywhere? I was thinking of starting Warhammer campaign with Maptool. I would love to get your macros and campaign properties

User avatar
emirikol
Dragon
Posts: 708
Joined: Sun Jan 13, 2008 5:52 pm
Location: Lakewood, CO North America
Contact:

Post by emirikol »

BTW, guys I did 4 WFRP scenarios and you can download them at: http://gallery.rptools.net/v/contrib/emirikol7/

jh
Yes, I'm a chiropractor. Gamer fitness at Hafner Chiropractic in Lakewood, CO: http://www.HafnerChiropractic.com

Post Reply

Return to “MapTool”