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  Chat Commands System (Table-based)
Author  ScottyB
Submitted / Updated  03-02-2009 / 03-02-2009
Category  Scripting routines
Expansions  NWN-1.69
View Code  

Select All Text | View Code in separate window
Format  Module and Code
Type  Type - Event
Includes  Custom
Description
This system lets you organize your chat commands, easily adding or disabling commands without having to compile the whole system because of a few little changes.
Of note, only the server needs the 2DAs, and they can be in the override directory; they do NOT need to be distributed in a hakpak. (My demonstration module only does this to keep its resources together.)
There are two demos of the command processor, one showing use with OnPlayerChat and one with the NWNX chat plugin. The 2DAs and other scripts used are the same, making chat commands compatible regardless of how you retrieve chat.
Also available are some sample tables awaiting your commands, and erfs for quickly setting up OnPlayerChat or NWNX versions of the system.
chat_tables.2da
This table helps you break up chat commands based on common prefixes.
All commands are assumed to begin with "/" and if a command matches none of the prefixes, then index 0 (default) is the assumed "prefix".
chat_*.2da
Referenced by the chat_tables 2DA, this indicates what local variables to set on the speaker for use in what script.
The code box shows how to set up an example command. The demo shows off some simple commands, including an echo and a dice roller.
Concerns:
Obviously, each command will end up with its own script. Some builders feel that this is bloat, however, it keeps each command independent of all other commands. They don't share dependencies and bugs in one command can't result in problems for another command. It also makes it easier to look up where a command is implemented, as well as import specifically desired commands from a compatible package without having to delete lines of code.

Files

NameTypeSizeDownloads
chat_tables.erfchat_tables.erf
Submitted: 03-02-2009 / Last Updated: 03-02-2009
erf11.61Kb66
ERF of inc_chat_tables and mod_player_chat (OnPlayerChat script) for easy import and use
chat_tables_nwnx.erfchat_tables_nwnx.erf
Submitted: 03-02-2009 / Last Updated: 03-02-2009
erf17.18Kb71
ERF of inc_chat_tables, chat_script, and related dependencies (dumbo's listener) for import and use with NWNX chat plugin 0.3.4 and up
chat_demo.zipchat_demo.zip
Submitted: 03-02-2009 / Last Updated: 03-02-2009
zip9.48Kb108
Demonstration of command processing using OnPlayerChat event
chat_demo_nwnx.zipchat_demo_nwnx.zip
Submitted: 03-02-2009 / Last Updated: 03-02-2009
zip11.4Kb96
Demonstration of command processing using NWNX plugin and modified default chat_script
sample_tables.zipsample_tables.zip
Submitted: 03-02-2009 / Last Updated: 03-02-2009
zip0.53b106
Sample chat_tables.2da, chat_default.2da, and chat_commands.2da to get you started; you can copy and rename chat_commands to chat_emotes, for example, to organize your emote chat scripts.
SCORE OUT OF 10
10
1 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
No Images




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

Posted by Coolty3000 at 2009-03-02 15:42:09    Voted 10.00 on 03/02/09
Excellent

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 Models


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