PDA

View Full Version : IL-2 Sturmovik 1946 chat log



MichaelM05301
06-14-2008, 09:17 PM
Hello,

Does anyone know how to increase the rate that the chat text is written to the log file (in IL-2 Sturmovik 1946)?

I wrote an application that displays the chat text on a second monitor (in a multi-monitor system). The reason for this application is to increase the number of lines in the chat history that can be viewed without taking up valuable screen space in the game. Unfortunately the chat text is not written to the log file in anything close to real time.

It would be nice if I could have the chat text written to the log file as soon as it is received.

Thanks,
Michael

MichaelM05301
06-14-2008, 09:17 PM
Hello,

Does anyone know how to increase the rate that the chat text is written to the log file (in IL-2 Sturmovik 1946)?

I wrote an application that displays the chat text on a second monitor (in a multi-monitor system). The reason for this application is to increase the number of lines in the chat history that can be viewed without taking up valuable screen space in the game. Unfortunately the chat text is not written to the log file in anything close to real time.

It would be nice if I could have the chat text written to the log file as soon as it is received.

Thanks,
Michael

general_kalle
06-15-2008, 05:48 AM
if you open the chatbox and drag the buttom line you can make it bigger and allow multiple lines of text to appear. i've got 4

MichaelM05301
06-15-2008, 10:04 AM
Thank you for your replay.

I am already aware of this. My goal is to display the chat text outside of the game on a second monitor. Where I can display 20 or more lines of chat without obscuring any of the in game display area.

I already have the program working. The issue is that IL2 writes the chat text to the log file rather infrequently. Thus it shows up in my application rather infrequently.

Michael

Mhondoz
06-15-2008, 02:49 PM
Hi Michael.

I too would be intrested in this, for my IL2G15Score program. I am using the log file to extract stats (and also chat, only four lines though), from the game that is displayed on the LCD of the G15 keyboard.

I am using two approaches to catch changes in the log file, a timer that checks every 5-10 seconds, and a "file watcher" that is activated when the file system detect changes to the file. Still, it usually takes 10 to 30 seconds from an event in the game to it reaches the logfile...

MichaelM05301
06-15-2008, 04:43 PM
What I have discovered thus far.

It appears that IL2 writes to the log file when an internal buffer is filled. The rate at which this buffer is filled is dependent on the amount of text begin buffered.

So you can increase the rate are which information is written to the log file my increasing the rate at which information is requested, and/or increase the amount of information requested. Unfortunately this also increases the rate at which the log file grows.

Not a very efficient means of doing business.

I also notice a pause in the game when the log buffer is being updated. Not good when your in the middle of a dog fight.

Mhondoz
06-16-2008, 03:58 PM
Intresting.

For my program I use the rcu file to repeatedly call user STAT in the game console, at an interval of 10 seconds for example. If you are on a server with many players that could be pretty much text. This may explain why I have had a hard time testing when running a server and being the only player ;-) (less text, less frequent updates to the log).

I totally agree that this is not very efficient. A better model would be to have access to such data from the game like for example the DeviceLink API. Hopfully something like that could be developed for the next generation of the game (SOW).

MichaelM05301
06-16-2008, 04:38 PM
Well I have learned a bit more.

The log file is written when an 8k buffer is filled, or when it is closed (which ever occurs first).

I am using two rcu script files to ping-pong between two log files that are alternately updated every five seconds. The rcu files are as follows

stats1.rcu, contains

user STAT
console LOG off
console LOGFILE r:\log1.lst
console LOG on
timeout 5000 file stats2.rcu

stats2.rcu, contains

user STAT
console LOG off
console LOGFILE r:\log2.lst
console LOG on
timeout 5000 file stats1.rcu

each script starts by requesting user STATs, closing the previously opened log file (log1.lst or log2.lst), selecting the alternate log file, turning logging on and scheduling the other script file to execute in 5 seconds. stats1.rcu schedules stats2.rcu to run, and stats2.rcu schedules stats1.rcu to run. Thus the ping-pong effect.

So each time one of the scripts is run the buffered log data is flushed to the previously selected log file.

I have my application watch for the files to be modified and in a non-zero size (opening the log file sets its size to zero). When the log file is closed its size becomes non-zero. As well as its modified time getting updated to the time it was closed.

I also set up a RAM drive to reduce the overhead of logging console text to a file. This is why the log file names start with r:\. But the IL-2 directory could be used by simply removing the drive designator.

The process of logging is started by running stat1.rcu.

Hope this makes sense and is of use to you.

Tully__
06-17-2008, 03:18 AM
Ingenious! http://forums.ubi.com/images/smilies/25.gif

Mhondoz
06-18-2008, 04:39 AM
Very clever! :-)

I might try this sometime. Thank you for the tip.