BioWare Atari
BioWare Info BioWare Games Support Forums Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

How Do I Start My Store?

Intended Audience: For Builders
By David Gaider

[Printer Friendly / Syntax Highlight]

Setting up the basic store is pretty easy... all you have to do is use the Store Wizard and that gets your basic store object set up: you've got a store with an inventory, a mark-up and mark-down percentage, a name and a tag. But what do you do with it, then?

Step 1: Place the store object in your module A store that is just an unplaced blueprint cannot be accessed by your module. You've actually got to put it somewhere. You'll notice that when you place it, it looks just like a waypoint... that's fine. Players won't see this store 'object' or be able to interact with it in any fashion... it just needs to exist, preferably closeby to the object that is going to call on it.

Step 2: Create your accessing object Usually this is a merchant NPC... but it doesn't have to be, really. Any object that can run a script can open a store. Having a merchant NPC is the easiest method, however.
Simply create your merchant and go to create a dialogue for him. The simplest method is simply have him say "Greetings! How would you like to see my wares?" Then add two player responses: "Yes" and "No".

Step 3: Add the script to open the store object In the above dialogue, you'd want to add this script into the 'Actions Taken' section of the "Yes" player response... so when the player selects that response, the store is opened. Nothing needs to go in "No"... that will simply end the conversation.

The basic script for opening a store object off of dialogue is this:

NWScript:

...and that's it. Naturally you want to replace "STORE_TAG_HERE" with the specific tag of your store object.

If you look at the command structure of OpenStore, you will see that you can optionally add on extra mark-up or mark-down percentage... that's just in case you want conditional store useage. Take this next script, for instance... the storekeeper doubles all prices for elves (I guess he doesn't like them):

NWScript:

Last comment on stores: the features that the standard store object offers are pretty limited at the moment. Perhaps that will change in the future. Regardless, know that you cannot adjust prices on individual types of items... a merchant applies the same mark-up or mark-down regardless of the item involved... nor can you dictate what types of items a merchant will or will not buy. It is all or nothing.
One thing that does work on stores is that any scripting command that targets an object's inventory works on the store object, as well. Remember: it's the store object that has the inventory, NOT the merchant NPC. So using CreateItemOnObject, GetFirstItemInInventory and GetNextItemInInventory will all work when targeting a store object.

 

 

4 Million Community Members
Neverwinter Nights 2 Forums
Hide/Show

English
Deutsch
Français
Español
Italiano

Hide/Show

View Latest Screenshots 

View Latest Screenshots
Hide/Show

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Current time is: (set time)
Fri, 25 July 2008 08:55AM

Hide/Show

Buy Premium Modules

Top NWN: HotU Modules:
1. The Aielund Saga Act IV The Fall of...
2. More...

Top NWN: SoU Modules:
1. The Aielund Saga Act IV The Fall of...
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Hide/Show

4,060,573 BioWare Users:
  40 Logged In
  4 Hidden
  257 Guests

851 Playing Online
  100% NWN
  98% NWN: SoU
  98% NWN: HotU

542 Registered Guilds

7,723,090 posts in forums

Newest Forum Topics:
1. Looking for a Melee PvP Build (NWN2: Persistent Worlds & Multiplayer)

2. Config tool (Jade Empire Technical Support (Self-Help))

3. NVN 1 installation problem (NWN 1: Macintosh Version - General Discussion)

4. Mini/Area Map Can Now Be Disable... (NWN2: Builders - NWN2 Toolset)

5. Bugs report (Mass Effect PC Version General Discussion (Spoilers will be moved))