meathome
September 26th, 2013, 22:52
Hi, I am still messing around with the 4E ruleset to create something for Iron kingdoms. I have modified the manager_action_skill.lua file for the basic rolls of the game (basically a 2d6 + modifier roll with an additional die added while shift is pressed for a non stacking +1 die bonus and an additional die drop lowest result when alt is pressed) these are in the modRoll function of the manager thingy... but I also need the ability to add additional dice a needed. I thought that the standard right click adds a die functionality would work, but it does not. When right clicking the additional dice are displayed while dragging them but the result is only those dice I explicitly added in the function, those added by right clicking are ignored.
the perform roll function looks like this:
function performRoll(draginfo, rActor,sType, sSkillName, nSkillMod, nTargetDC, bSecretRoll)
-- Build basic roll
local rRoll = {};
print(#draginfo.getDieList());
rRoll.aDice = { "d6","d6" };
rRoll.sDesc = "["..sType.."] " .. sSkillName;
rRoll.nMod = nSkillMod or 0;
if bSecretRoll then
rRoll.sDesc = "[GM] " .. rRoll.sDesc;
end
local rCustom = {};
if nTargetDC then
table.insert(rCustom, { nMod = nTargetDC } );
end
-- Perform roll
ActionsManager.performSingleRollAction(draginfo, rActor, "skill", rRoll, rCustom);
end
I assumed that those additional dice are in the draginfo. It seems that is not true. How can I read this functionality or even better maybe modify what happens when dragging a roll and pressing right click?
the perform roll function looks like this:
function performRoll(draginfo, rActor,sType, sSkillName, nSkillMod, nTargetDC, bSecretRoll)
-- Build basic roll
local rRoll = {};
print(#draginfo.getDieList());
rRoll.aDice = { "d6","d6" };
rRoll.sDesc = "["..sType.."] " .. sSkillName;
rRoll.nMod = nSkillMod or 0;
if bSecretRoll then
rRoll.sDesc = "[GM] " .. rRoll.sDesc;
end
local rCustom = {};
if nTargetDC then
table.insert(rCustom, { nMod = nTargetDC } );
end
-- Perform roll
ActionsManager.performSingleRollAction(draginfo, rActor, "skill", rRoll, rCustom);
end
I assumed that those additional dice are in the draginfo. It seems that is not true. How can I read this functionality or even better maybe modify what happens when dragging a roll and pressing right click?