Thread: Extensions: BUYER BEWARE
-
February 18th, 2021, 23:30 #31
Hey SilentRuin, total tangent here...
That's a neat trick saving off the original function and restoring it with onClose(). In the one and only extension I've written I took great pains in an attempt to step back into the original logic flow after my inserted code, but I generally did so with manager_xx_override and then inserting a call to the real manager within the function.
Code:function onInit() ActionsManager2.encodeAdvantage = encodeAdvantage; end function encodeAdvantage(rRoll, bADV, bDIS) if Input.isControlPressed() then bADV = true; else if Input.isAltPressed() then bDIS = true; end end ActionsManager2.encodeAdvantage(rRoll, bADV, bDIS); end
-
February 18th, 2021, 23:38 #32
Although looking into it, I suppose that trick only works for things that use a window?
-
February 18th, 2021, 23:38 #33
Yeah, while you can't always prevent conflict between extensions, I try to minimize the impact of my code when I can. That way if someone else overrides it the only way they can screw me up is if their load order is higher - I won't mess them up. Course, Extensions = RISK and you can't guard against what you don't control. Still that's what I do when I can. If its .xml script I use the super calls to insure I call the original code - when I can.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks