SKKmods Posted November 11, 2017 Share Posted November 11, 2017 I am stress testing NPC combat spawning and see that the game engine is automatically disabling dead NPCs, keeping only the last ~16 bodies around (of 64 spawned and manually killed over a number of iterations). I remember this from multiple runs of the vanilla MinDefendCastle quest, where I couldn't find all my kills to loot. Anyone know if this cleanup count or threshold is a setting that can be script managed ? They are being removed OnDeath from quest RefCollectionAlias so their objective markers disappear (if enabled) for my mod hygene. Plan B is to track the ObjectReference of each player kill in an array and force .Enable() them after the battle for looting. More overhead. Link to comment Share on other sites More sharing options...
SKKmods Posted November 12, 2017 Author Share Posted November 12, 2017 Enabling player kills after a battle works ... for a while. If there are more than 16 total, turn your back and they are disabled again. PlanC: add them to another refcollalias to force persist. Link to comment Share on other sites More sharing options...
wim95 Posted November 12, 2017 Share Posted November 12, 2017 Detach from alias DefaultCounterXXX script and test. Link to comment Share on other sites More sharing options...
SKKmods Posted November 12, 2017 Author Share Posted November 12, 2017 Detach from alias DefaultCounterXXX script and test.Unfortunately i dont know how to do that as i cant see that script attached to any of my quest aliases. What does now work to force dead npc persistence is to add ondeath() player kills to a seperate playerkills quest refcollection so they dont get auto disabled until I clear() or removeall() at quest cleanup. Link to comment Share on other sites More sharing options...
SKKmods Posted November 14, 2017 Author Share Posted November 14, 2017 Amusing side note ... using a ReferenceCollection to persist the dead bodies and show a quest objective marker to help the player find them for looting usability (lol). With heaps of them lying around (up to 64) I would like to clear the quest objective marker once the dead body container is looted. Since npc containers don't seem to generate the "I'm done looting" OnClose() event, using OnActivate() to trigger a RemoveRef() from the ReferenceCollection to clear the marker immediately allows the game engine to disable the body & container (if more than 16) as the player accesses it, preventing any looting. So either the markers stay, or one can have looting navigation for the last 16 kills only. More important take-away is that the game engine is very aggressive on scavenging dead refs, there may be a significant performance consideration I am not measuring. Link to comment Share on other sites More sharing options...
FiftyTifty Posted November 16, 2017 Share Posted November 16, 2017 It's a game setting. It's set to 16 by default. Just load up the CK and edit it. Link to comment Share on other sites More sharing options...
SKKmods Posted November 16, 2017 Author Share Posted November 16, 2017 Yar, thanks I found iRemoveExcessDeadTime and iRemoveExcessDeadCount (actually 15 not 16 hey ho, can't count). I'm not actually going to change them as I cant check for consequential polycount performance issues on xbox which is my principle user base, so am going with extra RefCollAliases to hold the subset of dead bodies I'm interested in until quest cleanup. Link to comment Share on other sites More sharing options...
Recommended Posts