Macro code.

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
Chaos Marine
Kobold
Posts: 4
Joined: Fri Mar 13, 2015 5:44 pm

Macro code.

Post by Chaos Marine »

I'm trying to make a macro for damage bonus roll, so I can choose how many D6 are rolled in the macro. This is for Savagelands, so if I roll and get a raise, I can add 1d6 to the damage, if I get two raises, I can roll 2d6 etc. Thanks in advance.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Macro code.

Post by Jagged »

I don't think you need to create a macro for that, I think it may be covered by simple dice expressions Dice_Expressions

Look at the "explode" and "exploding success" options.

Chaos Marine
Kobold
Posts: 4
Joined: Fri Mar 13, 2015 5:44 pm

Re: Macro code.

Post by Chaos Marine »

I already know about exploding die. It's more like I want to click a macro, then have a window pop up asking me how many D6 I want to roll.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Macro code.

Post by aliasmask »

The super simple way is like this:

Code: Select all

[H: abort(input("numDice|1,2,3,4,5,6,7,8,9,10|Dice to Roll|radio|orient=H span=true value=string"))]
[R: eval(strformat("%{numDice}d6e"))]
But it doesn't give you much feed back. If you want to see the individual die rolls you'll need to have a loop and save each roll in to an array.

Chaos Marine
Kobold
Posts: 4
Joined: Fri Mar 13, 2015 5:44 pm

Re: Macro code.

Post by Chaos Marine »

Thank you very much for that. =D

Post Reply

Return to “MapTool”