Flamin_Squirrel Posted May 28, 2020 Posted May 28, 2020 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.
Phantom_Mark Posted May 28, 2020 Posted May 28, 2020 +1 nice idea, save it to a history file would be nice.
PravusJSB Posted June 1, 2020 Posted June 1, 2020 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
Haptor Posted June 1, 2020 Posted June 1, 2020 I think you can get them from the debrief in single player and log file in multiplayer
Pikey Posted June 1, 2020 Posted June 1, 2020 it's returned in event data, but unfortunately partial info so it can be picked up incorrectly. I believe it's been asked for the event to be more detailed. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
trampi Posted June 11, 2020 Posted June 11, 2020 (edited) 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 June 14, 2020 by trampi
Jagohu Posted November 11, 2020 Posted November 11, 2020 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)
Grimes Posted November 12, 2020 Posted November 12, 2020 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
SNAFU Posted March 11, 2021 Posted March 11, 2021 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
Vettefan Posted March 13, 2021 Posted March 13, 2021 Also very interested in a download feature / landing score log file or alike.
Recommended Posts