PDA

View Full Version : How do you get merchants to work?


EZ_kiyotee
06-24-02, 08:24 AM
I picked up the book that shows you how to build worlds, but I can't find any reference to making merchants in there.

Every time I place a merchant under the merchant's option it just places a flag that doesn't show when playing the game. When I flag a npc to open store on conversation it says "this is what would happen if the store had opened" when I talk to them. It's driving me insane!

can anyone help? I admit I never learned C (yeah I know I'm a yuts) so scripting is amking me pull my hair out. __________________________________________________ __________
Yes this is Kroe Magnon, I'm sick of switching accounts for each board. ;)

EZ_illitrit
06-24-02, 11:31 AM
I'll try to help you out. Here goes...

First you make your merchant, setup it's inventory, sell markup, buy markdown and decide if it deals in stolen goods.

Then assign a Tag to it (on the Basic tab) say 'WeaponSmith' is it's tag.

You don't need anything else in the Advanced or Comments tabs for the merchant.

Paint your merchant down somewhere near where the NPC will be.

Now make a new monster say a Halfling Male, set it up however you wish. We'll call him Bob the Weaponsmith (Bob for short).

I put mine on Faction 'Merchant' (Advanced tab) but I don't think the faction matters as long as he's not hostile.

Now Edit his conversation (Basic Tab) when you get to the bit that the PC says to open the shop after typing in the PC text highlite that line of text then click the 'Actions Taken' tab.

On the actions taken tab you can pick a script, edit, or use the wizard. I used the wizard.

Wizard Step 1: click 'Perform an Action' then Next
Wizard Step 2: click 'Start a Merchant' and in the 'Script Tag' box put in the tag you gave your merchant object earlier. 'WeaponSmith' (note it's case sensitive).

Wizard Step 3: you can give the script another name I don't bother then click Finish.

Now finish up your conversation save it etc.

Now paint your NPC down near where you put the merchant object (the flag thing).

Now test it out it should all work. The main thing to remember is that you have to have the same tag in the 'StartMerchant' conversation script (from the wizard) and on your merchant object (the flag thingy).

Hope that helped and wasn't too convoluted.
illitrit

EZ_kiyotee
06-25-02, 09:52 AM
thanks so much. Annoyed me that I bought a $20 guide book on world building and they didn't mention it anywhere in there. merchants are kind of useful in game worlds don't you think?

EZ_illitrit
06-25-02, 11:13 AM
I bought the guide book hoping it'd have a breakdown of what each function does, no luck. Since then I've been writing scripts just to see what I can do and haven't had too too many problems so the book is kindling if I ever get a fireplace.

On that note if you or anyone needs a hand with a script and just can't figure it out I'd be more than happy to try and help out.

illitrit
Ander Steel (11 Rogue NWN SP Campaign)

EZ_kiyotee
06-25-02, 01:33 PM
thanks I suspect you'll see me posting all kinds fo questions as time goes by hehehe

EZ_ZanthiatheNightshade
06-26-02, 12:16 AM
I haven't ourchased the book... what does it have in it if not detailed info on how the scripts work

EZ_illitrit
06-26-02, 06:41 AM
It has a walkthrough on howto setup a complete mini-module and some examples of howto do scripts (bad, poorly explained examples IMHO), a primer on basic C programming concepts (loops, variables, etc) and a list of all the critters that come with the game (game stats, etc).

It's not a waste of money but it's not what I was looking for.

illitrit

EZ_kiyotee
06-26-02, 09:51 AM
yeah it has a little useful stuff but not really what I wanted from it.

Next question time! how od you make an NPC become your Henchman? I found the part of the book that explains henchmen scripting but not how to make someone your henchman. Nodwick eludes me still!

EZ_illitrit
06-26-02, 10:50 AM
hehe that's a good question I'll let you know if I get one working that's the next step after I finish my sexah bar employees that wander table to table in my bar and offer folks drinks unless the folks ask not to be bothered (sorta like a real life waiter(ess).

I'll probably be working on that soon just want to flesh out my bartender conversations and make them actually sell booze (as conversation options not as merchants)

illitrit

EZ_kiyotee
06-26-02, 11:44 AM
at least I know I'm not the only one with this problem than hehe.

EZ_illitrit
06-27-02, 12:09 AM
Ok I got a henchman to join a player. It was pretty simple but he's very basic (i.e. not changing tactics etc .. yet). I looked at Tomi Undergallows from Chapter 1 and basically copied what scripts he was using in his scripts tab. And made a conversation to actually 'hire' him.

Ok first the conversation:

On the line where the PC says 'yeah they want the henchman' put this in the ActionsTaken tab:

void main()
{
AddHenchman(GetPCSpeaker(), OBJECT_SELF);
}

You can do other things and probably should but this is VERY rudimentary. I suspect with just this you'd come into players being able to hire multiple henchmen if you don't check for that and other fun stuff.

In the Scripts tab for your henchman put these scripts in from top down...

nw_ch_ace
nw_ch_ac3
nw_ch_ac4
nw_ch_ac6
nw_ch_ac7
nw_ch_ac8
nw_ch_ac1
nw_ch_ac2
nw_ch_ac5
nw_ch_aca
nw_ch_ac9
nw_ch_acb
nw_ch_acd

I didn't look at what exactly these do yet, but I intend to eventually.

Again, this is VERY rudimentary and quite flawed, but when I hired my little gnome wizard and then went against some critters he did in fact use his spells then move in to melee (which really isn't wise for a wizard but hey he's a gnome).

/em hides from Glip and the rest of the gnome resistance

Hope it helps, I'll post more as I discover it.
illitrit

Also for anyone interested in seeing what strange things I've done I setup a MP server when I'm doing work during the day anyone from here is welcome to snoop around and if they see me in there (Ander Steel normally) say hi and ask how I did any particular thing. Also to the developers of the official safehouse server if you would like any assistance with it especially in the scripting department give me a yell I'd be happy to help.

Server: 68.34.51.168:5121
Type: Role-Play
Password: Safehouse
Server Name: A bar of sorts
max players: 16

Edited by: illitrit at: 6/27/02 2:28:40 am

EZ_kiyotee
06-27-02, 09:07 AM
thanks again illitrit I'll drop the script in when I get home tonight.

How late will your server be up? I may be out of work early today for a change so I will have to pop in and explore.

EZ_illitrit
06-27-02, 11:11 AM
I'm not sure how long or when it'll be up at any given time but if you want to check it out drop me an ICQ (30779889) or MSN (illitrit@hotmail.com) and if ya see me I can bring it up :)

I keep forgetting to play the single player campaign because I get caught up in playing with the toolset :)

illitrit

EZ_kiyotee
06-27-02, 11:14 AM
hehe same here ill, I got as far as someone attacking the acadamy thing before I ewnt off and decided tinkering is more fun.

Kroe
07-03-02, 09:08 AM
ok next question, how did you get the potions of lyconthropy to work? I can't seem to figure out how you did it! 1 Crow bad news
2 Crows myrth
3 Crows a wedding
4 Crows a birth
5 Crows for riches
6 Crows a thief

EZ_illitrit
07-03-02, 09:48 AM
The potions themselves are applied in the 'activate' event for the module because they use the effect of 'Unique Power self only' (though I suppose you could do it for just one area too). Basically all they do is set a couple of localints on the player. **See note below about potions

The shapechange at night and morning is applied via the onheartbeat scripts for the module (again area would work too I'm sure).

If knowing where the scripts occur isn't enough just lemme know :)

I can put up the latest copy of the module if you want Kroe, it's now about 2.5MB and includes a bunch of merchants, a PvP arena (which announces when players enter and leave to it's current occupants), a Level fairy (she power levels the player 1 level at a time giving gold and xp, I did not write this script but it works nicely), an incinerator (an object you put items in and when you close it the firebreathing penguin named Fluffy comes over and flames it, destroying the objects you placed in it), useable chairs, and a few other odds and ends.

** Note on custom potions: Currently for custom potions the do NOT work if the PC only has 1 in his stack because the potion object is destroyed before the 'onactivate' script can grab the name and apply the effects, however if the PC has 2+ in the stack it works fine ... so a stack of 10 gives the PC 9 uses. Bioware is aware of this but I dunno if there's plans to fix it.

illitrit

My little bar/arena module is up for public use sometimes as the following...
Category: Role Play
Name: A Bar w/ PvP Arena and shops
normally no password

Kroe
07-03-02, 09:51 AM
yeah please do put it up. I tried getting the file last time, but it kept erroring and saying it wasn't there. how did you make people sit in chairs anyway? was tinkering with the on use command on the chairs and haven't gotten it yet.

EZ_illitrit
07-03-02, 12:04 PM
The latest version as of now can be found at illitrit.die.org/nwn/ it has been renamed to Bar-n-Arena.mod so as not to offend the official Safehouse mod makers.

illitrit

edit: fixed link, for real this time. Edited by: illitrit at: 7/3/02 1:06:14 pm

braincandy99
07-03-02, 12:08 PM
FYI, Winzip compresses the .MOD files very nicely

EZ_illitrit
07-03-02, 01:28 PM
hehe oops

I forget these things on small files ever since I got cable internet. I'll zip it up and upload it :)

illitrit

Edit: hah from 2.6Mb to 479kb :) Edited by: illitrit at: 7/3/02 2:31:42 pm

Kroe
07-03-02, 01:49 PM
wow that's alot easier hehe I'll try to download it when I get out of work tonight. thanks Illitrit.