PDA

View Full Version : What fires on a Whisper?



zuilin
October 10th, 2020, 23:35
I've got the Whisper system sort of figured out. It's in ChatManager and I can override the function processWhisperHelper to do what I want on the whisper sending side.

What I can't figure out is what fires when a Whisper is received. No amount of overriding the other functions seems to execute my test code when a client or the host receives a Whisper.

Any ideas?

(Incidentally, what does OOB stand for?)

SilentRuin
October 10th, 2020, 23:59
I've got the Whisper system sort of figured out. It's in ChatManager and I can override the function processWhisperHelper to do what I want on the whisper sending side.

What I can't figure out is what fires when a Whisper is received. No amount of overriding the other functions seems to execute my test code when a client or the host receives a Whisper.

Any ideas?

(Incidentally, what does OOB stand for?)

OOB is the messaging system usually used to insure clients can get things executed on the host. Look for "OOB" in the CoreRPG and 5E (or whatever other ruleset you play with) and you'll see messages setup up and sent out to the server (even if the server is the one sending them out). You put whatever info you want to pass in. But you have to remember its a one way trip logic wise and any logic you want has to be within the handler for the OOB message. Really seeing the examples form the message, send the message, and handle the message is the best informative way of grokking this sort of thing.

Keep in mind not all code is visible to us. Some is in in the developers guide and even in FGU itself and we will never see that source. But if your trying to get logic in at the chat level you may have to see if there is something that allows you to put in a handler to intercept all messages to the chat window. I think there is but am not positive. If you can't find an OOB example that explains that part of your question let me know and I'll dig out an example from one of the OOB messages I've used in my own extensions.'

OOBManager Out-of-band message features (i.e. passing data messages)

zuilin
October 11th, 2020, 15:32
OOBManager Out-of-band message features (i.e. passing data messages)


Out of Band. Aha.

And thanks, I'm making progress...

zuilin
October 11th, 2020, 16:39
So the OOB system seems very simple and quite usable for what I want to do. That's good.

After much mucking around I've discovered that overriding the function that gets called by the OOB handler in the ChatManager (handleWhisper) in my extension using the ol' pointer swap doesn't work in this case. I assume it's because registering the handler function is done by pointer the first time it's called in CoreRPG. Obviously, my pointer swap is done after that and so the OOB system is still calling the old function by pointer.

So, all I had to do is re-register the handler for this OOB message type to my own function and it works great.

Wooohooo. Well on my way. Thanks everyone.