Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
Create a free account

Modifing macros with other macros?

Okay I'm running a shadowrun campaign and I'm trying to set up a macro for a skill roll that does the following. First it checks the skills of the character as such. /r (@{Agility} +@{Unarmed} +?{Modifier|0} )d6>5 Then I want to use another macro that does a math only function called #WoundPpenalty that does, /r (floor(@{Physical DMG} /3) + floor(@{Stun DMG} /3)) and subtract it from the number of D6 rolled as is standard with Shadowrun 4e wound modifiers. Anyone have a solution for this? Thanks in advance for looking at it.
Forum Champion
How do you want the two Macros interact?  - Gauss
I want the WoundPenalty to subtract from the number of dice rolled that is figured in the first macro. So @Agility = 4 and @Unarmed = 5 so total of 9 dice - the WoundPenalty of 3, it would then roll 6D6.

Edited 1376849585
Try this. Not sure it works, haven't tested /r [[@{Agility} +@{Unarmed} +?{Modifier|0} - floor(@{Physical DMG} /3) - floor(@{Stun DMG} /3)]]d6>5 That might do what you want it to do. Maybe. Honestly not quite sure why you want two macros for that.

Edited 1376850122
Forum Champion
Ok, I see what you are trying to do now.  If I understand correctly you want the following macro:  Macro body:  /r (@{Agility} +@{Unarmed} +?{Modifier|0} )d6>5 Query input:  #WoundPenalty Query output: (floor(@{Physical DMG} /3) + floor(@{Stun DMG} /3)) Total output: /r (@{Agility} +@{Unarmed} + (floor(@{Physical DMG} /3) + floor(@{Stun DMG} /3)) )d6>5 If this is correct then the answer is, you cannot put a macro into a query since the query will not recognize a macro. However, by turning the query into a switch (0 or 1) you can do this: New Macro body: /r [[@{Agility} +@{Unarmed} -?{Switch|0}*(floor(@{Physical DMG}/3)+floor(@{Sun DMG}/3))]]d6>5 The macro above will allow you to turn on/off the damage attributes. A "0" is off while a "1" is on.  - Gauss
Thanks for the prompt reply! This is a sweet setup, I just got the one year supporter subscription!!
Forum Champion
Is my suggested macro going to work for you? - Gauss
Sorry been real busy IRL and haven't had a chance to game, I know terrible. Yes your macro did work and we have also come up with some options of our own. Thanks for your help.
/r [[?{Dicepool|0}-(floor(@{Character_Name|PhysTrack} /3)+floor(@{Character_Name|StunTrack}/3))]]d6>5 This works flawlessly, thanks! Is there any way to tie it into the following formating: /em Character_Name gets [[roll]] hits for ?{Action} For some reason I keep failing at this.
Forum Champion
Nico, at this time you cannot put an inline roll inside another inline roll which means that you cannot put the above /roll you listed into an emote with an inline roll component. - Gauss
Ok, thanks again! /roll and /em separately will do, then.