[phpBB Debug] PHP Warning: in file [ROOT]/ext/spaceace/ajaxchat/controller/chat.php on line 220: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
The Unseen Servant forums • Dice roller functionality... subtraction?
Page 1 of 1

Dice roller functionality... subtraction?

Posted: Tue Nov 28, 2017 12:35 am
by drpete
Ok, so by preference, I like to set up attack macros so they spit out the AC you hit. Like if your THAC0 is 10, roll [1d20-10] to get the AC you hit.

This works fine for ascending AC, but I can seem to do it for descending AC... if thac0 is 19, I can't do [19-1d20].

I also see that I can do [2d6k1] to select the higher of 2 d6 rolls, but there's no macro command to select the lower die roll. I thought about [7-2d6k1] but ran into the first problem I mentioned.

Now, don't get me wrong, I can totally work around this, but wonder if it's an easy thing to add, or if I'm missing a trick?

Eta: Kicking it around a bit, I see I can do one operation... add or subtrace a constant, or multiply by a constant. What I was looking for could be done by allowing multiple modifiers, muliply, then add, for example, but this gives an error.

Re: Dice roller functionality... subtraction?

Posted: Tue Nov 28, 2017 12:58 am
by ToniXX
drpete wrote:This works fine for ascending AC, but I can seem to do it for descending AC... if thac0 is 19, I can't do [19-1d20].
Doing this is going to be tough because the system is based on the 'XdY (1d20)' part being first in an expression.
drpete wrote:I also see that I can do [2d6k1] to select the higher of 2 d6 rolls, but there's no macro command to select the lower die roll.
Where would you use such functionality?

I could probably implement this. The command would have to be represented by a letter other than the ones in use: c, k, r, and s. And if I were to try to implement it, what letter for the command would be appropriate?

Re: Dice roller functionality... subtraction?

Posted: Tue Nov 28, 2017 1:27 am
by drpete
I see what you mean with the expression, I think. I guess I would be 100% satisfied if you could both add AND multiply, instead of only one. Even if it was in a strict order like [1d20x-1+20] (pass the string to an interpreter that strips off a modifier, then passes it back through the interpreter again, or something...)

The lowest N dice thing came up in trying to implement macros for weapon damage in Blueholme... Light weapons are lowest of 2d6, normal weapons are d6, heavy weapons are highest of 2d6. Two of those were easy. It would also be what you'd use for a 5e "disadvantage" mechanic.

As far as what letter, at first I thought the inverse of "k", but that would be "d" I guess, so maybe "l" for lowest? If it's a huge pain, it's easy enough to work around.

Re: Dice roller functionality... subtraction?

Posted: Thu May 30, 2019 1:30 am
by savoylen
Did this get implemented? This would solve me Alternity-style roll question I posted earlier.
If I could roll 1d20 - (or +) 1d6 (or some other dice roll)