Jump to content

Slmod for DCS 1.5/2.0


Recommended Posts

Hi Grimes, we updated SL-mod to your newer dev version for 2.7.
I am not sure if these crashes are occurring due to the mod though. Here is a post about what we are seeing.

 

There still seems to be an event connection to ejection/ bail outs.


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

  • 4 weeks later...

Hello @Grimes,

 

There seems to be an unexpected change as of the DCS 2.7.1.6430 Open Beta patch (20-May-2021). I suspect this has been introduced by this patch itself.

 

However, it is either being picked up by, or propagated by, SlMod.

 

The symptom is that weapon results were previously sub-categorised in the Lua code. So we now get records like this (sorry for the long code block, but I wanted to provide enough context). I have marked the anomalous entries with arrows like this:  "<---------------"

 

            ["Bf-109K-4"] =
            {
                ["total"] = 12272.354,
                ["kills"] =
                {
                    ["Planes"] =
                    {
                        ["total"] = 2,
                        ["Fighters"] = 2,
                    }, -- end of ["Planes"]
                }, -- end of ["kills"]
                ["inAir"] = 9819.918,
                ["actions"] =
                {
                    ["lostTo"] =
                    {
                        ["Planes"] =
                        {
                            ["Fighters"] = 1,
                        }, -- end of ["Planes"]
                    }, -- end of ["lostTo"]
                    ["takeoff"] =
                    {
                        ["airbase"] = 12,
                    }, -- end of ["takeoff"]
                    ["landing"] =
                    {
                        ["airbase"] = 2,
                        ["landedWhileDamaged"] = 2,
                    }, -- end of ["landing"]
                    ["losses"] =
                    {
                        ["pilotDeath"] = 1,
                        ["crash"] = 2,
                        ["eject"] = 2,
                        ["pilotError"] = 2,
                    }, -- end of ["losses"]
                    ["bounced"] = 1,
                }, -- end of ["actions"]
                ["weapons"] =
                {
                    ["kills"] = 0,                  <--------
                    ["shot"] = 117,                 <--------
                    ["numHits"] = 0,                <--------
                    ["unknown"] =
                    {
                        ["kills"] = 2,
                        ["shot"] = 0,
                        ["numHits"] = 15,
                        ["assist"] = 3,
                        ["hit"] = 0,
                    }, -- end of ["unknown"]
                    ["hit"] = 0,                    <--------
                }, -- end of ["weapons"]
            }, -- end of ["Bf-109K-4"]

 

In the past (ie. before yesterday) we could get a breakdown of the weapons as a function of the weapon type. This is now being omitted.

The "old" style looked something like this...
 

                ["weapons"] =
                {
                    ["MG 131"] =
                    {
                        ["kills"] = 0,
                        ["shot"] = 70,
                        ["hit"] = 0,
                        ["gun"] = true,
                        ["numHits"] = 0,
                    }, -- end of ["MG 131"]
                    ["MG 151/20"] =
                    {
                        ["kills"] = 1,
                        ["shot"] = 435,
                        ["hit"] = 0,
                        ["gun"] = true,
                        ["numHits"] = 3,
                    }, -- end of ["MG 151/20"]
                }, -- end of ["weapons"]



My guesses... I presume that the change is something that might be as a result of the way that DCS pushes events for weapons, or the order/detail of that. This might then be resulting in SlMod not being able to parse the weapon type, and so then dumping everything at the top level. Of course, it might also be a change to the weapon naming (this has happened before), which is then being omitted somehow. But, these are all just guesses.

 

Anyway, just bringing it to your attention. For the time-being, we'll code around it, but I'm curious to read what you think. Thanks again for the support.

 

 

EDIT (2021-05-21 13:35:34 UTC):  On checking the dcs.log file, we are seeing lots of these.

 

2021-05-21 12:49:56.899 INFO    LuaNET: SLMOD WARNING: SlmodStats - nil weapon in hit event, and no weapons fired by client!

 


Edited by xvii-Dietrich
Link to comment
Share on other sites

Thanks for the heads up. Reproduced it and investigating specifically what changed. It at least appears to be ok in terms of bombs, missiles, etc. However its the gun stats that are being messed up by this. I think a variable name might have either changed or is missing. If it was changed then that should be a quick fix, if its missing it might be a bug or something annoying to work-around. 

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

Fixed! https://github.com/mrSkortch/DCS-SLmod/commit/49742962b2fe636c9ddc070df5ac3a22e7debe14

 

 

Basically the way gun events work is really weird and often list the weapon name as being what was shot and the shell type for hits. Usually both are the names as used in the actual game files. So GAU_8 instead of GAU-8 would be an example. Anyway to get around this there is a little hack of sorts to look at another event list that has the corrected names but isn't that useful for anything else. I had a really basic check that the event type and time the event occurred at was the same to use the correct weapon value. Well it turns out ED changed the time value in one of those event tables thus they'd never be the same and the corrected name value that slmod uses wasn't ever assigned. 

 

 

Having kills, shot, numhits, and hits within the weapon table directly is another bug that I'll have to fix at some other time. I'd recommend going through and deleting those entries as it might screw up the stats display. 

  • Like 1

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

  • 1 month later...

Grimes, I am having some trouble with allowing players back into the server that have been banned via the penaltystats file.

Using the command "-admin unban" with their player name is resulting in the response that no such player is on the ban list. However, the player reports being unable to join the server and is getting the SL-MOD banned message.

 

The bannedclients.lua file is empty

 

Is suspect it is their accumulated penalty points which are preventing them from joining, but I cannot work out how to reduce the points total, or to have their penalties removed.

Any ideas how I can alllow them back in without deleting the penaltystats file entirely?

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

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

 

Link to comment
Share on other sites

-admin ban and unban will only change the bannedclients file. You have to forgive the penalties. Easiest way to do that is via chat command. Find their id in the penaltyStats file. Should be just a number and displayed file: ["id"] = 6,

 

Using chat commands as an admin you can use the following command to get a list of their offenses, how many penalty points each has, etc. 

 

https://github.com/mrSkortch/DCS-SLmod/wiki#-admin-score-statid-

 

You can then use the command directly below it to start forgiving stuff.  Gotta do it one at a time, but the following would forgive the player with id 6 for the teamkills at index 1 and 2, and a team hit at index 5. 

 

-admin forgive 6 tk 1

-admin forgive 6 tk 2

-admin forgive 6 th 5

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

Hello! I just combed through this thread, as I want to install slmod on my squad's server tonight for the sole purpose of gathering stats. We are a small group and it's mostly just for fun, coming from IL2 where we enjoy access to a pretty extensive stats page (not ours, server hosts). 

 

Assuming I get the mod running, what would be the easiest method of exporting stats in a way that players can review them at will? We have a discord and, alternatively, I have access to a couple domains if a website would need to be created. This was asked somewhere in the thread, but wasn't answered unfortunately. Thanks!

 

 

PC: ASUS TUF 4090oc - Ryzen 7950X3D - 32gb DDR5 6000 - Quest Pro

Sims: DCS, IL2, MSFS

Pilot Skill: Drunk guy from Independence Day

RIO Skill: Goose (post neck-break) 

Link to comment
Share on other sites

On 7/3/2021 at 5:46 AM, Grimes said:

-admin ban and unban will only change the bannedclients file. You have to forgive the penalties. Easiest way to do that is via chat command. Find their id in the penaltyStats file. Should be just a number and displayed file: ["id"] = 6,

 

Using chat commands as an admin you can use the following command to get a list of their offenses, how many penalty points each has, etc. 

 

https://github.com/mrSkortch/DCS-SLmod/wiki#-admin-score-statid-

 

You can then use the command directly below it to start forgiving stuff.  Gotta do it one at a time, but the following would forgive the player with id 6 for the teamkills at index 1 and 2, and a team hit at index 5. 

 

-admin forgive 6 tk 1

-admin forgive 6 tk 2

-admin forgive 6 th 5

 

Perfect, thanks!
worked a charm

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

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

 

Link to comment
Share on other sites

17 hours ago, Dirtymike0330 said:

Hello! I just combed through this thread, as I want to install slmod on my squad's server tonight for the sole purpose of gathering stats. We are a small group and it's mostly just for fun, coming from IL2 where we enjoy access to a pretty extensive stats page (not ours, server hosts). 

 

Assuming I get the mod running, what would be the easiest method of exporting stats in a way that players can review them at will? We have a discord and, alternatively, I have access to a couple domains if a website would need to be created. This was asked somewhere in the thread, but wasn't answered unfortunately. Thanks!

 

 

The stats get saved to Saved Games\DCS\Slmod\SlmodStats.lua by default. Its just a big lua file that keeps getting written to when DCS is open. Its a little odd in that it doesn't write the whole file at once, rather it streams the data in and due to how lua works it will just use the most recent value for a given entry. Slmod does have an option to save stats in a json format, which doesn't get constantly written to like the lua file does. Since json is more web friendly of a format I'd recommend parsing that version of the stats file. I haven't done anything really with discord bots or made a website in the last 10+ years so I couldn't help you on how to get the stats displayed outside of DCS. 

  • Like 1

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

4 hours ago, Grimes said:

The stats get saved to Saved Games\DCS\Slmod\SlmodStats.lua by default. Its just a big lua file that keeps getting written to when DCS is open. Its a little odd in that it doesn't write the whole file at once, rather it streams the data in and due to how lua works it will just use the most recent value for a given entry. Slmod does have an option to save stats in a json format, which doesn't get constantly written to like the lua file does. Since json is more web friendly of a format I'd recommend parsing that version of the stats file. I haven't done anything really with discord bots or made a website in the last 10+ years so I couldn't help you on how to get the stats displayed outside of DCS. 

Thanks for the response! Is that option to change the output from lua to json in the config file?

 

EDIT: Disregard, I was running the master branch and had to update to dev, thanks again!


Edited by Dirtymike0330

PC: ASUS TUF 4090oc - Ryzen 7950X3D - 32gb DDR5 6000 - Quest Pro

Sims: DCS, IL2, MSFS

Pilot Skill: Drunk guy from Independence Day

RIO Skill: Goose (post neck-break) 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Check your DCS.log for a series of lines starting with: "SLMOD INIT: Loading Slmodv" and ending with "SLMOD INFO: SlmodTests.lua loaded."

 

Also look for a line dealing with missionScripting.lua. Should look like: "SLMOD INFO: ./Scripts/MissionScripting.lua is up to date, no installation required."

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

  • 2 weeks later...

Sorry to jump in, but I cannot find the answer anywhere, so I thought I would check here. I just installed SLMOD on my server but for the life of me, I cannot get the admin menu to come up. Regular player commands work (stats, conv, motd), but no matter what I do, the admin menu (nor reg) will do anything. I have tried adding my id to the ServerAdmins file, but I don't know the proper format for that? Any ideas on what I might be doing wrong?

 

Thanks!

Link to comment
Share on other sites

Check DCS.log after trying an admin command to see if there is an error associated with your command input. Also try the admin command from the webGUI to see if anything happens. 

 

Most of the lua files for defining things are just lua tables indexed by UCID. To manually add it, you need to check the stats file to find your UCID, which is a bunch of random letters and numbers. Copy that into the Server Admins file.  It'd be a good idea to modify that with DCS closed because the changes won't be reflected until the server starts or changes missions. The format would roughly be something like: 

 

Admins = 
{
["shuidashuihighsgaggsgahajfgsda"] = 'admin1',
["sdasffgauyhagjiouiojhguioaga"] = 'admin2',
} -- end of Admins

 

Alternatively using the webGUI you can do a chat command while you are connected to the server to add a player to it. 

 

-admin add playerName

 

  • Like 1

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

  • 2 weeks later...

Fixed some issues with stat recording and the stat display. https://github.com/mrSkortch/DCS-SLmod/commit/ed9c2cc06a99429fc2675d857c248892730bce22

 

If the command "-full stats me" doesn't work please let me know. 

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 weeks later...

We have a server hosted by Fox3 for our group.  We would like to use SLMod for admin tools.  With the hosted server I don't have direct access to the files to make changes and test.  I just want to try and get it right the first time if possible.  As I understand from the documentation I need to modify the config.lua file to turn on admin tools and add a password for adding admins.  Is there anything else I should do to get the admin tools up and running? 

Link to comment
Share on other sites

On 9/12/2021 at 12:31 AM, 01G8R said:

We have a server hosted by Fox3 for our group.  We would like to use SLMod for admin tools.  With the hosted server I don't have direct access to the files to make changes and test.  I just want to try and get it right the first time if possible.  As I understand from the documentation I need to modify the config.lua file to turn on admin tools and add a password for adding admins.  Is there anything else I should do to get the admin tools up and running? 

Admin tools, stats, TK stuff all default to being enabled.  If you don't have direct access I would install it locally so you can configure things how you want and then when satisfied send them the files. You can make a batch file that launches your local game as a server and in a new saved games folder. For example I use a batch file in my install folder with just:

 

bin\DCS.exe --server --norender -w DCS.DS_openbeta

 

What this does is it creates a folder in saved games called DCS.DS_openbeta. I can then use the index.html in the "WebGUI" folder in the install to load missions and do whatever is needed. You can launch the game normally and then connect to your own server already running on your own PC. Anyway, use this to figure out the configs you want for slmod. 

  • Like 1

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

  • 1 month later...
  • 2 months later...

Hey Guys 

Forgive my ignorance here. I used to use Simod back before the Dedicated server was released and then stopped using it. Does this work with the latest OB dedicated server and is there any thing else I need to be aware of for setting it up in the server.

 

Thanks in advance

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Hey Server admins,

Is there an SLMod stats to web project out there that is fleshed out and running yet?

All I can find is older ones that don't seem to be maintained.

ETA:

I found some working code here that at least gets me into JSON.  We've got a kickass web guy who can work with that.

https://github.com/peterb154/dcs-slmod-stats


Edited by fargo007

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

12 hours ago, fargo007 said:

I found some working code here that at least gets me into JSON.  We've got a kickass web guy who can work with that.

slmod 7.6 has native json support. Just need to enable it and it has a copy of the stats files in json format. 

  • Like 1

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

  • Recently Browsing   0 members

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