Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2011, 01:54 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default Read Server Chat in Script?

Does anybody know how to access the chat logs from a script? I tried registering a method with the GameDef.Chat delegate, but that doesn't seem to work. Maybe it's for sending messages? Anyway, it would be really nice to be able to read player chat from a script. There's a lot of possibilities there.
Reply With Quote
  #2  
Old 06-24-2011, 10:54 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

I was told that time of writing a server log file was reduced in recent beta. Parsing the log file is one of obvious but not very elegant ways I think.

On the other hand the content of a log file is created by a code that watches for game events and outputs them to logfile. You can write a similar code that would watch game events and output all needed data not to logfile but to your code directly I guess.
Reply With Quote
  #3  
Old 06-24-2011, 11:02 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Hi Ataros, you are right. That would not be a very elegant solution. You are also right that I need some way to listen for the event. Unfortunately, I do not know how to do that. It is easy to override the OnAircraftLanded() method to listen to that event, but there is no OnChat() method or anything similar.
Reply With Quote
  #4  
Old 06-25-2011, 02:18 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

What kind of events do you want to read from chat?
Reply With Quote
  #5  
Old 06-25-2011, 11:03 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

I want to be able to read what players write in the chat bar. I was thinking of making a mission where players could type a command into the chat bar and receive a mission to complete. Maybe ferrying an aircraft from one airbase to another or performing recon over an enemy position. Things like that.
Reply With Quote
  #6  
Old 06-26-2011, 11:11 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
I want to be able to read what players write in the chat bar. I was thinking of making a mission where players could type a command into the chat bar and receive a mission to complete. Maybe ferrying an aircraft from one airbase to another or performing recon over an enemy position. Things like that.
Asked the devs how to do it http://www.sukhoi.ru/forum/showthrea...=1#post1644944

They said before that you can compile a dll with a user interface and it will be downloaded from the server. Maybe it would be easier to make such a dll that would intercept keyboard commands. Then a player would just press a number key to select a line from menu.
Reply With Quote
  #7  
Old 06-27-2011, 12:54 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Thanks Ataros. Hopefully, there's a better way. I don't know anything about WPF.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.