Comm.throwDice() is a platform API, while slash handlers are typically handled in ruleset code (see previous post) so Comm.throwDice() can't call the /die slash handler.
No. Maybe I wasn't clear. My point was that the ruleset code for implementing slash handlers is implemented in LUA, and calls Comm.throwDice after building the table. As a platform API, the implementation of Comm.throwDice does not call back into LUA code.
I think Moon Wizard was suggesting that Comm.throwDice now has similar logic to the /die command, in that it checks what's in the dice variable, and if it finds an expression, it evaluates the expression before rolling. Not that it actually calls the /die command.
Is it possible that it's having a problem with the parenthesis being inside the string?
"expr = (2*3)d6" vs "expr = 2*3d6"
Although in the string without parenthesis, you'll probably get 3d6 rolled, and then the result doubled. You may have to put the math part separately, so that the math can be calculated before putting it into the string.
My current workaround is to do the math first and then send 6 instead of (2*3)
It does work with the ActionsManager method.
Quote:
Also, I updated the ActionsManager global script in CoreRPG used by many layered rulesets to pass through roll tables that do not specify individual dice
Ex:
local rRoll = { sType = "dice", sDesc = "COMPLEX ROLL", aDice = { expr = "4d6d2" }, nMod = 0 };
ActionsManager.performAction(nil, nil, rRoll);
I would just like to say a Great Big Huge Thank You! to Moon Wizard, damned, and psicodelix for this entire thread. This has allowed me to simplify my ruleset and make it much easier to code. Thanks Y'all!