** MINOR UPDATE as of 04/22/04 ** Added a waypoint for spawning and respawning items. Instructions for updating or doing a new installation of the scripts are in with erf. ** MAJOR UPDATE as of 04/03/04 ** You'll want to download this updated version, it adds alot of new functionality, and fixes all the problems I could possibly see. A simple set of scripts to go into your area event hooks that will allow you to spawn creatures and placeables to waypoints, and clean up your areas after they are empty. It doesn't use any heartbeats and should be a great alternative to NESS (for those of you like me that find it too cumbersome).
Posted by Uze at 2007-09-19 03:27:04 Voted 10.00 on 09/19/07
Nice low lag system.
Thanks it works great
Posted by Rosietreats at 2006-09-09 01:21:06 Voted 10.00 on 09/09/06
Very cool Accerak!
Very cool indeed! Thanks
Posted by lau ( 80.197.xxx.xxx ) at 2005-06-18 07:36:14
What I mean is that, say I enter an area, kill the creatures and wait for them to respawn?
Also:
- Some places where I place creature spawn waypoints, there are no creatures appearing at all.
- When I kill a group of creatures, and they respawn, and I kill them again, a clean and respawn will not occur a 2nd time.
Posted by Mistress_Anatida at 2005-06-16 02:12:56 Voted 9.50 on 06/16/05
I'm not sure where Accerak has ran off to, but I build & run the PW this system was developed for...
Lau,
By this question do you mean that:
1) There is already a PC in the area
2) A new PC enters the area
3) The spawns do not occur when the new PC enters?
I wouldn't think it would work that way, unless the 2nd PC is entering before the alloted respawn time on the WP. I'm in the process of a complete rebuild right now, I will test this with Silvercloud's fixes & see if I can replicate the problem. Please post more info if you can. _________________________ I'd rather laugh with the Sinners than cry with the Saints, Sinners are MUCH more fun!
Posted by Mistress_Anatida at 2005-06-16 02:12:29 Voted 9.50 on 06/16/05
I'm not sure where Accerak has ran off to, but I build & run the PW this system was developed for...
Lau,
By this question do you mean that:
1) There is already a PC in the area
2) A new PC enters the area
3) The spawns do not occur when the new PC enters?
I wouldn't think it would work that way, unless the 2nd PC is entering before the alloted respawn time on the WP. I'm in the process of a complete rebuild right now, I will test this with Silvercloud's fixes & see if I can replicate the problem. Please post more info if you can. _________________________ I'd rather laugh with the Sinners than cry with the Saints, Sinners are MUCH more fun!
Posted by lau ( 80.197.xxx.xxx ) at 2005-06-15 16:27:04
Is it normal behaviour that creatures don't spawn while players are in the area?
I'm still new to this building thing, but I like this package so far. Is there a way to modify it to spawn random creatures and items from a list? And even better, a weighted list?
There's a bug in bpw_gen_usr.nss, function void CleanArea.
When the last PC exits an area, a variable called Timer is checked. If it's 0, cleanup gets initiated and Timer is set to 1. I assume this is to prevent redundant cleanups taking up extra resources.
The problem is that if a player enters the area before the cleanup happens, CleanArea aborts right at the start, before resetting the Timer gets reset to 0.
Thus, Timer is forever stuck at 1 and cleanup is not called on the area again. And an area that hasn't been cleaned up will also never respawn.
The fix is trivial. Move the line
"SetLocalInt(Area,"Timer",0);"
to the start of the function, before the player presence check is done.
There's a bug in bpw_gen_usr.nss, function void CleanArea.
When the last PC exits an area, a variable called Timer is checked. If it's 0, cleanup gets initiated and Timer is set to 1. I assume this is to prevent redundant cleanups taking up extra resources.
The problem is that if a player enters the area before the cleanup happens, CleanArea aborts right at the start, before resetting the Timer gets reset to 0.
Thus, Timer is forever stuck at 1 and cleanup is not called on the area again. And an area that hasn't been cleaned up will also never respawn.
The fix is trivial. Move the line
"SetLocalInt(Area,"Timer",0);"
to the start of the function, before the player presence check is done.
Posted by zNo ( 62.47.xxx.xxx ) at 2004-08-21 08:12:00
doesn't work for me :(.
does it matter what language your NWN is?
Posted by Kuld ( 213.105.xxx.xxx ) at 2004-08-02 10:01:00
Hi.
I used your spawn system, on some areas it works fine.
On another when I cleared the mobs out, they didnt respawn, not even on the next reboot. The scripts are all in place.
How come the mobs wont respawn, even after a server reboot?
I can send you the module if you wish to check it.
Posted by Anthony ( 80.171.xxx.xxx ) at 2004-06-25 04:53:00
Posted by Anthony ( 80.171.xxx.xxx ) at 2004-06-25 04:31:00
Hi Accerak,
I'd like to try your spawn system, but it seem doesn't work.
Can you (or somebody else) send me a module that work? i can't get it work :(
please help me
Posted by Gomisan at 2004-05-21 00:54:16 Voted 9.00 on 05/21/04
Posted by Gomisan at 2004-05-14 07:44:00 Voted 9.00 on 05/21/04
Seems to be a small bug in the cleanup. I spawned a single monster, left the area and then returned before the monster had been removed. Started battle only to have the monster fade away before my very eyes.
Also, I was wondering if there was some way to have the spawns come more frequently than once an hour. A game hour is 10mins real-time on my server, which is a long time between spawns. I'd like to be able to at least spawn once/minute (real-time minutes, not game time).
Other than that.. thanks for a simple script. It handles two tasks I've been dreading, Area cleanup and Creature Spawns in the simplest way possible.
ooh and before I forget... are you going to expand the features at all? Perhaps with a trigger, so I can spawn ceatures only when a PC is actually near them or in a specific location.
Just noticed a bug inherent in the system... Make sure that the Palette copy of ANYTHING that you are spawning in is NOT SET TO PLOT. The cleanup script doesn't remove those placeables, creatures, or items that are set to plot. So every time the spawn fires when a PC enters another copy is created. eg., you initially spawn in 1, then a pc leaves, the area cleans up, and when the next pc comes in, now you have 2, and so on and so on. _________________________ "Victory is built from the ashes of your enemies." - unknown
Sorry, forgot to mention that the spawns seem to get fouled up if you are running CEP and have the PRC classes.2da in your override. I don't think the PRC classes.2da on its own creates a problem, and I know CEP on it's own doesn't.
But I just downloaded the files, did what you said, and I had spawns without a hitch. So if you still can't get it going, send me your mod at the email below and I'd be glad to see what's going on. _________________________ "Victory is built from the ashes of your enemies." - unknown
If you're doing everything you say, then it should be working just fine. I noticed one thing, if you are using the PRC classes.2da in your override folder, that stopped spawns from happening on my system, I've no idea why.
If you're not, send me a copy of what you're doing and I'll try to figure it out.
email to [email protected] ok. Thanks! _________________________ "Victory is built from the ashes of your enemies." - unknown
Posted by Anonymous ( ..xxx.xxx ) at 2004-04-09 06:29:00
Hi Accerak. Compliments for your work and for sharing it!I'd like to try your spawn system, but it seem doesn't work. Try to explain myself: i've made a new module before importing your erf. then I've made 2 areas and put in both the three script provided. I've dropped one of your custom waypoint in one of the two area and, in its properties, changed only the NAME with the resref of one creature standard (nw_goblina).Nothing happens when i play....any ideas?
Posted by Accerak ( ..xxx.xxx ) at 2004-04-03 10:26:00
Thank you Sabbryn!
I have updated the file as of a 12:20pm today, and included a great deal of new stuff. I think I got all the bugs I could foresee out, and made it as simple as possible. I hope everyone gets a great deal of use from these scripts (and to you Sabbryn and everyone else writing cleanup and spawn scripts, thanks for teaching me how to code and what good commenting and instructions can do for the average guy)!
You'll know if you got the updated file version if the filename ends with spawn_n_clean2.rar! (not sure how long the vault takes to get the new files available).
Thanks for the props in the well-written readme (something I forgot to write myself - heh).
Glad to see my code has come to some benefit. It originally sprang from the optimizing I did for a PW I'm builder for.
Since then, I have done something similar - taking their existing spawn system (Palor's) and making it into a hybrid so that it worked with the cleanup system instead of being heartbeat intensive - which greatly helped in overall performance, especially with over 300 areas involved.
Posted by Accerak ( ..xxx.xxx ) at 2004-04-03 00:37:00
I'll be posting an update for this pretty quickly. I added a little bit of script so that during cleanup anything that could be closed and/or locked would be.
I also noted a mistake in my instructions.
IF YOU SET THE RESPAWN TIME VARIABLE TO 0, CREATURES AND PLACEABLES WILL BE AVAILABLE TO RESPAWN IMMEDIATELY. IF YOU SET IT TO A VALUE HIGHER THAN 12 (SAY 13), THEY WILL NEVER RESPAWN (It's a one shot deal then until the server is reset) But I am working on a simple widget that will allow a DM to go in during the game to reset the variable and allow respawns again.
Also, if you create a new store, under the standard types in the palette, you'll see one for NW_LOSTITEMS. This is a "specialty store" where all the items that are dropped by pc's or recovered from loot bags will go for purchase. If you have such a merchant actually created.
You must be Logged In to post comments in this section.