View previous topic :: View next topic |
Author |
Message |
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Sep 14, 2006 8:16 Post subject: |
|
|
Roo wrote: | That fixed it. Now it just segfaults as soon as it loads though.
Is this one supposed to replace the existing odbc plugin? | Yes. |
|
Back to top |
|
|
EPOlson
Joined: 22 Jul 2006 Posts: 8
|
Posted: Mon Sep 18, 2006 4:27 Post subject: |
|
|
virusman wrote: |
New features in 0.2:
Code: | //Send chat message
//nChannel - CHAT_CHANNEL_*
void dmb_SendMessage(object oSender, int nChannel, string sMessage, object oRecipient=OBJECT_INVALID); |
|
Way slow testing this, but it works fine for what people need most. Here a quick summary of what works and what doesn't. (I am assuming this is the engine, and not any of the code itself)
oSender = NPC:
* private to PC - works
* talk, whisper, shout - works
* party - crash (NPC not in a party?)
(although, if the PC is possessing a familiar, the private message does not seem to work if oRecipient = the familiar, and it crashes if oRecipient is the original PC object)
oSender = object or door
* talk - works
* shout - becomes server message
* party - crash
oSender = module
* shout - works
I have not tested in DM mode yet. But this allows some very interesting thing to be done.... Great work. |
|
Back to top |
|
|
dguntner
Joined: 31 Dec 2004 Posts: 116
|
Posted: Sun Oct 15, 2006 4:19 Post subject: Chat plugin |
|
|
Is there any better documentation available for the chat plugin? In the readme, it has this:
Code: |
NWNX2.ini additions:
--/-/---
[CHAT]
chat_script=some_script # default = chat_script ;)
server_script=some_srv_script # without extension!
processnpc=[0 or 1] # switch NPC speech processing on/off
ignore_silent=[0 or 1] # disable processing of silent talk/shout messages
--/-/---
|
Those first two lines are not too intuitive to me. What triggers "chat_script" and "server_script"? Something within the module, I'm guessing, but I don't know. What scripts should these things point to (inside the module? a shell script?)?
Does this plugin support voice (spoken by the player) emotes? I see references in this threat to SIMTools at the Vault (Windows). Does the documentation for that tool apply to this one in terms of emote commands or other things? Do I import the .erf from there to give me scripts that can be used by this plugin (maybe for "chat_script" and "server_script")?
Any info would be appreciated.
--Dave |
|
Back to top |
|
|
dguntner
Joined: 31 Dec 2004 Posts: 116
|
Posted: Sun Oct 15, 2006 4:38 Post subject: odbc plugin |
|
|
For the Linux odbc plugin, I notice not much in the way of documentation (or a new aps_include to include the functions). Am I correct in guessing that I need to grab the nwnx_odbc2_0924.zip archive here at nwnx.org and use that example .ini file and import that aps2.erf file into the module?
--Dave |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sun Oct 15, 2006 16:48 Post subject: Re: Chat plugin |
|
|
dguntner wrote: | Is there any better documentation available for the chat plugin? In the readme, it has this:
Code: |
NWNX2.ini additions:
--/-/---
[CHAT]
chat_script=some_script # default = chat_script ;)
server_script=some_srv_script # without extension!
processnpc=[0 or 1] # switch NPC speech processing on/off
ignore_silent=[0 or 1] # disable processing of silent talk/shout messages
--/-/---
|
Those first two lines are not too intuitive to me. What triggers "chat_script" and "server_script"? Something within the module, I'm guessing, but I don't know. What scripts should these things point to (inside the module? a shell script?)?
Does this plugin support voice (spoken by the player) emotes? I see references in this threat to SIMTools at the Vault (Windows). Does the documentation for that tool apply to this one in terms of emote commands or other things? Do I import the .erf from there to give me scripts that can be used by this plugin (maybe for "chat_script" and "server_script")?
Any info would be appreciated.
--Dave |
The plugin triggers those two scripts, the first for player (and npc, if you have the correct setting) speech events, and the second for server speech events. SIMTools is just a set of scripts that make use of this plugin. The plugin itself is little more that a new module script event hook, for speech events, and anything to want to do with that hook, you must script, like any other module event. SIMTools is one such script (set of scripts, really, though everything runs through the fky_chat script, which is the script configured to fire on player and npc speech events in the nwnx_chat.ini file). If you want emoted chat text to trigger character actions, for instance, you must either script that yourself or use a system like SIMTools that has scripted it for you. And SIMTools will work just as well for Linux, as you'll see if you read the comments. I simply assumed that anyone running Linux would have the know-how to install it. So's are linked to in this thread, but the scriptset itself is non-platform dependant (I use it on my Linux servers, in fact). Hope that makes things a little bit clearer.
Funky |
|
Back to top |
|
|
caloup
Joined: 29 Sep 2006 Posts: 59 Location: albi (france)
|
Posted: Sat Jan 13, 2007 7:28 Post subject: could you explain ? |
|
|
Quote: |
The plugin triggers those two scripts, the first for player (and npc, if you have the correct setting) speech events, and the second for server speech events. SIMTools is just a set of scripts that make use of this plugin. The plugin itself is little more that a new module script event hook, for speech events, and anything to want to do with that hook, you must script, like any other module event. |
Sorry but it is not clear for me. Could someone explain how does chat plugin work ? How can i use it ? Because i don' t see any documentation that explain it. Sorry but i don't know SIMTool (i begin to script on nwn2 with nwnx4) |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sat Jan 13, 2007 11:30 Post subject: |
|
|
After installing the plugin, you designate the script you want to fire for speech events, in the chat ini file. In SIMTools that's the fky_chat script. From there, you can do whatever you like. Here's a few helpful hints:
The speaker is OBJECT_SELF:
object oPC = OBJECT_SELF, oTarget;// Speaker = oPC
You can then get the text that was spoken, the speech channel used (shout, party, tell, dm, whisper, or talk), and the target if the message was a tell:
Code: |
/////////////////////////Gather Message and Target Data/////////////////////////
SetLocalString(oPC, "NWNX!CHAT!TEXT", Speech_GetSpacer()); // Query for chattext
sText = GetLocalString(oPC, "NWNX!CHAT!TEXT"); // Get chattext
nChannel = StringToInt(GetStringLeft(sText, 2)); // Get channel
nTarget = StringToInt(GetSubString(sText, 2, 10)); // Target ID - Return value of -1 is no target. IE, not a tell/privatemessage
sText = GetStringRight(sText, GetStringLength(sText) - 12);// Remove Target & Channel Info
if( nTarget != -1 )// Acquire possible target
{
oTarget = Speech_GetPlayer(nTarget);
sLogMessageTarget = "->" + GetName(oTarget) + "(" + GetPCPlayerName(oTarget) + ")";
}
|
You can also suppress the speech by setting this int:
SetLocalString(oPC, "NWNX!CHAT!SUPRESS", "1");
Take a look at the SIMTools scripts if you want specific examples:
http://nwvault.ign.com/View.php?view=Scripts.Detail&id=2993
There's an installation guide on that page as well, that should help.
Funky |
|
Back to top |
|
|
caloup
Joined: 29 Sep 2006 Posts: 59 Location: albi (france)
|
Posted: Sat Jan 13, 2007 15:49 Post subject: |
|
|
thank you for your answer ! I understood now ! Do you plan do do the same tool for nwn2 ?
It seem to be a great stuff... |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Feb 14, 2007 10:53 Post subject: |
|
|
Todo list for NWNX-ODBC2:
- "Character set" setting in .ini file.
- Additional functions with resultsets.
Code: | int nResult = SQLExecDirectR(...);
if(SQLFetchR(nResult))
{
sVar = SQLGetDataR(nResult, 1);
...
int nResult2 = SQLExecDirectR(...);
}
SQLFreeResult(nResult);
| Something like that.
- Make SQLGetData work as in NWNX4. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sun Apr 15, 2007 21:35 Post subject: |
|
|
Wooot! Thank you for the port!
Funky |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Jul 10, 2007 16:35 Post subject: |
|
|
Hmm im using latest win version and have problem with messages sent do DM channel. Chat event script is even not fired. Bug on my side or missing functionality?
It break my system (originally under speech) that sent message "There is not any DM!" if in module wasn't and someone wrote to DM channel. (speech allowed it) _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Jul 10, 2007 23:03 Post subject: |
|
|
And latest version used without NWNX Core 2.7-beta2 crashing nwserver after shutoff it. I don't know if it disable reload but there will be something wrong anyway. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|