philstyle Posted November 23, 2020 Share Posted November 23, 2020 Should be something like this where for nickname1 you have both ips and ucid in the list since it was done in game trough admin menu. nickname2 and 3 added manually later on ( remember you have to do with non running server or i think it will be replaced by the "cached" one on server close/reboot ( or at least I prefer to edit on dcs not running since I'm paranoiac sys admin. Thanks! On YouTube: https://www.youtube.com/philstylenz Storm of War WW2 server website: https://stormofwar.net/ Link to comment Share on other sites More sharing options...
_Heater_ Posted November 25, 2020 Share Posted November 25, 2020 Hi, is SLmod compatible with Moose/Mist scripts ? So, Can I run both on my missions/ded server ? 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. **Air Combat Wings** - 32nd Virtual Fighter Wing || Discord https://discord.gg/XySM5na || Twitch Segui le nostre Live! Link to comment Share on other sites More sharing options...
Grimes Posted November 26, 2020 Author Share Posted November 26, 2020 Yes it is compatible. Slmod in some ways was a precursor to mist and for access to the scripting engine in general, so it does have some scripting functions available in the mission environment. Most if not all of those functions are now part of mist. 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 Link to comment Share on other sites More sharing options...
NeilWillis Posted December 8, 2020 Share Posted December 8, 2020 Installing SLMod onto a server running 3 separate virtual servers, and we get a error message as follows: {string "slmod sendData0"]:1: attempt to index global "slmod" (is a nil value) stack trackback: [C]:? string "slmod.sendData)"]:1: in main chunk Do you know how we fix it? Link to comment Share on other sites More sharing options...
NeilWillis Posted December 8, 2020 Share Posted December 8, 2020 45 minutes ago, NeilWillis said: Installing SLMod onto a server running 3 separate virtual servers, and we get a error message as follows: {string "slmod sendData0"]:1: attempt to index global "slmod" (is a nil value) stack trackback: [C]:? string "slmod.sendData)"]:1: in main chunk Do you know how we fix it? The solution, we discovered through the error log is that DCS needs to be run in admin mode. Once we did that, it worked perfectly. Link to comment Share on other sites More sharing options...
Grimes Posted December 17, 2020 Author Share Posted December 17, 2020 Build 143 pushed to develop branch. Added: option for json stats export - It is a simple boolean setting in the config that when enabled will save a copy in json format of the main, penalty, campaign, and mission stats whenever one of this is opened. Added: Stats writing buffer. This will reduce the amount of writes to the stats file, but will have a slight delay from when the event occurred to when it is written. Fixed: Dakka in Huey and Mi-8 naming for multicrew seats Fixed: Multicrew defs and auto generation of multicrew seats for unit types not pre-defined in slmod. Fixed: crash stat not counting when AI stats are disabled and when the player was killed by AI. Fixed: issue of stats not displaying due to an added stat value for losses being present. Added: pilotError and crashLanding stat to stats display. Added: WIP feature of best and current life. This is disabled at the moment but code is present and config options exist for it. 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 Link to comment Share on other sites More sharing options...
philstyle Posted December 17, 2020 Share Posted December 17, 2020 Hi Grimes, i have auto-ban enabled. I want to remove the ban that a player has. Can I do this with a lua file edit - or do I need to use the in-game SL-Mod admin features? On YouTube: https://www.youtube.com/philstylenz Storm of War WW2 server website: https://stormofwar.net/ Link to comment Share on other sites More sharing options...
Grimes Posted December 18, 2020 Author Share Posted December 18, 2020 3 hours ago, philstyle said: Hi Grimes, i have auto-ban enabled. I want to remove the ban that a player has. Can I do this with a lua file edit - or do I need to use the in-game SL-Mod admin features? Yes, but its a round about way of doing it. The unban admin command is used for the manual bans. The auto-bans are handled, well, automatically, and based on how you have it setup they will eventually be re-allowed in. Since I don't have a reallow exemption feature in slmod at the moment you will have to forgive specific offenses. Either editing the file or forgiving via command works. However editing the lua file won't immediately "take" and I wouldn't be shocked if it gets annoyed when you save it if the server is running and has that file open. To edit you have to add a ['forgiven'] = true, entry for each penalty you want to forgive. Easiest way is with the admin command though, which you can use on the remote server control or while connected to a server. Just gotta forgive until their points will below the ban threshold, at which point they will be allowed to reconnect. The two relevant commands are: -admin score statID <id> -admin forgive <id> <type> <index> id being the id associated with them, find their name in the main stats file and they will have an id = X value. type is a two letter word th, tk, ch, ck for teamhit, teamKill, collisionHit, collisionKill. index is whatever entry index that offense is under. 1 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 Link to comment Share on other sites More sharing options...
philstyle Posted December 18, 2020 Share Posted December 18, 2020 lovely, thanks Grimes On YouTube: https://www.youtube.com/philstylenz Storm of War WW2 server website: https://stormofwar.net/ Link to comment Share on other sites More sharing options...
Grimes Posted December 19, 2020 Author Share Posted December 19, 2020 BTW there appears to be issues with the JSON export. The way it was written originally always did the JSON conversion, the setting just dictated whether or not to save it. Coupled with an error occurring if data was formatted in a certain way it would prevent slmod from fully loading. The hotfix changed when it does the JSON export so the error will only occur if json export is enabled. So please disable it for the time being. It is more of a DCS bug, but aspects of it are created via slmod for how it saves penalties on multicrew aircraft. 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 Link to comment Share on other sites More sharing options...
philstyle Posted December 28, 2020 Share Posted December 28, 2020 (edited) Grimes, another question from me. . . . The ejection stat in SLmodStats seems to record at the moment the Ejection trigger is fired in DCS. This means that a successful ejection is recorded every time, even if the player dies in the chute, or disconnects whilst still the in the chute. There is another trigger in DCS which I see in the logs and the debrief file called "pilot landing". This appears to trigger when a successfully bailed out pilot touches the ground. How much work would be involved in telling SL-mod to use the "pilot landing" trigger, instead of the eject trigger to record an "eject" statistic? Edited December 28, 2020 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 More sharing options...
xvii-Dietrich Posted December 28, 2020 Share Posted December 28, 2020 Of course, I definitely support Phil's suggestion. One tweak though... 3 hours ago, philstyle said: How much work would be involved in telling SL-mod to use the "pilot landing" trigger, instead of the eject trigger to record an "eject" statistic? Or... to have both. That way the server admins can decide which combination of "pilot eject" and/or "pilot landed" to use. Link to comment Share on other sites More sharing options...
Grimes Posted December 29, 2020 Author Share Posted December 29, 2020 There are a few complications regarding pilot_dead, eject, and pilot_landed events that make completely accurate stats difficult. 1. Pilot landed event is missing some data with the scripting engine depending on when it occurs. Its actually kind of annoying since the entry exists in the event table but an error occurs if you try to use it. 2. Pilot dead event is called instead if the pilot lands in the water. This event also is missing which pilot it is if the aircraft they ejected from is destroyed before the pilot dead event is called, which is likely to happen. 3. Timing. Essentially it has to keep track of ejected players and then when a pilot landing event occurs again it goes back and changes the stat to reflect it. Timing comes into play because the time it takes can create issues, namely if you eject at 30000ft it takes roughly 19 minutes for the pilot to land. So it is possible to spawn in again, do whatever, and even land before the previously ejected pilot reaches the ground. This also means that if you eject in the closing minutes of a server then however the stat would be changed wouldn't occur because the event didn't happen. Its important to keep in mind that slmod treats eject and pilot dead events independently. Eject doesn't mean a successful ejection, it just means the player commanded an eject. A possible solution is for me to add another stat entry of "killedWhileEjecting" and use something similar to what I've used for other stats. Basically it logs when a player ejected and if a pilot dead event occurs within a short time then it'll add to the killedWhileEjecting event. It might miss some due to the aforementioned issues with pilot dead events. Otherwise it'll have to make a guess in some instances, say a pilot dead event occurred but has no initiator, then assume it was the guy who just crashed. But that could result in not accurate stats. 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 Link to comment Share on other sites More sharing options...
philstyle Posted December 29, 2020 Share Posted December 29, 2020 (edited) 7 hours ago, Grimes said: There are a few complications regarding pilot_dead, eject, and pilot_landed events that make completely accurate stats difficult. 1. Pilot landed event is missing some data with the scripting engine depending on when it occurs. Its actually kind of annoying since the entry exists in the event table but an error occurs if you try to use it. Damn, you're right. The player name is missing from the Pilot Landing event. Here's an extract from a little test I hosted, where I bailed out and waited until my pilot had reached the ground (under deployed chute) to see what events would trigger. The fourth line has the touch down. "type=pilot landing" is there, but initiatorPilotName is missing. 2020-12-28 14:18:51.761 INFO Scripting: event:type=birth,t=28817.458,initiatorPilotName=No.54 Philstyle,initiatorMissionID=1, 2020-12-28 14:19:01.741 INFO Scripting: event:type=eject,t=28827.442,initiatorPilotName=No.54 Philstyle,initiatorMissionID=1, 2020-12-28 14:19:26.524 INFO Scripting: event:type=crash,t=28852.204,initiatorPilotName=No.54 Philstyle,initiatorMissionID=1, 2020-12-28 14:20:56.676 INFO Scripting: event:t=28942.382,type=pilot landing,initiatorMissionID=0, Edited December 29, 2020 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 More sharing options...
PeneCruz Posted January 8, 2021 Share Posted January 8, 2021 Has anyone got a stats export via a discord bot working with the SLmod stats, I found an node.js application, SL Bot, that is a couple of years old (that does this as a additional output) but don't want to invest time into trying to get it working if there is a more recent discord specific application. Any pointers in the right direction would be appreciated. Link to comment Share on other sites More sharing options...
philstyle Posted January 10, 2021 Share Posted January 10, 2021 On 11/23/2020 at 12:10 AM, Maverick87Shaka said: Should be something like this where for nickname1 you have both ips and ucid in the list since it was done in game trough admin menu. nickname2 and 3 added manually later on ( remember you have to do with non running server or i think it will be replaced by the "cached" one on server close/reboot ( or at least I prefer to edit on dcs not running since I'm paranoiac sys admin. slmod_banned_ips = { ["00.000.000.000:50165"] = { ["name"] = "Nickname1", ["bannedBy"] = { ["name"] = "[bSE] Shaka", ["ucid"] = "myUCID_524cblablablablablabla", }, -- end of ["bannedBy"] ["ucid"] = "Nickname1_UCID", ["time"] = 1549124236, ["ip"] = "00.000.000.000:50165", }, -- end of ["00.000.000.000:50165"] } -- end of slmod_banned_ips slmod_banned_ucids = { ["Nickname1_UCID"] = { ["name"] = "Nickname1", ["bannedBy"] = { ["name"] = "[bSE] Shaka", ["ucid"] = "myUCID_524cblablablablablabla", }, -- end of ["bannedBy"] ["ucid"] = "Nickname1_UCID", ["time"] = 1549124236, ["ip"] = "00.000.000.000:50165", }, -- end of ["Nickname1_UCID"] ["Nickname2_UCID"] = { ["name"] = "Nickname2", ["bannedBy"] = { ["name"] = "[bSE] Shaka", ["ucid"] = "myUCID_524cblablablablablabla", }, -- end of ["bannedBy"] ["ucid"] = "Nickname2_UCID", ["time"] = 1549124236, ["ip"] = "00.00.00.000:54224", }, -- end of ["Nickname2_UCID"] ["Nickname3_UCID"] = { ["name"] = "Nickname3", ["bannedBy"] = { ["name"] = "[bSE] Shaka", ["ucid"] = "myUCID_524cblablablablablabla", }, -- end of ["bannedBy"] ["ucid"] = "Nickname3_UCID", ["time"] = 1549124236, ["ip"] = "00.000.000.00:59422", }, -- end of ["Nickname3_UCID"] } -- end of slmod_banned_ucids p.s. personal data removed and replaced to protect users even if they are banned Hey Maverickshaka, Will the above work if I only have the user's UCID and NICKNAME but I do not know their IP address? Should I just leave random numbers for the IP? On YouTube: https://www.youtube.com/philstylenz Storm of War WW2 server website: https://stormofwar.net/ Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted January 10, 2021 Share Posted January 10, 2021 3 hours ago, philstyle said: Hey Maverickshaka, Will the above work if I only have the user's UCID and NICKNAME but I do not know their IP address? Should I just leave random numbers for the IP? Yes, put just some unused ip like 99.99.999.99 or something like that, it's not a ban based on IP address as far as i know. FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
Deliverator Posted January 13, 2021 Share Posted January 13, 2021 (edited) I've just implemented Slmod to my server and my guys are all spaniards, and plenty of them don't understand English. I am interested in translating the script texts to Spanish so it can be implemented in the script if possible that way it can be maintaned for the long run and not only for us. Edited January 13, 2021 by Deliverator Link to comment Share on other sites More sharing options...
Grimes Posted January 14, 2021 Author Share Posted January 14, 2021 It would take substantial changes to all of the message to support multiple languages. Most of the messages are not written as a single block of text but assembled based on different conditions. By no means impossible just a bit of work and also need to think of a way to do it that makes adding other languages easy to add. For example this is how part of message of the day is written: titleTbl[#titleTbl + 1] = '\nThis server is running Slmod version ' titleTbl[#titleTbl + 1] = slmod.mainVersion titleTbl[#titleTbl + 1] = ', build ' titleTbl[#titleTbl + 1] = slmod.buildVersion titleTbl[#titleTbl + 1] = '. To see the Slmod help menu, say "-help" in chat.\n' To support other languages I'd either do it how DCS does it with something that looks to see if there is a translation of each phrase and replaces it if found or write as much of the text as a big block but search for key phrases to replace values as needed. The first would work better with how most of the messages in slmod are written, but would probably have some translation oddities. The 2nd would be better for any syntax differences between languages but would require extensive changes to every message. It is certainly something that should take input from people that speak other languages for what would work best for them. 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 Link to comment Share on other sites More sharing options...
Deliverator Posted January 14, 2021 Share Posted January 14, 2021 (edited) Seems to be a big work to be able to translate it all, code-wise. Spanish implementation can be done with the current organization. Basically we spaniards construct sentences exactly the same, but when attaching adjetives to a subject (the big red fast car) we do write them backwards (el coche grande, rojo y rápido // the car big, red and fast), so for that, your proposed first implementation will be doable with minor to none oddities. Other languages I cannot speak about I'm afraid. I'm a native spaniard with C2 Cambridge certified English level, so if you decide to embark into translating it all, i'll be happy to help anytime. Also, i've posted this before in the Discord, but inside the config file it is said that the correct syntax for specifing a folder for missions, stats and so is [[directory]] and doesn't work. Using the following structure (such as when you are reading LUA files from the mission editor) worked as a charm: admin_tools_mission_folder = "C:\\Users\\Server\\Saved Games\\DCS.openbeta_server\\Missions\\" I would reccomend to update the instructions for following updates for newcomers. I had to rack my brains out for quite a while untill I figured that way Edited January 14, 2021 by Deliverator Link to comment Share on other sites More sharing options...
Grimes Posted January 15, 2021 Author Share Posted January 15, 2021 --[[ ------------------ -- Note due to a formatting issue I don't want to deal with, for the example directly below replace each { with [ and } with ] ----------------- admin_tools_mission_folder = {{C:\Users\John\Dropbox\Dedicated Servers\Slmod\Missions\}} LEAVE THIS VARIABLE AS nil IF YOU WANT TO USE THE DEFAULT FOLDER!]] admin_tools_mission_folder = nil I know, there is a note there directly above it. Initially did it that way as a workaround to when I updated how slmod loads the config file. Basically a multiline string in lua is contained within double brackets [[ to ]], but lua requires a different formatting if you wanted to have multiple sets within each other. --[[ [[This will error]] ]] So I changed it to {{}} and left a note to change it. Big difference is with [[C:\folder1\folder2\]] is you don't need to use double \\ to escape out of the \. So either should work. Since I gotta upload a fix to the config file anyway for one of the bugs you reported on the discord I'll see about fixing that. 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 Link to comment Share on other sites More sharing options...
Deliverator Posted January 15, 2021 Share Posted January 15, 2021 Thanks, I tried initially with admin_tools_mission_folder = [[C:\Users\Server\Saved Games\DCS.openbeta_server\Missions\]] and didn't work out for me, but might be possible that I had other errors at the same time...so it's very possible that it was me at fault in this case. Thanks for the effort of maintaning slmod Grimes! Highly appreciated Link to comment Share on other sites More sharing options...
Grimes Posted January 16, 2021 Author Share Posted January 16, 2021 Pushed a minor update. Added some clarity to that note in the config with your suggestion. Also fixed the issue with slmod having an error on first load when it created the config file. 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 Link to comment Share on other sites More sharing options...
Deliverator Posted January 19, 2021 Share Posted January 19, 2021 Working perfectly fine now! And the stats are showing perfectly fine too! Link to comment Share on other sites More sharing options...
Nin Posted January 28, 2021 Share Posted January 28, 2021 (edited) On 1/16/2021 at 3:53 AM, Grimes said: Pushed a minor update. Added some clarity to that note in the config with your suggestion. Also fixed the issue with slmod having an error on first load when it created the config file. Is there something I'm missing here? The download link mentioned in the original post of this thread links to a repository that was last updated 5 months ago, is there a more up to date version you are referencing above? EDIT: Think you're referring to dev branch, apologies. Edited January 28, 2021 by Nin Link to comment Share on other sites More sharing options...
Recommended Posts