PDA

View Full Version : [Classic] Rolling more than one dice



Maspalio
December 6th, 2020, 13:07
Hello,

I'm trying to modify very simply the 3.5E Ruleset to change the dice rolled for AbilityAction, having read Trenloe's explanations. At first sight, it works fine and rolls a d6 instead of a d20 :



function getRoll(rActor, sAbilityStat)
local rRoll = {};
rRoll.sType = "ability";
rRoll.aDice = { "d6" };
rRoll.nMod = ActorManager2.getAbilityBonus(rActor, sAbilityStat);

rRoll.sDesc = "[ABILITY]";
rRoll.sDesc = rRoll.sDesc .. " " .. StringManager.capitalize(sAbilityStat);
rRoll.sDesc = rRoll.sDesc .. " check";

return rRoll;
end


Now, how would you tell it to roll two d6 and not just one?
I've tried different syntaxes but nothing works. (2d6, d6+d6, ...)
Any help would be greatly appreciated.

Kelrugem
December 15th, 2020, 03:58
Hello,

I'm trying to modify very simply the 3.5E Ruleset to change the dice rolled for AbilityAction, having read Trenloe's explanations. At first sight, it works fine and rolls a d6 instead of a d20 :



function getRoll(rActor, sAbilityStat)
local rRoll = {};
rRoll.sType = "ability";
rRoll.aDice = { "d6" };
rRoll.nMod = ActorManager2.getAbilityBonus(rActor, sAbilityStat);

rRoll.sDesc = "[ABILITY]";
rRoll.sDesc = rRoll.sDesc .. " " .. StringManager.capitalize(sAbilityStat);
rRoll.sDesc = rRoll.sDesc .. " check";

return rRoll;
end


Now, how would you tell it to roll two d6 and not just one?
I've tried different syntaxes but nothing works. (2d6, d6+d6, ...)
Any help would be greatly appreciated.

Did you try "d6", "d6" instead? :) Though I wonder why "2d6" didn't work for you, but I didn't test yet :)

Sorry for the late answer, it may be better to ask such questions in the workshop :) Not sure how many just follow the armory (not speaking about its subthreads) :)

Moon Wizard
December 15th, 2020, 05:56
That's because FGC only accepts dice as individual die entries (i.e. { "d6", "d6" }). FGU will accept "expr = 'XdX'" within the die table; but accepts individual entries as well for backward compatibility.

Regards,
JPG

Kelrugem
December 15th, 2020, 05:59
That's because FGC only accepts dice as individual die entries (i.e. { "d6", "d6" }). FGU will accept "expr = 'XdX'" within the die table; but accepts individual entries as well for backward compatibility.

Regards,
JPG

Aah, thanks for the clarification :)

Maspalio
December 15th, 2020, 19:28
Did you try "d6", "d6" instead? :)

Thanks a lot, it works!