Game Development Community

TorqueScript: Sending chat messages to a file

by Aaron E · in Torque Game Engine · 11/12/2005 (1:18 pm) · 4 replies

Hello all,

I'm looking for a way to create an external file and append chat contents to it as they occur. It should work a lot like the console logging process, except that it would create a transcript of all in-game chat messages.

In the Garage Games site search, I've tried 'chat log', 'chat transcript', 'chat to external file', etc. but still no luck.

Has anyone done this already and if so, how did you accomplish it? I would love to do this from script, but if I need to make engine changes, then I'll give it a try. Here are the things I've investigated so far.

In script, I've looked at message.cs, messageHud.cs, consoleDlg.gui. It seems like the best place to initiate the text chat append process is from the eval section of messageHud.cs but I'm not sure how I would do that.

In the code, I've looked at consoleLogger.cc/h and a few other files for inspiration, but that just gets me more confused. Aside from a few minor successes, I'm still very new to the Torque code.

Any help would be greatly appreciated.

By the way, I'm using the 1.4 codebase on Windows XP.

Thanks in advance

[edit: typo]

#1
11/12/2005 (1:32 pm)
Well i don't know how/where the chat messages are displayed. But.....
tdn.garagegames.com/wiki/TorqueScript_FileObject can show you how to do the actual saving.
#2
11/12/2005 (2:06 pm)
Hello,

Thank you for your reply. Yes, it looks like this will help. Best of all, it looks like it should be simple to implement, even for me. :) I'll give it a try and see what happens -- and I'll post the results if anyone is interested.

Thanks again
#3
11/12/2005 (2:16 pm)
It is simple. But I'm not sure you want to append to it on the fly, it would be alot more effective to save it down when the chat is done, or at a timestamp.
#4
11/12/2005 (5:18 pm)
Hi Stefan,

Thanks for taking a look at this. However, I'm not sure why it would be bad to append at each eval. It's probably something basic, but I don't have a clue.

Thanks

[edit: typo]