PDA

View Full Version : Finding a script in D20_JPG



madman
February 16th, 2011, 19:15
when you drop dice on the token as a targeted attack, on a map.

the totals added to the modifier stack only apply to the first roll.

I would like to change this some how, it slows things down so much that i feel i need to change it.

so im learning LUA but it's going slow, so any help finding this script and changing it would help so much.

Thanks in advance.
Chris

Moon Wizard
February 16th, 2011, 21:38
madman,

You are closing in on one of the things that has been slowing down my 3.5E revamp. I am rebuilding the whole "action" system to allow me to lock modifiers until the "action" is completed. (whether that action is a single roll or a group of rolls (ala fullattack)).

The code that captures the drop to either the CT or a token linked in the CT is located in scripts/combattracker_common.lua.

You will need to build a locking mechanism into the ModifierStack object which is encapsulated in scripts/modifierstack.lua.

Hope that helps,
JPG

madman
February 17th, 2011, 03:29
well i guess if you are having trouble with it I won't make much progress.
thanks for the help Moon.

Chris

Sorcerer
February 17th, 2011, 22:24
the system that MW is talking about is actually already in place, but has just not been fully implemented.

look for the onFullAttackClassDrop function in combattacker_common.lua (should be around line 140)

if you insert the following line


ModifierStack.setLockCount(draginfo.getSlotCount() );

into the function as shown below it should hold the modifier for all attacks and then reset to zero.




function onFullAttackClassDrop(nodetype, nodename, draginfo)
if User.isHost() or not OptionsManager.isOption("PATK", "off") then
local custom = buildCustomRollArray(nodetype, nodename, draginfo);

ModifierStack.setLockCount(draginfo.getSlotCount() );

for i = 1, draginfo.getSlotCount() do
draginfo.setSlot(i);
onAttackDrop(draginfo.getStringData(), draginfo.getNumberData(),custom);
end
end
end

at least it works for me...

madman
February 18th, 2011, 02:00
Thank you so much, YOU ROCK

That should make things go just a little faster.

Chris