BioWare Atari
Información sobre BioWare Juegos de BioWare Soporte Foros 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 Store
Neverwinter Nights 2 Forums
Mostrar/Ocultar

English
Deutsch
Français
Español
Italiano

Mostrar/Ocultar

Ver las últimas pantallas 

Ver las últimas pantallas
Mostrar/Ocultar

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



La hora actual es: (insertar hora)
sáb, 21 noviembre 2009 09:36

Mostrar/Ocultar

Download 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

Mostrar/Ocultar

5,046,790 usuarios de BioWare:
  78 conectados
  7 ocultos
  254 invitados

1492 Playing Online
  100% NWN
  99% NWN: SoU
  100% NWN: HotU

447 Registered Guilds

8,768,243 mensajes en los foros

Temas más recientes de los foros:
1. Stupid MAKO!! (Mass Effect 1 General Discussion (No spoilers allowed))

2. An Idea Realized and Marquee Abi... (Mass Effect 2 General Discussion (No Spoilers Allowed))

3. I've never playe... (Baldur's Gate II: SoA and ToB General Discussion)

4. Why are you developers scared to... (Mass Effect 2 General Discussion (No Spoilers Allowed))

5. hidden trail (NWN2: Builders - NWN2 Toolset)