Jump to content

Prevent generic NPC from respawning


Recommended Posts

Unfortunately, if you have a respawning NPC in a quest alias, they will eventually respawn. Even worse, with the Quest Object flag enabled for them, they will respawn naked and become uninteractable.

 

 

What I'm testing with at the moment, are the raiders from the USAF Satellite cell (usafsatelliteext), and now that my follower framework is finished, I was hoping to redo the Intimidation perks. Instead of "borrowing" an NPC for a few minutes, I added dialogue and such so that they'd become a fully fledged follower.

 

But they ruddy well respawn! Most of the generic actors in the game have the respawn flag enabled, and I don't think that it would be a good idea to remove that flag from them all.

 

I could remove the respawn flag from every NPC, and somehow recreate the respawning system through Papyrus. But that's a terrible idea, both in practicality and performance, so I won't be doing that.

Link to comment
Share on other sites

Mmm my mod might be helpful to you in this regard, i make use if extensive features to ensure actors are cleaned up properly.

 

I'm not sure if it would be reliable in this case but are you or have you looked into using ApplyToRef for your aliases and tracking them in some script?

 

I'm thinking, apply alias data to them, add them to an array and maybe use a hardcap on the number of recruitable people. If I'm understanding what you are doing correctly. Then you can clear the data in the OnDeath Event or similar.

Link to comment
Share on other sites

The issue is that the game respawns actors every so often, if the base actor record has the respawn flag enabled. This is bad, as there are loads of generic respawning characters, and I was looking to make the intimidation system persistent.

 

Having references as quest items in the alias tab supposedly prevents them from being respawned, but not actors; it bugs them out completely when the game respawns them

Link to comment
Share on other sites

Try casting him as a property into your script instead of an alias, then cast the property into the alias when or if needed. I do this when I pass actors into my spawn markers. I have a number of Actor Properties that are filled with none, then when I pass them from quest to marker I do so by casting them into properties. This will keep them persistent so long as the script is active (as you'd know) and you can do whatever you like with them.

 

Does that sound a bit more of what you are after?

 

Edit- Contextual mistake

Link to comment
Share on other sites

Try casting him as a property into your script instead of an alias, then cast the property into the alias when or if needed. I do this when I pass actors into my spawn markers. I have a number of Actor Properties that are filled with none, then when I pass them from quest to marker I do so by casting them into properties. This will keep them persistent so long as the script is active (as you'd know) and you can do whatever you like with them.

 

Does that sound a bit more of what you are after?

 

Edit- Contextual mistake

 

Hmm. So I'd make several Actor[] array properties, adding/removing them from the aliases at the same time they're added/removed from the RefCollection aliases?

Link to comment
Share on other sites

Really sorry I forgot all about ya! Bumping the thread so I can reply tonight when I get back from work.

 

Did you happen to make any headway on this though?

Link to comment
Share on other sites

Really sorry I forgot all about ya! Bumping the thread so I can reply tonight when I get back from work.

 

Did you happen to make any headway on this though?

 

No, I haven't tried doing it in Papyrus. The main roadblock is that I'd have to create a framework for working with a large number of Papyrus arrays.

 

There are ten ref collections containing NPCs, all of which should be prevented from respawning in any fashion. Each ref collection can contain 255 NPCs, and Papyrus arrays have a maximum of 128 elements. I'd have to abstract twenty Actor[] arrays into a small number of functions. Unless we can have Papyrus arrays of Papyrus arrays, it's going to be migraine inducing.

Link to comment
Share on other sites

  • 2 weeks later...

Finally got around to testing this. Didn't bother to do the whole array thing just yet.

 

Having the actor inside an Papyrus Actor[] array allows the NPC to continue as normal; AI works, player interaction works, factions are the same, etc. However, it doesn't prevent the actor from respawning. They will have no gear, a different face, and a different voice (maybe different gender as well?) when the game respawns them.

 

It seems I'll have to give up on overhauling the intimidation system. Which is a huge shame.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...