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  Restocking Stores
Author  The Krit
Submitted / Updated  07-26-2007 / 07-27-2007
Category  Scripting routines
Expansions  Works on all versions
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Merchant
Includes  None
Description
An NPC economy for your persistent world.

Ever notice how the stores on a PW have a tendency to accumulate treasure (sold by PCs) and run out of limited-quantity items (bought by PCs)? This script creates a reverse effect, removing items that were not in a store's original inventory and adding items from the original inventory that were sold out. Store gold (if limited) is also adjusted. You could call this a simulation of the store's NPC customers.

The restocking occurs several real-time hours after a store is opened while no restock is pending. This should be long enough to discourage a player from sitting around waiting for the restock to kick in.

One reason to use this script is so that you can limit the availability of certain items (by not having them available in infinite quantities), while not giving an advantage to those who log in right after a server reset (and immediately buy those limited quantities).

The time before a restock, the chances of items appearing and disappearing, and the acceptable range of gold can be set for the module by changing the appropriate constants in this script. If you want one of these to be different for a particular store, you can override the module setting with a local variable on the store.

The downloadable file, once unzipped, contains an importable version of this script. I named the script nw_d1_startstore even though that name is reserved by BioWare because BioWare's script of that name is a mere placeholder, and the place it holds is the OnOpenStore event handler for all the standard stores. That means that you do not have to modify those stores before they will use the imported script.

Files

NameTypeSizeDownloads
Restock_TK.zipRestock_TK.zip
Submitted: 07-26-2007 / Last Updated: 07-26-2007
zip3.99Kb228
Unzip into your erf directory if you want to import this script into your module.
SCORE OUT OF 10
10
5 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 (9):

Posted by Saduj at 2012-03-30 01:35:39    Voted 10.00 on 03/30/12
Very nice, will be using this one for sure :)
_________________________
Carcerian/Saduj's Submissions: (169 Portrait/Soundset Unlocker) (12 NWN Fonts) (30 NWN Fonts) (Auto-Emotes) (Custom Dragon Disciples) (Dynamic Wildshape) (Keyring) (NPC Schedules) (Sacred Shields) (Spawning Undead) (Shayans Subrace Engine for 169)

Posted by The_Krit at 2011-12-29 10:49:31    
After unzipping, you have to import the .erf into your module. Once that is done, the standard stores will automatically use the script, but custom stores might need to have nw_d1_startstore manually specified as the OnOpenStore event handler.

Posted by stoora at 2011-12-19 05:01:45    
O.k I new at this and do I just upzip it and it auto does it or do I have to place it in a store!
_________________________
Link

Posted by Gonzo_og at 2010-01-26 08:08:35    Voted 10.00 on 01/26/10
Thanks.
_________________________
stuff

Posted by Blasco-Yang at 2009-04-13 17:48:19    Voted 10.00 on 04/13/09
Absolutely brilliant! I've been using a rather simple clean up store inventory script on my stores, but this concept seems so much more realisitic.

Still debating on whether or not I will actually use it since I'm resistant to change lol.

But the scripting and the concept are definitely worth a vote of 10.

Excellent work!

Posted by Deiter at 2007-08-03 09:00:21    Voted 10.00 on 08/03/07
I've been using it for months (prior to submission) and have not had any problems with it.

Posted by The_Krit at 2007-07-29 15:36:01    
(I just realized my previous comment could be easily misread. I meant *also* report back after trying it.)

Posted by The_Krit at 2007-07-29 15:34:29    
Please report back after trying it. While feedback on the idea is good, feedback on both the idea and the implementation is better.

Posted by Jaysyn at 2007-07-27 05:01:45    Voted 9.00 on 07/27/07
I haven't tried it yet, but I love the idea.
_________________________
-=Jaysyn=-

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 Other


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