Jump to content

Recommended Posts

Posted

I have two mods I made to existing mods where I find loot on an NPC in the wilderness. One NPC has a key to a player home, that one starts alive but at 1 hp surrounded by bandits. Another NPC has a unique staff the player can loot.

The problem is that after a few days from the start of the game these both NPCs disappear. By the time the player might discover them, they are not there and there is nothing to discover.

No difference when setting to persistent. I can set the Respawn flag on the reference to make sure they show up the first time, but I don't want them to keep respawning and they respawn with all the loot duplicating it.

https://ck.uesp.net/wiki/Cell_Reset tells me there are ways to preserve something across cell resets but I could not find enough examples to find how. I looked at some NPCs in vanilla that spawn dead in the overworld but in xEdit it appears to be no different than what I have done. This Topic indicates I did nothing wrong.

One of my mods is my latest published before I noticed this was a problem if you want an example of what I am trying to do.

Posted

Could it be the work of the DeadBodyCleanupScript?

You might also use the console to figure out where your actor refs went, or if there are disabled or deleted.

BTW, the respawn flag on the object reference only refers to resetting the inventory, not the reference itself.  I don't think actor references are restored on a cell reset, just their position, their inventories, encounters and such things.

  • Like 1
Posted (edited)

I've explored this topic before. I think the best solution for you is to make the key and the staff into a quest item. I'm pretty sure a dead actor can't despawn as long as it's holding a quest item. Alternatively, you could try storing the actors in a reference alias, I'm pretty sure that is suppose to stop them from despawning as well, but then they would never despawn until removed from the alias... either way you would have to script some kind of solution I think.

I'm pretty sure there's an old necromancer mod that lets you make dead bodies persistent by giving them each a ring or something. Look how other mod authors have solved this if you can't do what I suggested.

Edited by Dromundas
  • Like 1
  • 3 weeks later...
Posted (edited)

OK I added a quest and testing results with:
NPC stays in world forever until player takes the staff from the body then NPC eventually despawns.
This is the right behavior I want. (Update: nearly. If player walks through same cell maybe without even noticing the important NPC, it starts the despawn countdown.)
I have attached a screenshot of the quest I added in xEdit. I am not very familiar with quests so I am sure to have created a porridge of mistakes. The quest never advances from stage 10, never completes, there is no script to push it along. But it does work in-game, and so long as it doesn't slow or wreck anything else I should be good I think.

quest.png

Edited by ModEnjoyer52
  • Recently Browsing   0 members

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