PDA

View Full Version : Issues from Update...



Blackfoot
June 25th, 2023, 23:48
[6/25/2023 6:32:01 PM] s'CombatManager.setCustomDrop - DEPRECATED - 2022-08-16 - Use CombatDropManager.setLinkDropCallback/setDragTypeDropCallback'
[6/25/2023 6:32:01 PM] [ERROR] Script execution error: [string "Champions CoreRPG:..pts/manager_combat2.lua"]:18: attempt to call field 'setCustomAddNPC' (a nil value)

CombatManager.setCustomDrop(onDrop);
CombatManager.setCustomAddNPC(addNPC);

These were pretty standard code... what's this supposed to change to?

Moon Wizard
June 26th, 2023, 01:15
There are several examples across the various built-in rulesets under the CombatManager2 script in each ruleset (such as 5E, 3.5E, etc.) This would supercede the way you were overriding before, and let all the standard handling already work, and then just add ruleset-specific custom code.


function onInit()
...
CombatRecordManager.setRecordTypePostAddCallback("npc", onNPCPostAdd);
...
end
function onNPCPostAdd(tCustom)
...
end


Regards,
JPG