Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Introduction to the SSGM 4.0 TCP Logging System
Introduction to the SSGM 4.0 TCP Logging System [message #434694] Fri, 13 August 2010 06:49 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
This topic is intended for bot developers who are interested in supporting SSGM 4.0, which will be released as part of the scripts.dll 4.0 project.

Introduction

The file based logging system under previous versions of SSGM is no longer supported and bots which rely on the ability to read ssgmlog and gamelog files will no longer function correctly. However the renlog files will still be created to allow some limited compatibility with older bots.

Instead, SSGM 4.0 supports a new type of logging which server owners based on a TCP connection between the bot and the server. Once connected to the server bots will receive a steady stream of log messages through the connection.

In order to ease the process of updating bots to the new SSGM logging system it was decided to implement the existing ssgmlog and gamelog messages into the new system in the same format as they used in the old file based logging system. This means that bots can simply point messages to existing parsing procedures without having to significantly rewrite their log handling code.




Protocol

The logging protocol is extremely simple. The first three characters if each message sent through the protocol are digits between 0 and 9 which indicate the message type. The remainder of the message is the log entry. Each message is terminated with the NULL character (0x0).

There are 4 built in message types;
000 - SSGM log messages
001 - Gamelog messages
002 - Renlog messages (a copy of everything written to the renlog files)
003 - Console Output (a copy of everything written to the console, basically a copy of 002 without timestamps)

Here are some examples of messages a bot might receive through the TCP connection;

001[14:06:20] POS;VEHICLE;1500000126;GDI_Ceiling_Gun_AGT;-66;21;9;0;100;100

001[14:06:21] POS;SOLDIER;1500000206;CnC_GDI_MiniGunner_0;-12;27;0;179;100;100

003Total current bandwidth usage for players is 85 kilobits per second

002[14:06:22] Total current bandwidth usage for players is 85 kilobits per second

003Westwood Online mode active since 11/08/2010 - 19:06:54

002[19:18:46] Westwood Online mode active since 11/08/2010 - 19:06:54



Important Note
For reasons which are too complicated to go into at this point the first line of the player_info response (the column headers) is output with a newline character (0xD) at the front of the line. If your bot needs to parse this line and would choke on that character you should use an appropriate function to strip that character out of any messages before forwarding them for parsing.




Configuration
SSGM 4.0 uses a configuration file named ssgm.ini, located in the data folder of the FDS installation. There are two important configuration parameters in this file for the logging system.

[General]
Port=8080
EnableGamelog=true


The port parameter defines the port number on which the server should listen for incoming TCP connections to the logging system and should be different from the RenRem and game ports defined in server.ini. Bots must read the port number from this file (or have it provided to them via config settings) to allow them to connect to the server.

The EnableGamelog option turns the logging system on or off and must be set to true to enable the logging system.




Testing

Right now your probably thinking something along the lines of "yeah, this is great and all, but how can I support something I can't test?". Don't worry, I thought of that problem in advance and have prepared a test server which you may connect your bots to in order to test their handling of the protocol.

Server: 82.11.23.160
TCP Log Port: 37854

You can interact with the test server by joining it (lmsbcdan in WOL or 82.11.23.160:4848 by direct connect) and by joining the IRC channel #tt_ssgm_bottest on irc.n00bstories.com where BRenBot 1.53 is running to help you test your bots responses to the TCP logging information.

Please be aware that this server is for bot testing purposes only and should not be used for normal gameplay... apart from anything else it will probably lag due to being hosted on a fairly slow connection.


Server is now offline due to low demand, if you need the server running again to test your bot(s) please send me a PM and I will load it up again.




More Information / Help

If you need any more information or need help with anything related to this new logging system please reply here or send me a PM on these forums.

Have fun testing!


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sun, 26 September 2010 02:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: January 1 - 2010
Next Topic: Few questions and possible update list?
Goto Forum:
  


Current Time: Sat Nov 09 08:47:53 MST 2024

Total time taken to generate the page: 0.00891 seconds