Can you Use ceil(n) like this

[#{ceil(1d100+{fmod})} 2f]
So its a D100 table with positive and negative modifiers , but if the number goes below 1 ceil will change that to a 1?
any help appreciated

Comments

  • ceil(n) rounds up to an integer, but 0, -1, -2, etc are perfectly valid integers. It would only round up to 1 if the value was greater than 0 but less than 1.

    What you want is max() like this:

    ``{max(1,{1d100}+{fmod})}

    It will result in your calculated value, or 1 if your calculated value is less than that.

Leave a Comment