Respawning NPC cavesdungeons

Post » Mon May 07, 2012 2:27 pm

I worked out ages ago a method to make all those bandit caves turn into levelled content AFTER you've killed the original owners. That way that cave by seyda neen won't stay empty, some new fellas will move in.

I would need to add a very simple script to EVERY named NPC that appears in these caves/ruins, but, will this cause conflicts with all other mods out there? Always a bit wary of changing NPCs and Scripts :D

Plus, any interest in this? Quite a big task to identify every NPC that needs this script, and then make a whole load of generic/random NPC entries. Bit like "MCA for dungeons".
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Mon May 07, 2012 3:38 pm

Doesn't MCA add bandits, outlaws and such to dungeons anyway?
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Mon May 07, 2012 6:19 am

I'd be down, but it should probably be optional if you include it as part of Creatures.
User avatar
Sam Parker
 
Posts: 3358
Joined: Sat May 12, 2007 3:10 am

Post » Mon May 07, 2012 11:17 am

I would be interested but I would not edit the vanilla NPCs in any way. I would rather add something to the caves (which would be easier seeing that there aren't as many caves as there are NPCs) that adds the new NPCs after the PCs first visit maybe.
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Mon May 07, 2012 6:36 pm

I'm very interested in this for a personal project of mine can you pm me the script I don't care about compatibilty since I tweak all the mods I use
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Mon May 07, 2012 1:55 pm

You don't necessarily have to add a script to every named NPC to check whether they're dead. I don't think it'd take much more time to get the ID of every NPC in a cave and add a condition for their death, since you're going to have to identify them all anyway ? Maybe one of the advanced editors can even automate that.
User avatar
CHangohh BOyy
 
Posts: 3462
Joined: Mon Aug 20, 2007 12:12 pm

Post » Mon May 07, 2012 1:54 pm

I like the idea of this, and would like to see it done. Though I wonder if it would be possible to add some "totem" items which, when placed into one of the dungeons it will prevent the people from spawning there. I say this because on occasion, I like to inhabit a cave with my character and it'd be annoying if people started spawning there while I was away.

I think this may not be too hard if you went with Rot's suggestion (which definitely sounds plausible to me).
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Post » Mon May 07, 2012 2:22 pm

Well, the beauty of my script is that it takes into account any possible dungeons you make a home. It works by placing an activator at the corpse. If 2 days have passed (with some randomness put in) and the player hasn't been around, then the activtor will place a spawn marker. If the player visits, the timer resets. Seems to work OK with a quite test over a week period.
User avatar
Czar Kahchi
 
Posts: 3306
Joined: Mon Jul 30, 2007 11:56 am

Post » Mon May 07, 2012 12:08 pm

So, what if the player went to solstheim for few months? Would there be bandits in the cave when they returned.
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Mon May 07, 2012 5:16 am

Yep, I'm afraid so, you'll find them looting your home in your absence....
User avatar
Nicole Mark
 
Posts: 3384
Joined: Wed Apr 25, 2007 7:33 pm

Post » Mon May 07, 2012 10:57 am

Yep, I'm afraid so, you'll find them looting your home in your absence....
Well if I was a homeless bandit and knew about a cave that had been abandoned for over a month I'd consider moving in too. :P
User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Mon May 07, 2012 7:42 am

Yeah that isn't so bad, actually kind of nifty, it makes sense that they'd want in there if it wasn't being used.

Once you did come back, would they continue spawning forever then? Even if you visited everyday after your long absence?
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Mon May 07, 2012 8:54 am

I'm not too sure on the answer to that one. Does placing a levelled spawn point via a script place a true spawn point, or just a single creature from that levelled list? I'd have to do some further testing on that one. Only tested so far to prove the theory works, that a cave system with placed NPCs can turn into a levelled type system once the original NPCs are dead.
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm

Post » Mon May 07, 2012 4:11 am

That's okay, I was just curious. I still think this sounds like a cool idea.
User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Mon May 07, 2012 9:33 am

personally I have always loved going into a cave killing everyone and the turning it into my own base of sorts, its one of the things I hated in oblivion, thanks to the respawning npcs

I vote for this to be optional or not touch the existing caves at all by simply making new ones (not a simple thing though, more tedious then anything else)
User avatar
Ownie Zuliana
 
Posts: 3375
Joined: Thu Jun 15, 2006 4:31 am

Post » Mon May 07, 2012 6:20 am

I do like the idea, and have wanted to do something like it because I hate the way MCA did it.

I don't think placing spawn points with a script is a good idea for what you want to do though, because as far as I know you can't delete them. I just took a look at Creatures, and I see that it places spawn points using this method. Over time more and more spawn points will be created, and this will eventually cause problems. I just checked it in-game with the bandit bosses as a test subject, and sure enough, the bandits spawned by the boss are always there. Spawning more bosses further adds to the other bandits spawned. This seems like a very bad way to do it, in my opinion.

There is also a bug with spawn points that causes them to respawn every time you change cells after clearing the corpse, independent of fCorpseClearDelay. So once something spawns, the cave will never be vacant again unless you actively modify the leveled list/spawned actors with scripts, or leave the corpse and visit frequently enough. It becomes exactly like MCA, in other words.

I vote against scripting the actors directly if you don't need to. I don't know why you would want to place the activator at the corpse, as I think that would only lead to problems if the actor were to die in an unexpected place, like underwater, in lava, or places where they get stuck. There is also the possibility of luring the actor away from their initial cell to worry about. Though if you insist on doing it that way you still don't need to place a script on the actors, instead checking for the actors death and using "actor_id"->PlaceAtMe, "spawn_activator" in a script attached to a persistent activator. It seems inefficient to me though.

Placing some some activators at appropriate places that would only spawn a new actor once the original actors are dead really seems like the ideal way to do it. You could randomize what points spawn and keep bandits from repopulating the dungeon too often as well. While you would have to specify what actors to spawn in the script (who can be scripted for randomness, as you know), it seems overall safer than using spawn points. And, while you could modify the leveled lists at run-time, it seems rather redundant in comparison to the activator method.
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Mon May 07, 2012 9:24 am

I think this is a great idea, myself. I don't know enough about scripting to offer any useful insights into that part, but I really love the idea that they only spawn if you don't visit the cave frequently. It seems to me like this adds a great level of realism.
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Mon May 07, 2012 5:33 am

I do like the idea, and have wanted to do something like it because I hate the way MCA did it.

I don't think placing spawn points with a script is a good idea for what you want to do though, because as far as I know you can't delete them. I just took a look at Creatures, and I see that it places spawn points using this method. Over time more and more spawn points will be created, and this will eventually cause problems. I just checked it in-game with the bandit bosses as a test subject, and sure enough, the bandits spawned by the boss are always there. Spawning more bosses further adds to the other bandits spawned. This seems like a very bad way to do it, in my opinion.
Now this was something I wasn't aware off, short term testing doesn't highlight this problem. Surprised that it's not been reported in Creatures before. I'll have to adjust the scripts in Creatures to actually place the NPCs instead of relying on levelled lists (big shame, makes the scripts bigger, not complex, just annoyingly bigger :D)

There is also a bug with spawn points that causes them to respawn every time you change cells after clearing the corpse, independent of fCorpseClearDelay. So once something spawns, the cave will never be vacant again unless you actively modify the leveled list/spawned actors with scripts, or leave the corpse and visit frequently enough. It becomes exactly like MCA, in other words.
I'm aware of this bug, in my play style, I make a point of NOT clearing corpses outside of entrances to interiors

I vote against scripting the actors directly if you don't need to. I don't know why you would want to place the activator at the corpse, as I think that would only lead to problems if the actor were to die in an unexpected place, like underwater, in lava, or places where they get stuck. There is also the possibility of luring the actor away from their initial cell to worry about. Though if you insist on doing it that way you still don't need to place a script on the actors, instead checking for the actors death and using "actor_id"->PlaceAtMe, "spawn_activator" in a script attached to a persistent activator. It seems inefficient to me though.

Placing some some activators at appropriate places that would only spawn a new actor once the original actors are dead really seems like the ideal way to do it. You could randomize what points spawn and keep bandits from repopulating the dungeon too often as well. While you would have to specify what actors to spawn in the script (who can be scripted for randomness, as you know), it seems overall safer than using spawn points. And, while you could modify the leveled lists at run-time, it seems rather redundant in comparison to the activator method.
Placing at the corpse was the easiest and simpliest way I could think of doing it. The only test required is if the NPC the script is on is dead, and if so, place an activator. This activator then does it's time delay stuff, and then when everything calculates as True, place a new NPC at the activators location, and then delete the activator (to stop it spawning new stuff and taking memory resources). The new "generic" bandits that then spawn have the same script on, so then you get constant time delayed renewal. I understand the problem of spawns being in bad places due to where corpses are. Something else to think about. I'm also thinking about normal MW, where you can't drag enemies into different cells.

By having an activator in each interior that checks the health status of the NPCs, and placing/dealing with activtors does lead to other issues. The script first time round has to deal with specific NPCs, then after that, it has to check for every possible random NPC that could be spawned by the script, turning in a monster script.

Hmm, everything has pro's and con's. Just what I love about MW modding :D

But definately, I need to avoid using levelled lists to place random stuff, since it's actually placing a spawn marker and not the actual NPC/creature from the list. Something else to add to the Creatures update.
User avatar
neil slattery
 
Posts: 3358
Joined: Wed May 16, 2007 4:57 am

Post » Mon May 07, 2012 2:58 am

personally I have always loved going into a cave killing everyone and the turning it into my own base of sorts, its one of the things I hated in oblivion, thanks to the respawning npcs

I vote for this to be optional or not touch the existing caves at all by simply making new ones (not a simple thing though, more tedious then anything else)
Installing mods is always optional. :wink_smile:
User avatar
xx_Jess_xx
 
Posts: 3371
Joined: Thu Nov 30, 2006 12:01 pm

Post » Mon May 07, 2012 1:05 pm

Now this was something I wasn't aware off, short term testing doesn't highlight this problem. Surprised that it's not been reported in Creatures before. I'll have to adjust the scripts in Creatures to actually place the NPCs instead of relying on levelled lists (big shame, makes the scripts bigger, not complex, just annoyingly bigger :D)
I just consoled in the bandit boss, since the chance for them spawning was so low. It is the kind of thing that probably wouldn't appear during play-testing, so you have to invite it. Even with the low boss spawn, I would think people might notice the other bandits appearing without a boss.

I'm aware of this bug, in my play style, I make a point of NOT clearing corpses outside of entrances to interiors
Same here, though a bull netch was blocking my way into a cave earlier, so I had no choice. =/

Placing at the corpse was the easiest and simpliest way I could think of doing it. The only test required is if the NPC the script is on is dead, and if so, place an activator. This activator then does it's time delay stuff, and then when everything calculates as True, place a new NPC at the activators location, and then delete the activator (to stop it spawning new stuff and taking memory resources). The new "generic" bandits that then spawn have the same script on, so then you get constant time delayed renewal. I understand the problem of spawns being in bad places due to where corpses are. Something else to think about. I'm also thinking about normal MW, where you can't drag enemies into different cells.
I was pretty sure that you would have scripted the NPCs, but I wanted to make the point to be sure. As for moving actors to different cells, they can always be commanded in vanilla.

By having an activator in each interior that checks the health status of the NPCs, and placing/dealing with activtors does lead to other issues. The script first time round has to deal with specific NPCs, then after that, it has to check for every possible random NPC that could be spawned by the script, turning in a monster script.
Yes, they will be longer, but not so long that it should make a real problem. Proper use of states and returns should keep it from slowing down anything since it will only need to run once once enough time has passed. You could also delete the activator/s that check for death and place or enable the spawning ones. Plus, interiors are almost never a problem with slowdown in my experience. I'm all for things being no more complicated than they need to be to make them function without problems, but given what problems I foresaw I don't see another way that is reliable without being overly complicated.

Hmm, everything has pro's and con's. Just what I love about MW modding :D
True, true, so very true.
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Mon May 07, 2012 6:46 pm

I'm not too sure on the answer to that one. Does placing a levelled spawn point via a script place a true spawn point, or just a single creature from that levelled list?
The first one, It will probably double each generation, not good
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm


Return to III - Morrowind