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

Success/fail macro

1390573045

Edited 1390573132
SeanArcher
Marketplace Creator
Hi Fellow Roll20 Citizens This is for DnD 4th ed I'm trying to create a selected target apposed check macro Scenario Sneaky kobold has stealth + 9 and its trying to sneak up on a PC that has a Passive Perception of 18(tell me about it). Now as far as I understand it I use the PC's PPerc of 18 as the DC. I was hoping to simply use /gmroll {d20+9} >= @{selected|PPerc} The macro runs alright but it shows neither success or fail in the chat window. But if I remove the +9 it works as intended. Any pointers? May all your rolls be true Sean Archer
1390575801

Edited 1390576499
Hm... Just noting, you don't need the >= sign. > and < already work as Greater than or equal to and Less than or equal to, I believe, so just > should suffice.
Try taking out the spaces around the > sign: /gmroll {1d20+9}>@{selected|PPerc}
1390577419
Tom
Plus
Sheet Author
Hmmm...I think I see the problem. Try this: /gmroll [[d20+9]]>@{selected|PPerc} When you want to use a calculation, you have to put it inside double brackets, making it an inline roll (I think that's the right term, anyway). You can shorten it a bit more even by using /gr in place of /gmroll.
If you wanted to get a little fancier with it... You could create a Character Sheet for your Kobold (and any other NPC's) that contains its stealth skill as an Attribute. Link the token you're using to that sheet, and create a general Stealth Macro to do the stealth roll. This would let you click your NPC token and roll its stealth check Macro and target the PC you're hiding from: /gmroll [[1d20 + @{selected|stealth} ]]>@{Target|PPerc} You would be able to use that one macro for any NPC tokens you had linked to to character sheets that have a 'Stealth' attribute configured.
1390606087
SeanArcher
Marketplace Creator
Sarah A. said: Try taking out the spaces around the > sign: /gmroll {1d20+9}>@{selected|PPerc} I removed the spaces and that did the trick, thanks Sarah A :) Mark G. said: If you wanted to get a little fancier with it... You could create a Character Sheet for your Kobold (and any other NPC's) that contains its stealth skill as an Attribute. Link the token you're using to that sheet, and create a general Stealth Macro to do the stealth roll. This would let you click your NPC token and roll its stealth check Macro and target the PC you're hiding from: /gmroll [[1d20 + @{selected|stealth} ]]>@{Target|PPerc} You would be able to use that one macro for any NPC tokens you had linked to to character sheets that have a 'Stealth' attribute configured. Yep i'll be heading down that path Mark G I only had the +9 for testing, I try not to hard code variables when possible. Thanks for the heads up :) I feel sorry for my little kobold though, poor thing doesn't have a chance at sneaking up on that PC, even in the heat of battle :( Regards SeanA PS it doesn't show the total for the roll IE (9)+9 is the result, but i'm sure i'll nut it out :) at least its working! PPS Tom the [[ ]] seems to kill it.../gr LOVE IT always good to shorten pesky code :)