Log in

View Full Version : action manager in the 4 e ruleset and right click die adding



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?

Moon Wizard
September 26th, 2013, 23:04
It looks like some portion of the current ActionsManager code actually resets the roll at some point. Probably in the mod handler or result handler.

In the rebuild of the ActionsManager for FG v3.0 using the rulesets layered on top of the CoreRPG ruleset, I just tested and it keeps the extra dice.

Cheers,
JPG

meathome
September 27th, 2013, 01:07
Thank you I am trying to find where, but no luck so far. So for now I am doing something else, maybe tomorrow I'll have more luck with this. I ran into some other questions with anchoring and dynamically creating controls. Ill post in a new thread about it.