-
June 28th, 2022, 19:53 #41
I should note that even with the sample campaign I gave you - where I don't override parseNPCpower - you could easily put a printstack in your ruleset version and see that when I do the polymorph it never gets called - hence blank. Using equipped effects I can do my own printstack as in that one I do override pareseNPCpower. But in both cases, the behavior no longer triggers pareseNPCpower in your new way of doing things triggered by the drop only.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 28th, 2022, 20:03 #42
I did more digging it looks like addNPC in LIVE used to call parseNPCPower directly and addNPC in TEST no longer does. Nor does it trigger it when addNPC is called directly. Not all CT node addition occurs due to a drop. Some are due to direct calls to addNPC.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 28th, 2022, 22:11 #43
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,540
In the core ruleset, there are no direct calls to addNPC.
If you need to call something analogous to addNPC, then you would you would call need to make a call like this with the new code:
Code:local tCustom = { sClass = "npc", sRecord = [sourcepath] }; CombatRecordManager.onRecordTypeEvent("npc", tCustom);
JPG
-
June 28th, 2022, 22:19 #44
Last edited by SilentRuin; June 28th, 2022 at 23:38.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 29th, 2022, 04:46 #45
Infinite loop solved, per Moon Wizard suggestion, replaced CombatManager.setCustomAddNPC(onHostAddNPC) call with the following:
In onDesktopInit...
Code:savedOldFn = CombatRecordManager.getRecordTypePostAddCallback("npc"); CombatRecordManager.setRecordTypePostAddCallback("npc", onNPCPostAdd);
Code:function onNPCPostAdd(tCustom) if savedOldFn then savedOldFn(tCustom); -- assume if something there they call CombatManager2.onNPCPostAdd else CombatManager2.onNPCPostAdd(tCustom); end local nodeCT = tCustom.nodeCT; ... My Stuff ...
Last edited by SilentRuin; June 29th, 2022 at 04:49.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 29th, 2022, 05:52 #46
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,540
There was a bug in CombatRecordManager.getRecordTypePostAddCallback that I just fixed in the beta Test channel.
You shouldn't need the CombatManager2.onNPCPostAdd(tCustom); backup call any more.
Code:function onNPCPostAdd(tCustom) if savedOldFn then savedOldFn(tCustom); end local nodeCT = tCustom.nodeCT; ... My Stuff ...
JPG
-
June 29th, 2022, 16:57 #47Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 30th, 2022, 23:40 #48
As this is my grab bag thread of things I've had to fix in my extensions for TEST - I figured I'd mention this one. Make sure you replace addNPC calls etc. with CombatRecordManager.onRecordTypeEvent - or you will pay for it in subtle ways.
Last edited by SilentRuin; July 1st, 2022 at 18:36.
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