Jump to content

LSO score output?


Flamin_Squirrel

Recommended Posts

Hello,

 

Please bare with me as I'm a bit of a LUA noob; has anyone found out how (if indeed it's possible) how to output landing scores issued by the LSO? I can't find anything documented, but that might be because it's quite new.

 

Ultimately I'm looking to record scores to a file.

 

Thanks.

Link to comment
Share on other sites

it looks to me like the messages from the LSO are coming directly from the C/C++ VM and not Lua. At the minute there's no way they can be amended/saved/altered unless you start hooking onto the GUI functions. I've not looked super hard at it so I may be wrong though.

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

Link to comment
Share on other sites

  • 2 weeks later...

Hi! For everyone else struggling with this:

 

 

 

_stats.eventHandler = {
   onEvent = function(self, e)
       if e.id == world.event.S_EVENT_PLAYER_COMMENT then
           -- todo: your code here
       end
   end
}


world.addEventHandler(_stats.eventHandler)

e contains an Event like this:

 

{"comment":"LSO: GRADE:C : _FX_  _LOIC_  _PIC_  _PPPIC_  _LOAR_  WIRE# 1 _EGIW_ [bC]","id":22,"time":28897.379}

You can use this and couple it time-wise with the normal landing event to get information about who did the landing.

 

 

I have no good statistics yet, but in my first tests the player_comment-Event was dispatched maximum 2 seconds after the landing event.

Edit: And sometimes the landing event is dispatched after the LSO grading

 

 

 

Be sure to check that the comment starts with "LSO: ".

 

 

More information here:

 

https://wiki.hoggitworld.com/view/DCS_event_player_comment

 

 

EDIT:

Waveoffs are a bit hard, because one can not reliably connect them to individual players / units. I've asked an ED programmer if we could add the unit id / player id to this event. Should I get an answer I'll add it here.


Edited by trampi
Link to comment
Share on other sites

  • 4 months later...

Good one, thanks!

 

For others who come across this later, don't forget to define the variable _stats in the beginning of the script, otherwise it will throw an error.

 

_stats = {};

_stats.eventHandler = { 
[indent]onEvent = function(self, e) if e.id == world.event.S_EVENT_PLAYER_COMMENT then[/indent]


 [indent=3]-- todo: your code here[/indent]
 [indent=2]end[/indent]
 

[indent]end[/indent]



}
world.addEventHandler(_stats.eventHandler)

Link to comment
Share on other sites

At somepoint this will change. There is a dedicated LSO score event that will eventually be added.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 3 months later...

Are there any news on this? 

 

Does this event still has only limited information  and not even an initiator?

 

https://wiki.hoggitworld.com/view/DCS_event_player_comment

[sIGPIC][/sIGPIC]

 

Unsere Facebook-Seite

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...