Jump to content

Slmod for DCS 1.5/2.0


Recommended Posts

Okay, just tried the dev branch and it does not appear to be working on latest open beta. The stable release works fine (aside from stats and other commands not working). On game start, the slmod folder is created - but some of the files are not created. No errors show in dcs logs, and slmod shows as loading correctly. No errors show in the slmod.log aside from a warning saying that one of the stats files cannot be read. Slmod does not respond to any commands in game.

Link to comment
Share on other sites

On 1/29/2021 at 1:16 AM, Grimes said:

If you could post the DCS.log anyway it could help to pinpoint the cause. 

Unfortunately don't have the log file anymore, but the issue was that it wasn't generating all of the necessary files in the slmod folder, for now I've rolled back to 7.5. Is there an ETA for when the current beta will be pushed to stable? Many thanks.

Link to comment
Share on other sites

I'm sure there is a schedule I just don't know if it was posted publicly or not. In terms of slmod the 7.6 dev branch is working for multiple servers on the most recent open beta patch. Which is why having the logs could have been helpful in diagnosing why it isn't working for you. 

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 have recently joined the support team for a very active DCS public server and we are having issues with our statistics tracking database.  Unfortunately, the original admin that setup everything is no longer available to help and our team trying to reverse engineer what was setup.

 

We have SLmod (v7.6) running on the server and a SQL Server database with an "allevents" table that seems to be getting all of the events from SLmod, with Power BI reports giving our players a view into their stats. 

  1. We are not sure how the SLmod events are being written to the database
  2. For some reason, the "kill" and "diedto" events are no longer being written to the database; however, all other events are properly inserted.

It would be fantastic if someone could help with this issue!!

 

Thanks in advance.

Link to comment
Share on other sites

Here are some errors in the slmod log (user info redacted):

 

923.304  SLMOD WARNING: { [1] = "pvp", [3] = "kills", }index: 2
923.304  SLMOD WARNING: Key not found, trying to write value: { }
924.374  SLMOD WARNING: runDeathLogic Failed on: { [1] = { ["initiator"] = { [1] = { ["coalition"] = "blue", ["name"] = "XXX", ["ucid"] = "XXX", ["id"] = 15, ["ip"] = "XXX:XXX", }, }, ["shotFrom"] = "FA-18C_hornet", ["rtid"] = 16778767, ["time"] = 29678.886, ["target"] = { [1] = { ["coalition"] = "red", ["name"] = "XXX", ["ucid"] = "XXX", ["id"] = 2, ["ip"] = "XXX:XXX", }, }, ["unitName"] = "XXX", ["inAirHit"] = true, ["initiator_coalition"] = "blue", ["weapon"] = "AIM-120C", }, }
926.381  SLMOD WARNING: { [1] = "pvp", [3] = "kills", }index: 2
926.381  SLMOD WARNING: Key not found, trying to write value: { }
985.658  SLMOD WARNING: { [1] = "pvp", [3] = "kills", }index: 2
985.658  SLMOD WARNING: Key not found, trying to write value: { }
986.662  SLMOD WARNING: runDeathLogic Failed on: { [1] = { ["initiator"] = { [1] = { ["coalition"] = "blue", ["name"] = "XXX", ["ucid"] = "XXX", ["id"] = 15, ["ip"] = "XXX", }, }, ["shotFrom"] = "FA-18C_hornet", ["rtid"] = 16778767, ["time"] = 29675.372, ["target"] = { [1] = { ["coalition"] = "red", ["name"] = "XXX", ["ucid"] = "XXX", ["id"] = 6, ["ip"] = "91.127.229.92:57159", }, }, ["unitName"] = "XXX", ["inAirHit"] = true, ["initiator_coalition"] = "blue", ["weapon"] = "AIM-120C", }, }

Link to comment
Share on other sites

Took a quick gander through some of the PvP code and I think I might have found a problem. Its way to late for me to test this tonight, so will have to check tomorrow. In the mean time setting pvp_as_own_stat = 0 in the config file could eliminate the errors as a temporary solution. 

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

Updated fix to the develop branch on github. The PvP stats had some mismatched entries for adding their stats, so it errored out. 

 

While investigating this bug it made me realize how old/out of date some of the PvP code is. It was originally made when the game was just the A-10, Ka-50, and FC3 aircraft. It conditionally adds the PvP stat based on the types of objects killed, for instance if you shoot down an A-10 or a helicopter in a fighter it wouldn't give you +1 on the kills, meanwhile if one of them killed a fighter it'd count +1 on their kills.

 

I'm halfway tempted to ditch the rules aspects of it in terms of counting things and only use it for the PvP message. As it stands its just a fixed list of unit types which I don't want to have to keep manually updating for relevant aircraft types, which is something I'd prefer to avoid to say the least.

 

So if anyone has thoughts on the matter I'd appreciate it. 

 

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

Slmod stats are just amazing.  

 

Is there any reliable project out there that is able to disassemble to the SlmodStats.lua file that gets written and parse that out? 

 

I'm really just looking for a way to parse out the stats for each individual ID found there.  In a similar way that "-stats id (n)" would produce.

 

Any help or hints greatly appreciated. I can build it but if this has already been canned up would rather use that.


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

Quote

 

...

3082.168  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: 153
3083.176  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: 154
 

.....

 

 

I'm seeing an absence of stats being recorded, and these messages in the slmod.log.

 

It seems like it is attempting to associate a hit event with a unique unit name from the ME.  

 

The net effect, is that anything spawned via a script (with an indexed unit name) Does not get recorded.  

 

Is this actually the case, or have I misconfigured something?

 

 

 

 

Banner EDForum2020.jpg

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

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

Slmod monitors for birth events and populates a lookup table that it uses for stats and if that object isn't found it spits out that error. The error text was never updated to reflect that it can know about stuff spawned via script. It is also common for that error to occur when map objects are hit, which is also something that is much more likely to happen on the new maps. 

 

Is it any particular types of objects that are being spawned and not being counted when killed? You can check your main dcs.log and DCS in MP will list events as they occur along with slmod's log messages. Part of the logs that DCS generates for events has an initiator and target identifier, as long as both are populated slmod should be able to record the stat. 

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

Thank you Sir.

 

Nothing that is dynamically spawned via MOOSE gets recorded, regardless of type or kind. 

 

I will do some more direct testing by spawning a few infantry alongside a Huey and gun them down to see what the log statements look like.

 

  These are my log statements filtered on 'slmod'. I am at this time not writing mission stats, just the main stats.

 

Everything looks OK to me here. 

 

Quote

2021-04-06 07:04:01.463 INFO    LuaNET: SLMOD INIT: Loading Slmodv7_5_090...
2021-04-06 07:04:01.475 INFO    LuaNET: SLMOD INFO: using settings defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\config.lua
2021-04-06 07:04:01.493 INFO    LuaNET: SLMOD INFO: ./Scripts/MissionScripting.lua is up to date, no installation required.
2021-04-06 07:04:01.502 INFO    LuaNET: SLMOD INFO: SlmodUtils.lua loaded.
2021-04-06 07:04:01.509 INFO    LuaNET: SLMOD INFO: SlmodEvents.lua loaded.
2021-04-06 07:04:01.516 INFO    LuaNET: SLMOD INFO: SlmodUnits.lua loaded.
2021-04-06 07:04:01.524 INFO    LuaNET: SLMOD INFO: SlmodMenu.lua loaded.
2021-04-06 07:04:01.531 INFO    LuaNET: SLMOD INFO: SlmodConvMenu.lua loaded.
2021-04-06 07:04:01.537 INFO    LuaNET: SLMOD INFO: SlmodPTSMenu.lua loaded.
2021-04-06 07:04:01.543 INFO    LuaNET: SLMOD INFO: SlmodPOSMenu.lua loaded.
2021-04-06 07:04:01.553 INFO    LuaNET: SLMOD INFO: SlmodAdminMenu.lua loaded
2021-04-06 07:04:01.562 INFO    LuaNET: SLMOD INFO: no stats , loading from file: C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\\SlmodStats.lua
2021-04-06 07:04:01.572 INFO    LuaNET: SLMOD INFO: using SlmodStats.lua as defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\SlmodStats.lua
2021-04-06 07:04:01.576 INFO    LuaNET: SLMOD INFO: SlmodStats.lua loaded.
2021-04-06 07:04:01.583 INFO    LuaNET: SLMOD INFO: no metaStats , loading from file: C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\\SlmodMetaStats.lua
2021-04-06 07:04:01.605 INFO    LuaNET: SLMOD INFO: using SlmodMetaStats.lua as defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\SlmodMetaStats.lua
2021-04-06 07:04:01.606 INFO    LuaNET: SLMOD INFO: SlmodMetaStats.lua loaded.
2021-04-06 07:04:01.615 INFO    LuaNET: SLMOD INFO: SlmodAutoAdmin.lua loaded.
2021-04-06 07:04:01.623 INFO    LuaNET: SLMOD INFO: SlmodPingCheck.lua loaded.
2021-04-06 07:04:01.631 INFO    LuaNET: SLMOD INFO: SlmodVote.lua loaded.
2021-04-06 07:04:01.641 INFO    LuaNET: SLMOD INFO: SlmodLibs.lua loaded.
2021-04-06 07:04:01.647 INFO    LuaNET: SLMOD INFO: SlmodDebugger.lua loaded.
2021-04-06 07:04:01.654 INFO    LuaNET: SLMOD INFO: SlmodMOTD.lua loaded.
2021-04-06 07:04:01.660 INFO    LuaNET: SLMOD INFO: SlmodHelp.lua loaded.
2021-04-06 07:04:01.666 INFO    LuaNET: SLMOD INFO: SlmodCallbacks.lua loaded
2021-04-06 07:04:01.679 INFO    LuaNET: SLMOD INFO: SlmodTests.lua loaded.
2021-04-06 07:04:02.675 INFO    LuaNET: SLMOD INFO: Modifying netview... results: , true
2021-04-06 07:04:02.718 INFO    LuaNET: SLMOD INFO: connected client 1
2021-04-06 07:04:24.284 INFO    SCRIPTING: Slmod: using settings defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\config.lua
2021-04-06 07:04:34.896 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.basicSerialize) function into export.
2021-04-06 07:04:34.897 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.serialize) function into export.
2021-04-06 07:04:34.897 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.oneLineSerialize) function into export.
2021-04-06 07:04:34.897 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.serializeWithCycles) function into export.
2021-04-06 07:04:34.897 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.deepcopy) function into export.
2021-04-06 07:04:34.898 INFO    LuaNET: SLMOD INFO: successfully loaded (name = slmod.tableshow) function into export.
2021-04-06 07:04:34.905 INFO    LuaNET: SLMOD INFO: using banned ucids and/or ips as defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\BannedClients.lua
2021-04-06 07:04:34.910 INFO    LuaNET: SLMOD INFO: using server admins as defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\ServerAdmins.lua
2021-04-06 07:04:34.910 INFO    LuaNET: SLMOD INFO: load exempt clients
2021-04-06 07:04:34.915 INFO    LuaNET: SLMOD INFO: using exempt ucids as defined in C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\ExemptClients.lua
2021-04-06 07:04:34.915 INFO    LuaNET: SLMOD INFO: require
2021-04-06 07:04:34.986 INFO    LuaNET: SLMOD INFO: successfully loaded unitAttributes.
2021-04-06 07:04:34.997 INFO    LuaNET: SLMOD INFO: no misStats , loading from file: C:\Users\Fargo\Saved Games\DCS.openbeta_server\Slmod\Mission Stats\\PERSISTENTCAMPAIGNSYRIA-LATEST- Apr 05, 2021 at 02 04 34.lua
2021-04-06 07:04:34.997 INFO    LuaNET: SLMOD WARNING: Unable to open  , will make a new  file.
2021-04-06 07:04:35.009 INFO    LuaNET: SLMOD INFO: weapons_impacting_code loaded successfully to server env
2021-04-06 07:04:35.009 INFO    LuaNET: SLMOD INFO: using random seed 2675
2021-04-06 07:04:35.053 INFO    LuaNET: SLMOD INFO: slmod.importMissionZones: zones successfully loaded to net environment.
2021-04-06 07:04:35.074 INFO    LuaNET: SLMOD INFO: successfully completed slmod.getMissionUnitData()

 

 

Banner EDForum2020.jpg

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

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

If you make that test mission and its not recording the stats then please post it here so I can run it locally and try to figure out what is going on. 

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

Happy to do that. 

 

I will get crackin'

 

I've already found something that may leave slmod blameless as expected here.

 

The units that are being dynamically spawned do not seem to have a unitname at all.

 

 

See attached images.

 

 

Testing:

 

What I've found, is that dynamically (Script) created units in MP on the OpenBeta dedicated server are spawning without unit names.

 

Such as the first image above. 

 

On single player, the unit names appear. I also verified proper operation by spawning some with :InitKeepUnitNames(true), which in SP does produce expected results. 

 

Move this same mission to the dedicated server, and neither one gets a unit name defined.

 

I'm hoping that you'll be able to conclude that the SLmod behavior and logging is a victim of this.

 

SINGLE PLAYER:

 

unitname.png

OB DEDICATED (no unit name):

 

nounitname.png

 

 

 

STATS_REPRODUCER3.miz


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

I probably should have double checked the version number before testing it, but the version of slmod you have installed is quite old. 

 

Slmodv7_5_090 compared to the current versions:

 

Current main branch build is 7_5_128

and develop branch is on 7_6_147

 

I tested the mission with both of those versions installed and stats did record. Though in my laziness of not wanting to plug in my joystick I added an A-10A to kill stuff with instead of trying to mouse and keyboard a huey. 

 

That unit name thing is more a general MP client sync with the UI issue than anything. You can't spawn units in DCS if they don't have names. They simply wouldn't spawn if you tried. However the library scripts like mist, moose, or whatever else typically will generate a name if none was provided when spawning through their functions. 

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

I am having an issue in which, since 2.7 using the develop branch, I am unable to have slmod running on more than one server instance. As soon as I add the hooks/net folders to the Scripts folder, to the second server instance, it causes all other servers to crash. Is anyone else able to reproduce this? 

 

EDIT: It was a faulty config file on one of the servers - it's something to do with the destination specified under admin_tools_mission_folder. 


Edited by Nin
Link to comment
Share on other sites

EDIT: I am not very smart I should have waited for some time. It seems I pastes the stats that way for a time then it changes it to a table. 

 

Quick question,

 

I have started a new stats file with SLmod. 

 

Previously it was outputting to the SlmodStats.lua as a lua table. This is something I could have worked with. However with the new stats file it is no longer putting it as a lua table. Sadly, I we have written and entire database around the lua output, that we convert to json. 


Anyways, I am wondering why Slmod would no longer be outputting to the file as it has in the past. Since all I have done is reset the file...

 

 

This is the new stats file,

statsnew.png

 

This is the old Stats file...

statsold.png


Edited by Gracey

❤️

Link to comment
Share on other sites

That is still in the format of a lua table. Is it just not saving it as a .lua then?

 

By the way, in development branch there is an option to save the stats files as json. What it does is whenever it loads the stats file it saves a copy in json. So it isn't streamed to constantly like the lua file, which is kept as the main location where new stats are written to.

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

Hey all, since the 2.7 beta I have been seeing this issue.

ERROR   Lua::Config: Call error world.onEvent:[string "-- world events hook..."]:478: attempt to call method 'getID' (a nil value)
stack traceback:

Anyone else seeing this? I have removed SLmod and now the issue has gone away and the server isn't crashing anymore. Any idea on where to look to fix this?

Link to comment
Share on other sites

17 hours ago, egami said:

Hey all, since the 2.7 beta I have been seeing this issue.

ERROR   Lua::Config: Call error world.onEvent:[string "-- world events hook..."]:478: attempt to call method 'getID' (a nil value)
stack traceback:

Anyone else seeing this? I have removed SLmod and now the issue has gone away and the server isn't crashing anymore. Any idea on where to look to fix this?

 

same error on our servers:

 

Lua::Config: Call error world.onEvent:[string "-- slmod world events hook..."]:467: Unit doesn't exist
stack traceback:
	[C]: ?
	[C]: in function 'getName'
	[string "-- slmod world events hook..."]:467: in function <[string "-- slmod world events hook..."]:428>.

 

Simulatori: DCS A-10C II Warthog - DCS F/A-18C Hornet - DCS F-16C - VRS F/A-18E - 
HOTAS: TM Warthog - Cougar \ HP Reverb G2 \ WinWing Panels

Tally: I see the degenerate commie who wants to ruin our day.

 

Link to comment
Share on other sites

18 hours ago, egami said:

Hey all, since the 2.7 beta I have been seeing this issue.

ERROR   Lua::Config: Call error world.onEvent:[string "-- world events hook..."]:478: attempt to call method 'getID' (a nil value)
stack traceback:

Anyone else seeing this? I have removed SLmod and now the issue has gone away and the server isn't crashing anymore. Any idea on where to look to fix this?

 

I am also seeing this, SLMod might need updated for the new 2.7 event handlers ? (MOOSE also needed updating)

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

I did update for 2.7. However from some testing its just gonna generate errors whenever those events occur and it should be able to recover. 

 

https://github.com/mrSkortch/DCS-SLmod/commit/07717cf9fea57c30b8bc812743cb4aa5893aed47

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