BioWare Atari
BioWare Info BioWare Spiele Support Foren 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.

 

 

BioWare Blog
Neverwinter Nights 2 Forums
Anzeigen/Verbergen

English
Deutsch
Français
Español
Italiano

Anzeigen/Verbergen

Neueste Bildschirmfotos anzeigen 

Neueste Bildschirmfotos anzeigen
Anzeigen/Verbergen

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Aktuelle Uhrzeit: (Zeit einstellen)
So, 22 November 2009 06:27

Anzeigen/Verbergen

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
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

Anzeigen/Verbergen

5,051,445 BioWare-Benutzer:
  50 Eingeloggt
  1 Verborgen
  179 Gäste

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

447 Registered Guilds

8,768,738 Einträge in den Foren

Neueste Themen in den Foren:
1. can't change language (Web Site Help)

2. which script launches the crafti... (NWN 1: Scripting)

3. Killing Morag (NWN 1: General Discussion (No Spoilers Allowed))

4. I think we ARE goin to earth (Mass Effect 2 General Discussion (No Spoilers Allowed))

5. Merging Clothing (aka. body) par... (NWN 1: Toolset)