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

Looking for assistance with creating a roll macro for a custom character sheet!

January 26 (2 weeks ago)

Hi,

I'm currently building a character sheet from scratch for a homebrewed system I'm writing. Everything has been fine so far, been able to work out all that I need to via guides or reading other threads easily enough... however there is one macro I simply cannot find an answer for.

Essentially the average roll requires rolling a D10. If you roll equal to or underneath the level of your skill, you succeed. If over, you fail. However, there can be difficulty modifiers to said rolls - one which allows you to roll under the skill x2, and one which makes success only possible when rolling equal to or less than your skill number halved (rounded up).

My question is, how on earth would I do this? I've tried a few different combinations with no luck. Current roll macro is [[d10cf10cs<@{attribute/skill]], where i've used the critical hit and miss macros to signify a success or failure on the roll. What would I have to add to:

1). Prompt whether a player wants to roll a 'simple', 'normal', or 'impossible' check


2). Have the roll actually check itself against half or double the number in question if the other options are chosen.


I appreciate your time reading, and I hope I worded it all correctly!

January 26 (2 weeks ago)

Edited January 26 (2 weeks ago)
Gauss
Forum Champion

Hi Cynrain, 

So to clarify some things: 
You roll a d10. 
If it is <= to a value it is a success, > the value it is a failure. 

Does simple mean the attribute is doubled? 
Does normal mean the attribute is not modified? 
Does Impossible mean the attribute is halved? 

If the answer to those three questions is "yes" then the following should work: 
[[d10cf10cs<[[floor(@{attribute}*?{Difficulty|Normal,1|Simple,2|Impossible,0.5})]]]]

January 26 (2 weeks ago)

Edited January 26 (2 weeks ago)

Hi,

That is exactly how it works, and the macro does what I hoped it would do, thank you so much! Is there any way for odd numbers to be rounded up when halved?

January 26 (2 weeks ago)

Edited January 26 (2 weeks ago)

Certainly, Gauss set it up to round down, but if you replace "floor" in that roll with "ceil", it'll round up instead.

EDIT: To elaborate, ceil(X) rounds X up, and floor(X) rounds X down, after X has resolved.

January 26 (2 weeks ago)

Thats incredible, thank you both so much :) I would have never have figured this out on my own, but now I see how its laid out it makes sense. Will make sure to keep notes!

January 26 (2 weeks ago)

Edited January 26 (2 weeks ago)
Gauss
Forum Champion

Oops, my bad. I normally round things down and forgot you wanted it rounded up. Sorry about that, thanks for the catch Tuo.