Wrath and Glory dice macro.

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
daxx367
Kobold
Posts: 4
Joined: Tue Oct 30, 2018 11:08 pm
Location: Brisbane, Australia

Wrath and Glory dice macro.

Post by daxx367 »

Hi all, I'm looking to write a macro for rolling dice for the new Warhammer 40k RPG Wrath and Glory.
The system is based on the Shadowrun dice pool system but with two major changes.
1. A roll of 4 - 5 is one success and the roll of a 6 is two successes.
2. There is a special dice that is always rolled and replaces one of the normal dice this is a 'wrath' dice.
This dice has a fail condition if a 1 is rolled and the same success conditions as above but if a 6 is rolled that needs to be announced.

My current issue is what is the best way to count these successes in a macro?

Thanks in advance.

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

Re: Wrath and Glory dice macro.

Post by aliasmask »

I'm guessing the special die is wrath (1) glory (6). The output would be something like the number of successes followed by one of those words if appropriate. I'll do you a favor and write the macro because it's super easy. Then you can modify it if you like from there.

Code: Select all

@@ @rollWGdice
<!-- rollWGdice(numDice): successes (wrath/glory)
   numDice - number of dice to be rolled. Sub one die for wrath die
   successes - output the number of successes along with the result of wrath die
   
-->
[H: numDice = arg(0)]

[H: results = "[]"]
[H: wrathDie = json.append(' <b color=red>(WRATH)</b>',"",' <b color=blue>(GLORY)</b>')]
[H: wrathOutput = ""]
[H: successes = 0]

[H, c(numDice), code: {
   [H: roll = 1d6]
   [H, if(roll.count == 0): wrathOutput = json.get(wrathDie,if(roll == 1,0,if(roll == 6,2,1)))]
   [H: results = json.append(results,roll)]
   [H: successes = successes + if(roll == 6,2,if(roll >= 4,1,0))]
}]

[R: strformat('<span title="%{results}">Successes: %{successes}%{wrathOutput}</span>')]

!!

daxx367
Kobold
Posts: 4
Joined: Tue Oct 30, 2018 11:08 pm
Location: Brisbane, Australia

Re: Wrath and Glory dice macro.

Post by daxx367 »

Thank you very much the 6 isn't glory, tbh I can't remember if they gave a 6 name, but close enough.

Edit:
Sorry would you mind explaining this a bit more?

Like does this need to be called by another macro.

Thanks.

daxx367
Kobold
Posts: 4
Joined: Tue Oct 30, 2018 11:08 pm
Location: Brisbane, Australia

Re: Wrath and Glory dice macro.

Post by daxx367 »

Ok so I have assumed that it requires the use of a wrapper macro and looked at this wiki http://lmwcs.com/rptools/wiki/Calling_macros

So I wrote the following, but it is just returning "Rolled for athletics"

Code: Select all

<!-- Will roll the labeled skill for the selected token -->

[h, macro("rollWGdice@campaign"): Athletics_Total]
Rolled [r: macro.return] for athletics
Any help is much appreciated.

Post Reply

Return to “Requests for HELLLLP!”