Advanced XML - Disable "SHOUTS" from CHAT window without using "ContextMenu" GUI?
#1
Posté 07 mai 2014 - 02:30
Does anybody know if it is possible to briefly stop "shouts" to the CHAT window by somehow using the "UIRadialNode_Mouse_Action_Quickchat_Hide" XML command (or some other), but bypassing the manual contextmenu.xml method?
That is, I want to be able to stop (or hide) "shouts" from reaching the CHAT window without having to use the manual way of doing so that involves right-clicking on the CHAT window and removing the "star" image next to "Include Shouts" from the list.
It seems the UIRadialNode command requires use within the context menu, which in turn must be within the GUI it applies to. Is there any other command I can use that does the same thing, but makes a direct call to the CHAT window from my own GUI?
Thanks in advance,
Lance.
#2
Posté 07 mai 2014 - 02:53
// MAP 3/22/2009 // These are for use in the chat module callback conditional and in // the function SendChatMessage. int CHAT_MODE_TALK = 1; int CHAT_MODE_SHOUT = 2; int CHAT_MODE_WHISPER = 3; int CHAT_MODE_TELL = 4; int CHAT_MODE_SERVER = 5; int CHAT_MODE_PARTY = 6; int CHAT_MODE_SILENT_SHOUT = 14; // MAP 3/15/2009 // This function is used to send a chat message, as if spoken by a PC or by the server. // Except for 'CHAT_MODE_SERVER', oSender must be a PC or nothing will occur. // oSpeaker - the PC who will speak, OBJECT_INVALID if channel is CHAT_MODE_SERVER. This must be a valid PC object for CHAT_MODE_PARTY to work. // oReceiver - if nChannel is CHAT_MODE_TELL or CHAT_MODE_SERVER, then this must be the PC who will be receiving the message. // nMode - CHAT_MODE const indicating the type of message to be sent. Only the CHAT_MODE_* values provided are accepted. // sMessage - actual message text // bInvokeCallback = the module's OnChat script will be invoked to filter this message, if this is TRUE. // WARNING: use extreme caution if setting bInvokeCallback to TRUE from within the OnChat handler itself -- // this could lead to an infinite loop and hang your module! void SendChatMessage(object oSender, object oReceiver, int nChannel, string sMessage, int bInvokeCallback = FALSE);
not sure if you can use this, Lance; but there's a shiny new 2009 function someone at Obsidian added.
The tip for the OnChat module event says:
"Specifies a script to run when any chat message is spoken."
I imagine it might be possible to set a local from your GUI and catch it with the OnChat event before the [SHOUT] gets to chat ... err auh
#3
Posté 07 mai 2014 - 06:39
<SNIP>not sure if you can use this, Lance; but there's a shiny new 2009 function someone at Obsidian added.
The tip for the OnChat module event says:
"Specifies a script to run when any chat message is spoken."
I imagine it might be possible to set a local from your GUI and catch it with the OnChat event before the [SHOUT] gets to chat ... err auh
Hi KevL,
That was an interesting find.
Cheers,
Lance
#4
Posté 07 mai 2014 - 09:33
as i thought about it more, it was misleading of me to put the constants & functions here.
The pt. of it is there's an OnChat event ...
might be something to investigate for the future
edit: but yeh there doesn't appear to be any 'GetChatType()' function ...
#5
Posté 07 mai 2014 - 09:53
as i thought about it more, it was misleading of me to put the constants & functions here.
The pt. of it is there's an OnChat event ...
might be something to investigate for the future
Ah, I see what you mean ... I suspect it would only detect PC "Chat" though, even so.
Lance.
#6
Posté 07 mai 2014 - 10:06
edit2: nor any function that actually stops a message from going through (whatever its origin) -- so, uh, anyone have any idea what the OnChat event can be used for?
I mean, wouldn't it be there to stop the 'naughty bits' ...?
if so, then how
#7
Posté 07 mai 2014 - 10:15
Ah, I see what you mean ... I suspect it would only detect PC "Chat" though, even so.
Lance.
guess you're right : the event appears to be OnPlayerChat in NwN1
#8
Posté 08 mai 2014 - 11:05
guess you're right : the event appears to be OnPlayerChat in NwN1
Oh well,
If you (or anybody else reading) ever manages it, let me know.
Cheers,
Lance.





Retour en haut






