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  XE-Ryder KoJ's Bar Chatter
Author  XE-Ryder KoJ
Submitted / Updated  09-23-2004 / 11-22-2006
Category  Conversation
Expansions  Works on all versions
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Banter
Includes  None
Description
This is a handy performance based script that causes two NPC's to have a nice chat using occasional voiceset sounds. It belongs in the OnHeartbeat event of One NPC. Place another NPC near enough to look like they could be engaged in dialogue, and you are done! You can customize the chat lines to fit your PW or Mod. You can even use it for dungeon ambience; making two creatures speak whatever tongue they know. This works fine alone or equally well if you have the NPC's sit down in the OnSpawn and ConversationEnd events. Hope it helps! (Updated 12-31-05)

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
9.92
3 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





You Must Be Logged In to Participate.
Comments (17):

Posted by XE_Ryder_KoJ at 2006-12-31 18:34:17    
Hello folks! I still exist, but have been working so much I don't have too much time anymore.

If you have problems with any of my code, give me a shout! I will be happy to help you.

Expect some new coding toys to arrive soon!

_________________________
Lord X E Ryder, Oracle of KoJ
Kindred Oracles of Justice
The KoJ Realm Persistant World

Posted by nux2000 at 2006-10-11 16:26:20    Voted 10.00 on 10/11/06
Excellent

Posted by Jamine at 2005-05-06 14:31:29    Voted 10.00 on 05/06/05
Great script. I tend to make edited copies of it and give it to different NPC types.

Posted by Gomisan at 2004-09-27 07:01:38    Voted 9.75 on 09/27/04

Posted by Gomisan at 2004-09-27 07:01:00    Voted 9.75 on 09/27/04
Turns out I just wasn't hanging around long enough! Might have been a fluke, but the first line of conversation didn't fire until about a minute after I entered the area.

It does work though! So thanks, great script!

Posted by Gomisan at 2004-09-26 23:11:00    Voted 9.75 on 09/27/04
Thanks, I'll have another look at it. I did change Dialogue, so maybe I made a mistake in my tired state.

Yes, I made a Blueprint of the NPC .. I do that for all my NPCs.

Posted by XE_Ryder_KoJ at 2004-09-26 21:41:00    
Also, to answer your questions:

We are trying to get the nearest NPC, which becomes the dialogue partner. So is not a player char, and that is as written.

We bypass the chat sequences on 0 or not value yet set, that is correct, but near the bottom is a iSelfstate++ command to increment that int before we save it, and try again next HB, at which time (on 1) we switch to see if we hit a comment, etc.

Hope that helps :-)

XE-Ryder KoJ
Paladin & Guild Master
Kindred Oracles of Justice
The KoJ Realm Persistant World
_________________________
Lord X E Ryder, Oracle of KoJ
Kindred Oracles of Justice
The KoJ Realm Persistant World

Posted by XE_Ryder_KoJ at 2004-09-26 21:34:00    
Gomisan, Before replying I created a new mod, placed a commoner female and commoner male Then copy and pasted the script from the vault window here into the compiler and saved it as Chatter_hb. I placed this script as a replacement for the commoner females OnHeartbeat handler, and did nothing else.

I ran the mod and they began speaking within 18 seconds or so. Have you edited the dialogue by chance? I am not sure I follow what you said about assigning it to the palette, unless you mean you saved the NPC with that script as a custom creature blueprint. That certainly wouldn't hurt. If the script compiles correctly it should be fine, I would strongly urge not changing any of the delays for math until you see how it works for you.

Some other considerations: If the game calls the same number it returns so they dont sound like broken records, repeating themselves. They are only supposed to talk every other HB. If they are supposed to talk and they hit a dead end switch (which I added to keep them from being too chatty, thus "silence is golden"), they will skip that cycle as well.

Copy paste the script again, make sure nothing fancy is done in some other event handler, and get it running as is. Once it works for you, then go in and make adjustments, perhaps with a backup copy saved, this should prevent any possible headaches.

If for some reason it still does'nt work for you, I will be happy to whip up a one area mod with it running for you to open up in the toolset and game.

XE-Ryder KoJ
Paladin & Guild Master
Kindred Oracles of Justice
The KoJ Realm Persistant World
_________________________
Lord X E Ryder, Oracle of KoJ
Kindred Oracles of Justice
The KoJ Realm Persistant World

Posted by Gomisan at 2004-09-26 11:07:00    Voted 9.75 on 09/27/04
I just tried to use your script in my module, but it didnt actually work.

I placed two NPCs close to each other, made them both members of the same faction, gave one the chat script in her heartbeat and left the other without a HB script. Made sure the script was assigned in the pallete so she was guaranteed to spawn with that script assigned. I then jumped in the game, walked into the bar (empty except for a few placeables, a bartender and my two NPCs) But she never started chating.

Any suggestions? The GetNearestObject function.. is that meant to be "CREATURE_TYPE_PLAYER_CHAR" ? I dont get what that constant aactually means.

Also,
int iSelfState = GetLocalInt(oSelf,"CHAT_STATE");

Would return 0, and hence never execute the chat code. Should it be set on the NPC in the toolset to 1?

Posted by Gomisan at 2004-09-26 06:33:00    Voted 9.75 on 09/27/04
There's actually a nifty script already on the vault which has a halfling and a drunken dwarf involved in some rowdy bar chatter. Weaposn get drawn, potions swigged and so forth. Much like what you're planning.

I can't remeber the name sorry. However, your code looks a LOT tidier than the code in that script, and I'd be happy to use any variations you came up with.


Posted by Jamine at 2004-09-25 04:16:00    Voted 10.00 on 05/06/05
So far I a have been editing the conversation to fit the councilors both on break in the city center, and at work in the office for my campaign module, and I am considering doing four or five additional variations and attributing them to different NPC's around my realm. It's some great stuff which can add depth to any world if used with relevance.
I would just like to say thanks a lot for making this public, and I would like to take back what I said about the delays. I now think that they are perfect!

Posted by Jamine at 2004-09-25 04:16:00    Voted 10.00 on 05/06/05
So far I a have been editing the conversation to fit the councilors both on break in the city center, and at work in the office for my campaign module, and I am considering doing four or five additional variations and attributing them to different NPC's around my realm. It's some great stuff which can add depth to any world if used with relevance.
I would just like to say thanks a lot for making this public, and I would like to take back what I said about the delays. I now think that they are perfect!

Posted by Gomisan at 2004-09-25 02:10:00    Voted 9.75 on 09/27/04
This looks great, I look forward to popping a few chatting NPCs into my bars.

Of course, they could just as easily be hanging around teh town square.

Posted by XE_Ryder_KoJ at 2004-09-24 10:26:00    
Glad you find them useful!

Yes the delays were a head-scratcher - Shorter? Longer? I tried to make it a relaxed convo not to speedy!

I am currently working on a workaround for the ActionSit() command, probably by defining a new function I am calling StageSit(). This will address the endless problem that while you are sitting, you are in the middle of an action loop. You cannot assign another action (like drink) until this is completed - or you get up. So once I DO get around this, we can all finally sit down and have a beer! This was a long day!

I will post it the moment it works right. I am adding a nice barmaid script as well.
XE-Ryder KoJ
Paladin & Guild Master
Kindred Oracles of Justice
The KoJ Realm Persistant World
_________________________
Lord X E Ryder, Oracle of KoJ
Kindred Oracles of Justice
The KoJ Realm Persistant World

Posted by elandys at 2004-09-24 08:26:00    
I was just thinking how much better this would be if we had a drink animation. Wait, we do - the drink potion animation. Maybe this would be a good addition to the flow?

Posted by elandys at 2004-09-24 08:07:00    
Actually, I just saw these in operation last week on the KoJ PW, and it was quite well timed. The pause was long enough that it didn't spam the channel, and short enough to make me wonder if it was an actual PC. A good job all around!

Posted by Jamine at 2004-09-24 06:14:00    Voted 10.00 on 05/06/05
This is absolutely fantastic! The delays seem a tad unrealistic for it to be true natter, but appart from that it's a nice piece of code.

Keep up the good work!

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 Original Hakpaks


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