Jump to content

Slmod for DCS 1.5/2.0


Recommended Posts

Yes you have to restart the game.

 

It creates a slmod folder in savedgames/DCS/Slmod. Within there is a file named 'config.lua' . If I create any new setting, then the update will backup your settings as config_old.lua the next time you launch and then create a new config based off the new default.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

So I'm trying to get SLMod installed on our dedicated server, but its running into problems

 

Init part:

2020-01-15 15:59:24.793 INFO LuaNET: SLMOD INIT: Loading Slmodv7_5_116...

2020-01-15 15:59:24.804 INFO LuaNET: SLMOD INFO: using settings defined in C:\Users\Admin\Saved Games\DCS\Slmod\config.lua

2020-01-15 15:59:24.817 INFO LuaNET: SLMOD INFO: ./Scripts/MissionScripting.lua is up to date, no installation required.

2020-01-15 15:59:24.824 INFO LuaNET: SLMOD INFO: SlmodUtils.lua loaded.

2020-01-15 15:59:24.830 INFO LuaNET: SLMOD INFO: SlmodEvents.lua loaded.

2020-01-15 15:59:24.835 INFO LuaNET: SLMOD INFO: SlmodUnits.lua loaded.

2020-01-15 15:59:24.840 INFO LuaNET: SLMOD INFO: SlmodMenu.lua loaded.

2020-01-15 15:59:24.845 INFO LuaNET: SLMOD INFO: SlmodConvMenu.lua loaded.

2020-01-15 15:59:24.850 INFO LuaNET: SLMOD INFO: SlmodPTSMenu.lua loaded.

2020-01-15 15:59:24.854 INFO LuaNET: SLMOD INFO: SlmodPOSMenu.lua loaded.

2020-01-15 15:59:24.861 INFO LuaNET: SLMOD INFO: SlmodAdminMenu.lua loaded

2020-01-15 15:59:24.867 INFO LuaNET: SLMOD INFO: no stats , loading from file: C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats.lua

2020-01-15 15:59:24.875 INFO LuaNET: SLMOD ERROR: unable to load Stats, reason: [string "slmod.stats = slmod.stats or {} -- make table anyway, need it...."]:1: attempt to index global 'slmod' (a nil value)

2020-01-15 15:59:24.879 INFO LuaNET: SLMOD INFO: old SlmodStats.lua file backed up to C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats_BACKUP.lua

2020-01-15 15:59:24.880 INFO LuaNET: SLMOD INFO: no penStats , loading from file: C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodPenaltyStats.lua

2020-01-15 15:59:24.883 INFO LuaNET: SLMOD INFO: using SlmodPenaltyStats.lua as defined in C:\Users\Admin\Saved Games\DCS\Slmod\SlmodPenaltyStats.lua

2020-01-15 15:59:24.883 INFO LuaNET: SLMOD INFO: SlmodStats.lua loaded.

2020-01-15 15:59:24.887 INFO LuaNET: SLMOD INFO: no metaStats , loading from file: C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodMetaStats.lua

2020-01-15 15:59:24.890 INFO LuaNET: SLMOD INFO: using SlmodMetaStats.lua as defined in C:\Users\Admin\Saved Games\DCS\Slmod\SlmodMetaStats.lua

2020-01-15 15:59:24.890 INFO LuaNET: SLMOD INFO: SlmodMetaStats.lua loaded.

2020-01-15 15:59:24.896 INFO LuaNET: SLMOD INFO: SlmodAutoAdmin.lua loaded.

2020-01-15 15:59:24.901 INFO LuaNET: SLMOD INFO: SlmodPingCheck.lua loaded.

2020-01-15 15:59:24.906 INFO LuaNET: SLMOD INFO: SlmodVote.lua loaded.

2020-01-15 15:59:24.913 INFO LuaNET: SLMOD INFO: SlmodLibs.lua loaded.

2020-01-15 15:59:24.917 INFO LuaNET: SLMOD INFO: SlmodDebugger.lua loaded.

2020-01-15 15:59:24.921 INFO LuaNET: SLMOD INFO: SlmodMOTD.lua loaded.

2020-01-15 15:59:24.925 INFO LuaNET: SLMOD INFO: SlmodHelp.lua loaded.

2020-01-15 15:59:24.930 INFO LuaNET: SLMOD INFO: SlmodCallbacks.lua loaded

2020-01-15 15:59:24.936 INFO LuaNET: SLMOD INFO: SlmodTests.lua loaded.

 

And once the mission is loaded, this bit below gets spammed every few seconds.

 

2020-01-15 16:03:13.262 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.basicSerialize) function into export.

2020-01-15 16:03:13.263 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.serialize) function into export.

2020-01-15 16:03:13.263 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.oneLineSerialize) function into export.

2020-01-15 16:03:13.263 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.serializeWithCycles) function into export.

2020-01-15 16:03:13.263 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.deepcopy) function into export.

2020-01-15 16:03:13.264 INFO LuaNET: SLMOD INFO: successfully loaded (name = slmod.tableshow) function into export.

2020-01-15 16:03:13.265 INFO LuaNET: SLMOD INFO: using banned ucids and/or ips as defined in C:\Users\Admin\Saved Games\DCS\Slmod\BannedClients.lua

2020-01-15 16:03:13.265 INFO LuaNET: SLMOD INFO: using server admins as defined in C:\Users\Admin\Saved Games\DCS\Slmod\ServerAdmins.lua

2020-01-15 16:03:13.265 INFO LuaNET: SLMOD INFO: load exempt clients

2020-01-15 16:03:13.265 INFO LuaNET: SLMOD INFO: using exempt ucids as defined in C:\Users\Admin\Saved Games\DCS\Slmod\ExemptClients.lua

2020-01-15 16:03:13.288 INFO LuaNET: SLMOD INFO: successfully loaded unitAttributes.

2020-01-15 16:03:13.289 INFO LuaNET: SLMOD INFO: no stats , loading from file: C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats.lua

2020-01-15 16:03:13.291 INFO LuaNET: SLMOD ERROR: unable to load Stats, reason: [string "slmod.stats = slmod.stats or {} -- make table anyway, need it...."]:1: attempt to index global 'slmod' (a nil value)

2020-01-15 16:03:13.291 ERROR VFS: VFS_open_write: CreateFile(C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats_BACKUP.lua): The process cannot access the file because it is being used by another process.

 

2020-01-15 16:03:13.292 INFO LuaNET: SLMOD ERROR: Unable to create stats backup file, could not open file: C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats_BACKUP.lua

2020-01-15 16:03:13.292 ERROR VFS: VFS_open_write: CreateFile(C:\Users\Admin\Saved Games\DCS\Slmod\\SlmodStats_BACKUP.lua): The process cannot access the file because it is being used by another process.

 

Any idea what I did wrong? The path that has the double \\ looks suspect, but I haven't touched anything after downloading from Github

Link to comment
Share on other sites

Check the slmod folder to see if the SlmodStats.lua file is present and if it has a table that looks like:

stats = 
{
}

 

I find it odd that it is able to load the other stat files just fine but the main stat file is corrupted somehow. Might have to delete the slmodStats.lua and slmodStats_BACKUP.lua files to fix it. Or send over the file and let me see if I can replicate the issue or fix any corruption.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

I've now tried with both the Master branch and Develop branch and both do the same.

 

Both create the SLmodStats.lua file, and they create a new one every time I run the instance. The same logpasta gets spammed every update tick

 

 

This is a snippet of what the SLmodStats file has in it at the moment

 

 

 

stats =

{

["host"] =

{

["friendlyCollisionKills"] =

{

}, -- end of ["friendlyCollisionKills"]

["id"] = 1,

["friendlyHits"] =

{

}, -- end of ["friendlyHits"]

["names"] =

{

[1] = "host",

}, -- end of ["names"]

["kills"] =

{

...

...

...

 

https://www.dropbox.com/sh/tohepvfb62d8c1e/AABTnSsDMMwOSjiPKDKRvxMqa?dl=0

 

Here are four copies of the stats file from yesterday and this morning. The most recent one looks like its built correctly, but the log file still spams that it can't be accessed because its open in another application, but I hadn't even opened it, nothing is looking at the file as far as I can tell. Right now the current slmodstats file looks the same whether I use Master or Develop

Link to comment
Share on other sites

Full log gave a clue. It looks like it is loading slmod twice.

 

2020-01-16 06:35:36.295 INFO    LuaNET: SLMOD INIT: Loading Slmodv7_5_106...

2020-01-16 06:35:36.330 INFO    LuaNET: SLMOD INIT: Loading Slmodv7_5_106...

 

Check \Scripts\hooks folder. There should be only one slmodGameGUI.lua file. If there is only one then check the contents of the files in that folder and make sure only one has a bunch of lines that load the slmod files like this

dofile(lfs.writedir() .. 'Scripts/net/Slmodv'  .. loadVersion .. '/SlmodConfig.lua')

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Got it working. Turns out, before I took over management of the server, SLmod was installed at some point and the slmodGameGUI.lua file plus net scripts were placed in the DCS installation directory, instead of \Saved Games.

 

Weirdly enough, there is no trace of those slmod files even being loaded in old logs. So it only gets started when I installed the script in the User/Saved Games directory.

 

Thanks for the help

Link to comment
Share on other sites

  • 4 weeks later...

Hi Grimes,

 

 

I'm seeing an issue with SlMod and the WW2 aircraft. See the code below. For some reason, massive numbers of "kills" are being allocated in the "attack" category.

 

 

Do you know if maybe the WW2 assets break SLMoD, or if something else might be causing the over counting?

Also, is it possible to disable the PvP "food chain" for stats collection, and for SLMoD to report all kill stats in raw format?

 

 

    ["543662cc2dac49f4c77c3107eb13d87e"] = 
   {
       ["friendlyCollisionKills"] = 
       {
       }, -- end of ["friendlyCollisionKills"]
       ["id"] = 3,
       ["friendlyHits"] = 
       {
           [1] = 
           {
               ["time"] = 1580582689,
               ["objTypeName"] = "P-51D",
               ["shotFrom"] = "P-51D",
               ["human"] = "94b01ab0bd5dc87d308abbd94f4d948e",
               ["objCat"] = "plane",
               ["weapon"] = "Browning .50 M2",
           }, -- end of [1]
       }, -- end of ["friendlyHits"]
       ["names"] = 
       {
           [1] = "Miro",
       }, -- end of ["names"]
       ["kills"] = 
       {
           ["Buildings"] = 
           {
               ["Other"] = 0,
               ["Static"] = 0,
               ["total"] = 0,
           }, -- end of ["Buildings"]
           ["Ships"] = 
           {
               ["Warships"] = 0,
               ["total"] = 1,
               ["Unarmed"] = 0,
               ["Subs"] = 0,
               ["Other"] = 1,
           }, -- end of ["Ships"]
           ["Planes"] = 
           {
               ["UAVs"] = 0,
               ["Fighters"] = 0,
               ["Bombers"] = 0,
               ["total"] = 1199,
               ["Transports"] = 0,
               ["Other"] = 0,
               ["Support"] = 0,
               ["Attack"] = 1199,
           }, -- end of ["Planes"]
           ["Helicopters"] = 
           {
               ["Other"] = 0,
               ["total"] = 0,
               ["Utility"] = 0,
               ["Attack"] = 0,
           }, -- end of ["Helicopters"]
           ["Ground Units"] = 
           {
               ["Arty/MLRS"] = 0,
               ["SAM"] = 0,
               ["Unarmored"] = 16,
               ["IFVs"] = 3,
               ["AAA"] = 17,
               ["total"] = 50,
               ["Other"] = 0,
               ["EWR"] = 0,
               ["Tanks"] = 1,
               ["APCs"] = 13,
               ["Forts"] = 0,
               ["Infantry"] = 0,
           }, -- end of ["Ground Units"]
       }, -- end of ["kills"]
       ["losses"] = 
       {
           ["pilotDeath"] = 0,
           ["crash"] = 3,
           ["eject"] = 0,
       }, -- end of ["losses"]
       ["times"] = 
       {
           ["P-51D"] = 
           {
               ["total"] = 107783.706,
               ["inAir"] = 83333.901,
           }, -- end of ["P-51D"]
           ["P-51D-30-NA"] = 
           {
               ["total"] = 110.061,
               ["inAir"] = 0,
           }, -- end of ["P-51D-30-NA"]
       }, -- end of ["times"]
       ["PvP"] = 
       {
           ["losses"] = 0,
           ["kills"] = 1179,
       }, -- end of ["PvP"]
       ["weapons"] = 
       {
           ["Browning .50 M2"] = 
           {
               ["kills"] = 1245,
               ["shot"] = 30442,
               ["hit"] = 0,
               ["gun"] = true,
               ["numHits"] = 2189,
           }, -- end of ["Browning .50 M2"]
           ["AN-M64"] = 
           {
               ["numHits"] = 47,
               ["kills"] = 5,
               ["shot"] = 28,
               ["hit"] = 0,
           }, -- end of ["AN-M64"]
           ["HVAR"] = 
           {
               ["hit"] = 0,
               ["kills"] = 0,
               ["shot"] = 6,
               ["numHits"] = 4,
           }, -- end of ["HVAR"]
       }, -- end of ["weapons"]
       ["friendlyCollisionHits"] = 
       {
       }, -- end of ["friendlyCollisionHits"]
       ["friendlyKills"] = 
       {
       }, -- end of ["friendlyKills"]
   }, -- end of ["543662cc2dac49f4c77c3107eb13d87e"]


Edited by philstyle

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

Its a bug caused by a object's death not being cleared. It'll run through enough of the stats code to add a kill but somewhere along the line something happens and it fails to erase the fact that the object was hit. So the game sees the object is dead, checks the recent hit information, and adds a new kill repeatedly.

 

 

Is it possible to disable PvP logging? Sure, but I haven't coded it to. I've had some thoughts of adding more options in the details of the stats and simply ignoring any PvP action could be one of those settings.

 

 

In terms of "raw stats" I'm not entirely certain what you mean. There is an option to save the events to a text file, but it gets reset on each mission change, and its the log of events the majority of slmod uses to build the stats information. Or were you thinking something along the lines of instead of adding 1 to the type of object killed its something more detailed? Like:

 

[killIndex] = {timeOfKill, weapon, aircraftType, targetType}

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Sorry Grimes, maybe I wasn't very clear or I mis-understood something.

 

Section 5.4 of the SlMod PDF (see image below) says that certain PvP kills do NOT get awarded if the claimant is higher up the food chain than the destroyed aircraft.

This is what I would like to disable if possible. I would like all air to air kills to be awarded, irrespective of aircraft type and whether it was PvP, or PvE.

That's what I mean by showing the "raw" stats. I mean, awarding all kills, and bypassing these "food chain" kill rules.

 

Can that be disabled?

I looked through the various .lua files but couln't find the file/section that seemed to be controlling this "food chain" awards system.

 

LbnpFUj.png

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

This segment of code hasn't been updated in a really long time, well in the sense of the units considered for the food chain. The attack aircraft it checks for are only the A-10A/C and Su-25A/T. It is a bespoke list of certain aircraft types and is not derived automatically.

 

The way it works is the PvP stats is an additional counter. Whenever you destroy any target it gets added to the kills list regardless if it was AI or players and at present basically the last person to hit it gets the credit. Once that gets tallied it will then do an additional check if it happens to be a PvP kill according to those rules and add it there if valid. In general its a very simplified stat because all it really tells you is sorta how many of the kills were against players and how many were "fair" in a sense. I should probably add an option to enable or disable it.

 

 

The WW2 aircraft do throw a wrench into things however because that categorization is done automatically based on attributes belonging to the object. There are exceptions to this, which I found when looking for an answer to your question, but those exceptions haven't been updated in a really long time. In general as long as a object has attributes then slmod will figure out where it belongs in the categories. The problem with the WW2 fighters specifically is that they don't have a "fighter" attribute, so it thinks they are attack aircraft.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

The WW2 aircraft do throw a wrench into things however because that categorization is done automatically based on attributes belonging to the object. There are exceptions to this, which I found when looking for an answer to your question, but those exceptions haven't been updated in a really long time. In general as long as a object has attributes then slmod will figure out where it belongs in the categories. The problem with the WW2 fighters specifically is that they don't have a "fighter" attribute, so it thinks they are attack aircraft.

 

 

Hi Grimes, not sure if this is an SL-MoD issue, or a DCS isue, but Aerial victories (kills) don't seem to be getting counted at all by the SLmod stats right now, since the 2.5.6 patch.

 

DCS is definitely allocation Aerial victories in sim though, but the SL-Mod "kill" column is not being populated.


Edited by philstyle

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

Turns out the events Slmod was latching onto changed in 2.5.6. Fixed it and added a few things that were already in the pipeline. The WW2 stats still need to be worked on.

 

https://github.com/mrSkortch/DCS-SLmod/commit/4b7bd5bd40d5567b534095670b5af9564dea6705

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hey all, new server admin here. I have slmod working and I am really impressed. I hope that I can contribute to this project in some way going forward.

 

I am working on a stats page now. I am currently reading each of the stats files with dofile() then serializing the output into json and storing the json files in AWS s3 every 5 minutes or so, which works great. It will making writing a single page js based web app with those stats pretty easy.

 

But I'd like to capture who killed whom and display that on the web page as well... That information isn't in the slmod stats that I can see, and I'm not sure where to find that information. Can anyone point me in the right direction?

 

Thanks!

 

- Sockeye

Link to comment
Share on other sites

But I'd like to capture who killed whom and display that on the web page as well... That information isn't in the slmod stats that I can see, and I'm not sure where to find that information. Can anyone point me in the right direction?

Thanks!

- Sockeye

 

What we're doing is using a pythgon converter to turn the SLmodstats.lua into html.

https://splash.readthedocs.io/en/stable/internals/js-python-lua.html

 

Once the html is built,t hen you can parse it for the data you want and upload it to your site.

 

I don't know the nuts and bolts of how this is done, as I'm not involved int he coding. But it's all a bit of a ball-ache to get it working.

 

It's a pretty complicated affair to be honest, and not well documented. One thing I've noticed is that DCS server operators seem rather reticent to share how they are generating and posting stats. Everyone seems to be re-inventing the wheel from scratch each time.

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

What we're doing is using a python converter to turn the SLmodstats.lua into html.

Thanks philstyle.. I think I have a good (and simple) way to read the Slmodstats.lua file and produce json files that are easy for javascript to use.. But from what I can tell, the slmodstats.lua doesn't contain information about who killed whom.. Lots of GREAT things about number of kills, deaths, with which weapon etc. Just nothing (again that I can see) about who killed whom.

 

Are you you guys getting who killed whom from the slmodstats.lua (and I am blind) or is it coming from somewhere else in DCS? Thanks for your help! (love your videos too!)

 

I'll likely open source whatever I come up with.. Whether it is useful to others or crap. :-)

Link to comment
Share on other sites

Turns out the events Slmod was latching onto changed in 2.5.6. Fixed it and added a few things that were already in the pipeline. The WW2 stats still need to be worked on.

 

https://github.com/mrSkortch/DCS-SLmod/commit/4b7bd5bd40d5567b534095670b5af9564dea6705

 

Awesome! thanks Grimes.

I'll keep an eye on updates. Let me know if you need any help with WW2-related stuff/ testing etc.

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

Thanks philstyle.. I think I have a good (and simple) way to read the Slmodstats.lua file and produce json files that are easy for javascript to use.. But from what I can tell, the slmodstats.lua doesn't contain information about who killed whom.. Lots of GREAT things about number of kills, deaths, with which weapon etc. Just nothing (again that I can see) about who killed whom.

 

Are you you guys getting who killed whom from the slmodstats.lua (and I am blind) or is it coming from somewhere else in DCS? Thanks for your help! (love your videos too!)

 

I'll likely open source whatever I come up with.. Whether it is useful to others or crap. :-)

 

Hi, no, we're not getting specific data about who-shot/ killed- who.

Personally I'd love also to be able to attribute shared-kills, but that isn't possible as yet.

We can do this for another Battle of Britian period sim, which is really nice becasue it stops kill-stealing to a degree.


Edited by philstyle

On YouTube: https://www.youtube.com/philstylenz

Storm of War WW2 server website: https://stormofwar.net/

 

Link to comment
Share on other sites

Slmods stats for a long time have been built on the premise of saving data that can be viewed in game, so it purposefully limits the scope of what all is stored. Over the last few months I've gradually added more depth to it. For instance all kills and weapons were "common pool" so that if you dropped a Mk-82 from different aircraft then they'd all add to the same Mk-82 value. It was the same thing with kills. Recently I made a change where it was basically stores it like: Aircraft>Weapons>Kills for more details. I have even more in depth changes where kills are stored with specific object types rather than the main categories they are under, however that is not live yet with some other stats I want to start saving. In a sense tracking specifically who you killed and when is great for websites but not relevant to display as a text message in game, thus it hasn't been tracked.

 

You can turn on "event export" in the config file, which creates a text file of the raw events that slmod uses to build the stats. I'd like to make a change where it exports that on a "per mission" basis so if you wanted to build a website that reads the files to generate the stats then it'd work just fine. ED did add a "kill" event in the 2.5.6 patch that makes it much easier to figure out who killed who.

 

Partial kills is possible since slmod basses the kill off of who last hit a target. It keeps track of all "hits" against a specific target. It is more a question of how to reward it, count it as 0.5 (or whatever appropriate fraction) or 1. And also having to deal with the TK consequences of multiple people hitting a friendly target, usually ships which I need to fix anyway.

 

In general I am getting a little worried over the amount of stuff tracked. The stats file for the Hoggit Georgia at War is pushing 40mb of text that the game loads and saves periodically. So I am wanting to build in options to let you decide how it stores everything and to what details you want.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Grimes, thanks so much for the response and the way you are contributing to the community through this and other projects.

 

Philstyle, I agree on the team kill stats. My server, personal interest and and flying buddies are all about WW2. Attributing team kills would be very cool. I'll see if I can walk first, then run.

 

You can turn on "event export" in the config file

Great! I'll try that, and see if the export can be used for my purposes.

 

Where can a person can read documentation form ED (or anywhere else) on the game interface? Or have people figured out most of this through reverse engineering?

Link to comment
Share on other sites

There is documentation for the server side scripts in DCS World\API\DCS_ControlAPI.html.

 

Slmod is a little different since it isn't 100% using that API for everything. It mods itself into mission scripting for added functionality. Initially it was to just tap into the scripting engine before it became a proper feature to add some basic scripting capability. For instance for a while the game didn't have the F10 commands work on clients in multiplayer, so slmod added a way to type in chat commands to set flag values. For stats slmod uses this link to build a DB of objects in a mission, object attributes, track stuff like the number of shells fired, and the location of events.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

There is documentation for the server side scripts in DCS World\API\DCS_ControlAPI.html.

 

Holy cow, I didn't even know this existed. Interestingly the OpenBeta dedicated server doesnt have this directory.. Had to go to my full install from my desktop version.

 

Slmod is a little different since it isn't 100% using that API for everything. .... For stats slmod uses this link to build a DB of objects in a mission, object attributes, track stuff like the number of shells fired, and the location of events.

 

Perfect, thanks for the background.. This is just enough information to get me going.

 

And Grimes, the slmod event log looks great! Cant wait to get this working and share with you all

Link to comment
Share on other sites

I upgraded to 2.5.6 DCS server and installed the slmod Pull Request: https://github.com/mrSkortch/DCS-SLmod/pull/47 submitted by mcdelaney that has the fixes for 2.5.6.

 

The events log is reporting kills like this:

slmod.events[51] = { ["initiatorPilotName"] = "XXX", ["target_coalition"] = "red", ["targetMissionID"] = 139, ["initiator_z"] = 669000.79254536, ["initiator_y"] = 1316.4016346609, ["numtimes"] = 1, ["target"] = "Pilot #019", ["initiator_name"] = "Pilot #072", ["target_z"] = 669299.54578171, ["initiatorMissionID"] = 130, ["targetPilotName"] = "YYYY", ["type"] = "kill", ["initiator_coalition"] = "blue", ["initiator"] = "Pilot #072", ["initiator_x"] = -285268.19869619, ["t"] = 36744.151, ["initiator_objtype"] = "P-51D-30-NA", ["target_y"] = 130.90810894461, ["target_id"] = 16779011, ["target_name"] = "Pilot #019", ["initiatorID"] = 16780034, ["target_x"] = -285361.24761569, ["stoptime"] = 36744.151, ["target_objtype"] = "Bf-109K-4", ["weapon"] = "", }

 

While the slstats (in json) for the same initiator pilot that got the kill above reports.

Notice the kill count is 171. It should be 1.

 

  "c271d94d2b856553fa4c5b098bdf4e54": {
   "times": {
     "P-51D-30-NA": {
       "total": 1160.455,
       "weapons": {
         "Browning .50 M2": {
           "hit": 0,
           "kills": 171,
           "shot": 536,
           "numHits": 24
         }
       },
       "inAir": 1160.455,
       "losses": {
         "crash": {
           "pilotDeath": 0,
           "crash": 3,
           "eject": 0
         }
       },
       "kills": {
         "Planes": {
           "Attack": 171,
           "total": 171
         }
       }
     }
   },
   "joinDate": 1581994485,
   "lastJoin": 1581995728,
   "id": 2,
   "names": [
     "YYYY"
   ]
 },

 

I also noticed error many this in the slmd log

 

1209.617 SLMOD ERROR: error in stats, could not match target unit in hit event with a mission editor unit name. Could it be a map object? Event Index: 63

 

Is this the "problem" with the ww2 stats?


Edited by sockeye
Link to comment
Share on other sites

Its a known bug I've been needing to fix with PvP stats. Not sure of the exact cause other than it gets through enough of the stats to add +1 to the stat but not far enough to clear the hits table correctly.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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