Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Accerak's Simple Spawn 'n Clean for PW's
Author  Accerak
Submitted / Updated  04-01-2004 / 11-22-2006
Category  Area
Expansions  HOTU-1.62
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Other
Includes  None
Description
** 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).

Files

NameTypeSizeDownloads
spawnnclean3.rarspawnnclean3.rar
Submitted: 04-01-2004 / Last Updated: 04-22-2004
rar18.6Kb1241
--
SCORE OUT OF 10
9.63
4 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (26):

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?

Posted by SpiderMcFly at 2005-05-09 10:34:08    
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?

Posted by Ornedan at 2005-01-08 14:56:00    
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 Ornedan at 2005-01-08 14:50:00    
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    
Sorry, wrong email.

email to [email protected]

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

email to [email protected]

thanks

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.


Posted by Accerak at 2004-05-01 23:22:00    
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

Posted by Accerak at 2004-04-19 14:41:00    
No problem Tolinus. Happy to see that it's working for you.
_________________________
"Victory is built from the ashes of your enemies." - unknown

Posted by Tolinus at 2004-04-17 13:51:00    
Hi Accerak, the module you send me works fine, thanks a lot!! ^__^ Now I'll try to generate some other spawns :-)

Posted by Accerak at 2004-04-09 13:26:00    
Hey Tolinus;

Got your module, looked it over and sent it back to you. Please let me know if everything works ok now.

_________________________
"Victory is built from the ashes of your enemies." - unknown

Posted by Tolinus at 2004-04-09 11:43:00    
Thanks for your quick reply!! I've done another attempt, but without success :-( I'm losing something. Sent the module, but take your time, Accerak.

Tolinus

Posted by Accerak at 2004-04-09 10:14:00    
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

Posted by Accerak at 2004-04-09 10:00:00    
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).

Posted by Sabbryn at 2004-04-03 08:42:00    
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.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Prefab Areas


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters