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  MP Compatible Area Cleaner System
Author  Sab'bryn
Submitted / Updated  03-06-2004 / 11-22-2006
Category  Area
Expansions  HOTU-1.61
Format  Code Only
Type  Type - Other
Includes  Custom
Description
Designed to clean the area when no players are present.
Custom functions/scripts contained here are used as follows for the Area:

OnEnter: [CheckForPC()]
- Keeps track of the number of players in the area
OnExit: [TimerCheck()]
- Checks to see if any players remain in the area
- Starts cleanup process when no PC is present

* In addition the following script is needed:
OnUserDefined: 'area_clean_usr'
- Performs the actual clearing of the area

NOTE:
The first two are presented as functions so that they can be easily incorporated with any existing area scripts.

Files

NameTypeSizeDownloads
Sabbryn1078616354046MPAreaCleaner.rarSabbryn1078616354046MPAreaCleaner.rar
Submitted: 03-06-2004 / Last Updated: 03-06-2004
rar3.67Kb756
--
SCORE OUT OF 10
10
2 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 (12):

Posted by error_55o at 2007-08-03 07:47:27    
I cant get this to work, I've had mod crashes, game crashes or (when it seemed to work) non-removal of npc's, any idea why?
_________________________
sorry, cant get my pen to work on the screen so no signature ^_^

Posted by MasterP at 2005-11-03 08:32:43    Voted 10.00 on 11/03/05
very good system to save ressources on a pw!

Posted by IllusiveMind at 2005-06-05 16:31:23    Voted 10.00 on 06/05/05
Short, accurate. An awesome alternative if you don't have NESS and PW Helper. Helped me lots. Keep up the good work.

Posted by Sabbryn at 2004-03-11 19:32:00    
---------------------------------------------------------
For a quick reminder:
The cleanup script runs after a delay. This delay can be set on the area, otherwise the default is used (180.0 seconds). In both cases, the delay value is used as the min (as is) & max (2x delay) range for the script to run the pre-cleanup scan of objects in the area. By default, 3-6 minutes.

When it finds a valid object, the object is set to destruction within the range of 0 to the "delay" setting of seconds. By default, this is an additional 0-1.5 minutes.

At anytime before the cleanup scan finished (but not after), it can be interrrupted by a player entering the area.
--------------------------------------------------------
Now that that's covered, to adjust the NPC clear delay you can modify a few parts of the "Area_clean_usr" script

First, add a new constant to hold the delay for spawned NPCs ...
Ex:
float NPC=10.0;


... modify the CleanCheck function to send a new signal when an NPC is found ...

Ex:
[line 51] (GetIsEncounterCreature(Trash) && !GetIsDead(Trash)){
[line 52] return 4;

... and add to the CleanArea function a matching response ...

Ex:
[after line 85] (before it gets the next item in area)
if(Verify==4){
float Delay=NPC*Random(20); // This gives an added 10 secs to a little more than 3 minutes
DelayCommand(Delay,DestroyObject(Trash));}

Posted by Sabbryn at 2004-03-11 19:31:00    
---------------------------------------------------------
For a quick reminder:
The cleanup script runs after a delay. This delay can be set on the area, otherwise the default is used (180.0 seconds). In both cases, the delay value is used as the min (as is) & max (2x delay) range for the script to run the pre-cleanup scan of objects in the area. By default, 3-6 minutes.

When it finds a valid object, the object is set to destruction within the range of 0 to the "delay" setting of seconds. By default, this is an additional 0-1.5 minutes.

At anytime before the cleanup scan finished (but not after), it can be interrrupted by a player entering the area.
--------------------------------------------------------
Now that that's covered, to ajust the NPC clear delay you can modify a few parts of the "Area_clean_usr" script

First, add a new constant to hold the delay for spawned NPCs ...
Ex:
float NPC=10.0;


... modify the CleanCheck function to send a new signal when an NPC is found ...

Ex:
[line 51] (GetIsEncounterCreature(Trash) && !GetIsDead(Trash)){
[line 52] return 4;

... and add to the CleanArea function a matching response ...

Ex:
[after line 85] (before it gets the next item in area)
if(Verify==4){
float Delay=NPC*Random(20); // This gives an added 10 secs to a little more than 3 minutes
DelayCommand(Delay,DestroyObject(Trash));}

Posted by puket ( ..xxx.xxx ) at 2004-03-11 11:27:00    
Is it possible to give the creatures(NPC's)an extra "fdelay"
time for despawing?

Posted by Sabbryn at 2004-03-11 08:53:00    
I neither use nor work with HCR, so have not plans in creating a compatible version.

Posted by MyHouse at 2004-03-10 07:54:00    
Have you thought of makeing a compatable HCR vrs.? This would perfect on my mod. I'll look into implementing. Problem is, currently HCR drops a body and a body bag from dead PC's. (Inventory and PCT in bag)PCT is so another PC can drag dead body to a cleric to have him raised...

Posted by Sabbryn at 2004-03-10 03:59:00    
The latter is correct - the default tag of the "remains" bag is "BodyBag."

Posted by Kornstalx at 2004-03-10 02:11:00    
Sabbryn, I was looking through your code as I plan to use part of this, and thought of a question...

There's a reference to a "BodyBag" placeable that will have its inventory cleared before being destoyed. My question is what item uses the "BodyBag" tag? I thought that was an exclusive HCR thing, or is that the tag of the default HotU "Remains Bag" also?

-- Kornstalx

Posted by Sabbryn at 2004-03-08 10:49:00    
For those wishing to not have it clear corpses for instances where you want the corpse to decay, then I can tell you what change you need to make.

Part of the concept for using an assignable "shop" for areas was to make it possible for recycling. Imagine a cavern crawl where anything lost/dropped in the caverns will be lost (sent to the shop) and recycled (as part of the "treasure horde" at the end and/or a source of arms and equipment for the spawned encounters) - thus still reclaimable - with effort.

Posted by Sabbryn at 2004-03-08 01:46:00    
[Description]

Designed to clear areas of loot bags, dropped items and spawned NPCs.

Executes when no player remains in the area. Does not break when a player logs.

System keeps a running count of players entering and exiting the area (useful for other scripts to call).

Optional "store" can be assigned to the area so that cleared items can be recycled instead of destroyed.

If no time delay is assigned to the area, it will be assigned the default (see area_clean_inc).


[Details]
- Two scripts that are the core for my area cleaning system.

1. area_clean_inc
- contains functions to be included as part of an area's OnEnter and OnExit scripts

2. area_clean_usr
- script to be used as is on the area's OnUserDefined hook
- contains all functions necessary to automate the cleaning process for an area

* area_enter & area_exit scripts included for ease of incorporation

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 Models


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