Speed Posted November 19, 2012 Author Share Posted November 19, 2012 (edited) Oh yea, additional note: It might be possible that with the slmod_pause_when_empty option enabled, you could get a CTD while loading a mission due to a bug in the C API side of the Lua net environment. I battled this issue and fixed it in all my tests on two different computers, but who knows- it might rear its head on some of these unusual servers used for hosting missions. Luckily, this bug leaves a very distinct signature in the crash log, so it's easy to determine if your crash was caused by it. If this bug is truly the cause of your crash, it should leave a crash log that looks something like this: # -------------- 20121116-212922 -------------- Ð # C0000005 ACCESS_VIOLATION at E83B0E90 00:00000000 00000000 00000000 0000:00000000 E83B0E90 001BECF0 0000:00000000 Ordinal99()+30E90 FAA26F97 001BED30 0000:00000000 lua_yield()+507 FAA34A86 001BEEF0 0000:00000000 luaS_newlstr()+44C6 FAA27038 001BEF20 0000:00000000 lua_yield()+5A8 FAA261BF 001BF0A0 0000:00000000 lua_getinfo()+39F FAA2721E 001BF0E0 0000:00000000 lua_resume()+10E FAA22290 001BF130 0000:00000000 lua_pcall()+60 FA681A54 001BF180 0000:00000000 ?call_func@Config@Lua@@AEAA_NPEBDPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HH@Z()+D4 E839804C 001BF1E0 0000:00000000 Ordinal99()+1804C E83AD273 001BF210 0000:00000000 Ordinal99()+2D273 E83C2CF3 001BF240 0000:00000000 Ordinal99()+42CF3 401728C5 001BF2A0 0000:00000000 Ordinal2()+3228C5 40189DD4 001BF2D0 0000:00000000 Ordinal2()+339DD4 40189CC9 001BF330 0000:00000000 Ordinal2()+339CC9 40210A78 001BF3A0 0000:00000000 Ordinal2()+3C0A78 40211EB8 001BF890 0000:00000000 Ordinal2()+3C1EB8 402148AF 001BF940 0000:00000000 Ordinal2()+3C48AF 7723B22D 001BF970 0001:0001A22D C:\Windows\system32\kernel32.dll BaseThreadInitThunk()+D 77376861 001BF9C0 0001:00025861 C:\Windows\system32\ntdll.dll RtlUserThreadStart()+21 Anyway, like I said, I feel strongly that the issue is adverted, but I cannot be 100% sure until I get a broader sample. If you are using the slmod_pause_when_empty option, you get a crash while loading the mission, and you inspect the crash log and it looks something like what I posted above, please let me know! (As a reminder, crash logs are located in C:\Users\<Your Account>\Saved Games\DCS\Logs.) Edited November 19, 2012 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Quax456 Posted November 20, 2012 Share Posted November 20, 2012 do --Script that sends a bullseye location of a unit to coalition. Created by "Speed". local unitName = 'C-17 #1' -- change to the name of the unit local coa = coalition.side.BLUE -- change to coalition.side.RED if you want red coalition local msg = 'Enfield1, this is Crystal Palace, the friendly transport is now at bullseye %s' --change to the desired message, %s is where the bullseye coords will go. local displayTime = 20 --time the message will be displayed local metric = false -- if metric == false, then bullseye distance is in nautical miles; change to true to put bullseye distance in kilometers. -- change nothing below this line. --------------------------------------------------------------- local unit = Unit.getByName(unitName) if unit then local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function getNorthCorrection(point) --gets the correction needed for true north, errases error from gnomonic projection. if not point.z then --Vec2; convert to Vec3 point.z = point.y point.y = 0 end local lat, lon = coord.LOtoLL(point) local north_posit = coord.LLtoLO(lat + 1, lon) return math.atan2(north_posit.z - point.z, north_posit.x - point.x) end local bull = coalition.getMainRefPoint(coa) local unitPos = unit:getPosition().p local heading = math.atan2(unitPos.z - bull.z, unitPos.x - bull.x) heading = heading + getNorthCorrection(unitPos) if heading < 0 then heading = heading + 2*math.pi -- put heading in range of 0 to 2*pi end heading = round(heading, 0) local dist = ((unitPos.z - bull.z)^2 + (unitPos.x - bull.x)^2)^0.5 if metric then dist = round(dist/1000, 0) else dist = round(dist/1853, 0) end local bullMsg = string.format(msg, heading .. ' for ' .. dist) local coaString if coa == coalition.side.BLUE then coaString = 'blue' elseif coa == coalition.side.RED then coaString = 'red' else coaString = 'all' end slmod.msg_out(bullMsg, displayTime, 'text', coaString) end end Dear Speed unfortanatly this vector calculation did not work. I tried with different position of Bullseye and Targetunits. The distance is calculated well but the course is at any runtime between "0" and "2". It looks like your code only calculates the quadrant. Will try to understand the calculation but the funny way dcs orders their coordinate system makes me crazy :pilotfly: Regards BTW: Hell of a job you have done so far, dude :D My Rig: Windows 11 Pro, Intel i7-13700k@5.4GHz, 64GB DDR5 5200 RAM, Gigabyte Z790 AORUS Elite AX, 1TB Samsung EVO 970, RTX4080, Thrustmaster HOTAS WARTHOG + Saitek Pro Flight Pedals, LG 32" 4K 60FPS, ACER 30" 4K 60FPS GSync Display, HP Reverb G2 V2 Link to comment Share on other sites More sharing options...
Speed Posted November 20, 2012 Author Share Posted November 20, 2012 Dear Speed unfortanatly this vector calculation did not work. I tried with different position of Bullseye and Targetunits. The distance is calculated well but the course is at any runtime between "0" and "2". It looks like your code only calculates the quadrant. Will try to understand the calculation but the funny way dcs orders their coordinate system makes me crazy :pilotfly: Actually, I think the bearing will always be between 0 and 6... you see, I forgot to convert from radians to degrees :lol: When I tested it real quick, the target was just north of bullseye so of course I didn't notice anything wrong :doh: This should be the corrected script: do --Script that sends a bullseye location of a unit to coalition. Created by "Speed". local unitName = 'C-17 #1' -- change to the name of the unit local coa = coalition.side.BLUE -- change to coalition.side.RED if you want red coalition local msg = 'Enfield1, this is Crystal Palace, the friendly transport is now at bullseye %s' --change to the desired message, %s is where the bullseye coords will go. local displayTime = 20 --time the message will be displayed local metric = false -- if metric == false, then bullseye distance is in nautical miles; change to true to put bullseye distance in kilometers. -- change nothing below this line. --------------------------------------------------------------- local unit = Unit.getByName(unitName) if unit then local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function getNorthCorrection(point) --gets the correction needed for true north, errases error from gnomonic projection. if not point.z then --Vec2; convert to Vec3 point.z = point.y point.y = 0 end local lat, lon = coord.LOtoLL(point) local north_posit = coord.LLtoLO(lat + 1, lon) return math.atan2(north_posit.z - point.z, north_posit.x - point.x) end local bull = coalition.getMainRefPoint(coa) local unitPos = unit:getPosition().p local heading = math.atan2(unitPos.z - bull.z, unitPos.x - bull.x) heading = heading + getNorthCorrection(unitPos) if heading < 0 then heading = heading + 2*math.pi -- put heading in range of 0 to 2*pi end heading = heading*360/(2*math.pi) heading = round(heading, 0) local dist = ((unitPos.z - bull.z)^2 + (unitPos.x - bull.x)^2)^0.5 if metric then dist = round(dist/1000, 0) else dist = round(dist/1853, 0) end local bullMsg = string.format(msg, heading .. ' for ' .. dist) local coaString if coa == coalition.side.BLUE then coaString = 'blue' elseif coa == coalition.side.RED then coaString = 'red' else coaString = 'all' end slmod.msg_out(bullMsg, displayTime, 'text', coaString) end end Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
chromium Posted November 20, 2012 Share Posted November 20, 2012 Is this supposed to be run by script (or AI run script triggered action) every time we want the message to appear, isn't it? Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously. Link to comment Share on other sites More sharing options...
Speed Posted November 20, 2012 Author Share Posted November 20, 2012 Is this supposed to be run by script (or AI run script triggered action) every time we want the message to appear, isn't it? Yes Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Quax456 Posted November 20, 2012 Share Posted November 20, 2012 (edited) Is this supposed to be run by script (or AI run script triggered action) every time we want the message to appear, isn't it? yes but if have changed the slmod function to slmod.add_blue_task(2, 'msg_out', 'SEAD', bullMsg) all my SEAD tasks are with ID=2 so I can show this symply by slmod_show_blue_task(2) If there will be a new task I am overwriting this with the same ID :) slmod = { getVector = function(unitName, metric ) local coa = coalition.side.BLUE -- change to coalition.side.RED if you want red coalition local msg = "Pontiacs your Vector to SEAD target from BULL:\n\n%s" local unit = Unit.getByName(unitName) if unit then local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function getNorthCorrection(point) --gets the correction needed for true north, errases error from gnomonic projection. if not point.z then --Vec2; convert to Vec3 point.z = point.y point.y = 0 end local lat, lon = coord.LOtoLL(point) local north_posit = coord.LLtoLO(lat + 1, lon) return math.atan2(north_posit.z - point.z, north_posit.x - point.x) end --local bullPos = Unit.getByName('Pontiac11'):getPosition().p --coalition.getMainRefPoint(coa) local bull = coalition.getMainRefPoint(coa) local unitPos = unit:getPosition().p local heading = math.atan2(unitPos.z - bull.z, unitPos.x - bull.x) heading = heading + getNorthCorrection(unitPos) if heading < 0 then heading = heading + 2*math.pi -- put heading in range of 0 to 2*pi end heading = heading*360/(2*math.pi) heading = round(heading, 0) local dist = ((unitPos.z - bull.z)^2 + (unitPos.x - bull.x)^2)^0.5 if metric then dist = round(dist/1000, 0) else dist = round(dist/1853, 0) end local bullMsg = string.format(msg, heading .. ' for ' .. dist) slmod.add_blue_task(2, 'msg_out', 'SEAD', bullMsg) end end, } end you need to run this script only once at mission start and use it by slmod.getVector(unit, metric) Its indeed possible to advance the code and the variables to transfer to this function..... Edited November 20, 2012 by Quax456 My Rig: Windows 11 Pro, Intel i7-13700k@5.4GHz, 64GB DDR5 5200 RAM, Gigabyte Z790 AORUS Elite AX, 1TB Samsung EVO 970, RTX4080, Thrustmaster HOTAS WARTHOG + Saitek Pro Flight Pedals, LG 32" 4K 60FPS, ACER 30" 4K 60FPS GSync Display, HP Reverb G2 V2 Link to comment Share on other sites More sharing options...
Scorpi Posted November 20, 2012 Share Posted November 20, 2012 (edited) @Speed Servman and Slmod 6.2 works, big thanks! Edited November 20, 2012 by Scorpi ARMA 3 SUPPORTER I7 2600K/ P8P67/ 2x 120GB SSD OCZ Agility 3/ 32GB DDR3/ MSI GTX680 Twin Frozr II /WIN 8 Pro 64-bit/ HOTAS WARTHOG™/ TIR5/ G19 Link to comment Share on other sites More sharing options...
Speed Posted November 20, 2012 Author Share Posted November 20, 2012 @Speed Servman and Slmod 6.2 works, big thanks! What's with Servman 301? Some say it works, some say it doesn't. ----------------------------- Anyway, it would be nice if Servman could hold out a little longer, there should still be a use for it, at least for its chat logs, autoban, mission voting, etc.- I don't plan on working on specialized public server tools in the next Slmod version, at least not at this time (my plans are always changing though). Right now, I'm thinking that the next version of Slmod will likely focus on the getting the stats system up and running, but first I need to get around to completely re-writing the data passing code (what sends your commands from the mission scripting environment to the net environment) to make it much more efficient and clean. The current code is about 1.5 years old and is from a time when I didn't know nearly as much about Lua as I do now. There is no need anymore to print statements to dcs.log, for example, not now that is possible to mod MissionScripting.lua to include a sandboxed io library and create functions to write files directly, or even better yet, use LuaSocket. Meanwhile, with the scripting engine now publicly released, I am slowly working on the AFAC functions at last. Currently, only their "skeleton" exists though (see SlmodCmdblAir.lua). Maybe the next Slmod version can have an initial, basic versions of them without all the bells and whistles I'd like to eventually have. I need to come up with a design that is capable of being slowly scaled up in complexity. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Scorpi Posted November 20, 2012 Share Posted November 20, 2012 (edited) 11/20/12 17:52:17 : [1] "Admin Scorpi" : "=STP= Scorpi" entered the game. 11/20/12 17:52:28 : [1] "Admin Scorpi" : "=STP= Scorpi" joined BLUE in A-10C. 11/20/12 17:53:06 : [1] "Admin Scorpi" : #AI-TEAMKILL: Blue "=STP= Scorpi" (ID=2) teamkilled AI unit Blue "Vulcan"! 11/20/12 17:53:08 : [2] "=STP= Scorpi" : [2] "=STP= Scorpi" made a screenshot 11/20/12 17:53:25 : [1] "Admin Scorpi" : #AI-TEAMKILL: Blue "=STP= Scorpi" (ID=2) teamkilled AI unit Blue "Vulcan"! 11/20/12 17:53:25 : [1] "Admin Scorpi" : #KICK: client "=STP= Scorpi" (ID=2) has been kicked automatically. Reason: Too many AI teamkills 11/20/12 17:53:25 : [1] "Admin Scorpi" : #Automatic restart of current mission (server empty)ServMan-Chatlog-20121120-1638.rar Edited November 20, 2012 by Scorpi ARMA 3 SUPPORTER I7 2600K/ P8P67/ 2x 120GB SSD OCZ Agility 3/ 32GB DDR3/ MSI GTX680 Twin Frozr II /WIN 8 Pro 64-bit/ HOTAS WARTHOG™/ TIR5/ G19 Link to comment Share on other sites More sharing options...
Scorpi Posted November 20, 2012 Share Posted November 20, 2012 create in ...\Eagle Dynamics\DCS World\Missions\Multiplayer (Mission folder for SERVMAN) sorry, my english is bad.:cry: ARMA 3 SUPPORTER I7 2600K/ P8P67/ 2x 120GB SSD OCZ Agility 3/ 32GB DDR3/ MSI GTX680 Twin Frozr II /WIN 8 Pro 64-bit/ HOTAS WARTHOG™/ TIR5/ G19 Link to comment Share on other sites More sharing options...
Megagoth1702 Posted November 20, 2012 Share Posted November 20, 2012 Speed ma brotha thank you so much for your work on SLmod. Loving it! [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming! Link to comment Share on other sites More sharing options...
chokko Posted November 21, 2012 Share Posted November 21, 2012 (edited) did todays DCS update on server dropped slmod 6.2 non-servman in (for first time) on server set password for admin registration to say 'foo' in config.lua started server joined server from client pc from client i entered '-reg' from client i entered 'foo' i note that 'foo' is displayed in clear on client and server chats no serveradmins.lua has been created --- banning and unbanning from server works fine though :) Edited November 21, 2012 by chokko [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Speed Posted November 21, 2012 Author Share Posted November 21, 2012 (edited) did todays DCS update on server dropped slmod 6.2 non-servman in (for first time) on server set password for admin registration to say 'foo' in config.lua started server joined server from client pc from client i entered '-reg' from client i entered 'foo' i note that 'foo' is displayed in clear on client and server chats no serveradmins.lua has been created --- banning and unbanning from server works fine though :) Odd. I could have messed something up, but when I did essentially the same test as this, it worked. Did Slmod actually respond to you? After you type -reg, Slmod should respond to you with: "Please enter the password to register you as a server admin (your next chat message in this mission will not be publicly displayed)." If you don't see that, the registration menu is either not working or not enabled. If you enter the password correctly, then it will say, 'Slmod: you have been registered as an admin on this server.' and if you type the password wrong, it will say, 'Slmod: invalid password. DO NOT ATTEMPT TO RE-ENTER THE PASSWORD. Type "-reg" again in chat to start over again!' And just to be 100% clear, you did set slmod_admin_register_password = 'foo' AND NOT slmod_admin_register_password = foo right? It looks like you're implying the former (which is the correct way), and not the latter, but I have to make sure. Anyway, I can't test for myself right now because my gaming PC is packed away. If by some chance the password-based registration menu is broken, then you'll just have to get by with "-admin add <player name>" ;) Edited November 21, 2012 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
chokko Posted November 21, 2012 Share Posted November 21, 2012 nah i had no quotes around it retard+1 for chokko [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Stuka Posted November 23, 2012 Share Posted November 23, 2012 We have occasionally that the sever is not coming out of the slmod pause mode when someone is joining the server. Anybody else seeing this? Speed, any logfiles we can deliver to investigate? Windows 11 | i9 12900KF | 64GB DDR4 | RTX 3090 | TM Warthog HOTAS | Saitek Combat Rudder Pedals | TM MFDs + Lilliput 8" | TIR5 Pro Link to comment Share on other sites More sharing options...
Scorpi Posted November 23, 2012 Share Posted November 23, 2012 (edited) Check the config.lua (<Windows Install Drive>\Users\<Your User Account Name>\Saved Games \ DCS \ Slmod) -- OTHER OPTIONS --[[For dedicated servers: set to true to make the server automatically pause when only the server host is the only person present in the mission.]] slmod_pause_when_empty = false (true= automatic) Edited November 23, 2012 by Scorpi ARMA 3 SUPPORTER I7 2600K/ P8P67/ 2x 120GB SSD OCZ Agility 3/ 32GB DDR3/ MSI GTX680 Twin Frozr II /WIN 8 Pro 64-bit/ HOTAS WARTHOG™/ TIR5/ G19 Link to comment Share on other sites More sharing options...
mladen Posted November 23, 2012 Share Posted November 23, 2012 (edited) Check the config.lua (<Windows Install Drive>\Users\<Your User Account Name>\Saved Games \ DCS \ Slmod) -- OTHER OPTIONS --[[For dedicated servers: set to true to make the server automatically pause when only the server host is the only person present in the mission.]] slmod_pause_when_empty = false (true= automatic) @Scorpi: Thank you for your suggestion. the slmod_pause_when_empty is already set to true. Yesterday, 3 clients logged-in to the DS and the server went Off Pause Mode. After a while (maybe 15 minutes) server went on Pause Mode again while the clients were still in the session. Today I reinstalled the SLmod 6.2 and hoping the "problem" will not come back. Edited November 23, 2012 by mladen [sIGPIC][/sIGPIC] My pit i7-3770K (3500 MHz) | Corsair Hydro H110 | Corsair Carbide 500R | ASUS P8Z77-V Pro | 16GB Corsair CMZ16GX3M4A1600C9 (4X4GB)| GTX 1080 + GTX750 |520 GB SSD | PSU Antec HCP-850 1x27", 1x21", 1x19" | SB X-Fi | TIR5+Clip Pro |TMHW | Saitek Rudder | Helios | G-13 | G-110 | Win7 x64 Link to comment Share on other sites More sharing options...
mladen Posted November 23, 2012 Share Posted November 23, 2012 This afternoon I've joined our DS and the Pause Mode worked without any problem. I connected and disconnected from the server more than 10 times and DS came nicely in pause mode. After approximately one hour brake I did another attempt to connect to the DS, but unfortunately DS stayed in Pause Mode. I was remotely monitoring DS behaviour via TeamViewer (RDP) since DS in located in my office 40 km from my home. During my one hour brake no other clients tried to connect to the server. After resetting the DS Pause mode worked "normally" again. I suspect that while server is in the Pause Mode something causes the Pause Mode to stop functioning. Does any of you guys uses Pause Option without a problem? [sIGPIC][/sIGPIC] My pit i7-3770K (3500 MHz) | Corsair Hydro H110 | Corsair Carbide 500R | ASUS P8Z77-V Pro | 16GB Corsair CMZ16GX3M4A1600C9 (4X4GB)| GTX 1080 + GTX750 |520 GB SSD | PSU Antec HCP-850 1x27", 1x21", 1x19" | SB X-Fi | TIR5+Clip Pro |TMHW | Saitek Rudder | Helios | G-13 | G-110 | Win7 x64 Link to comment Share on other sites More sharing options...
Speed Posted November 23, 2012 Author Share Posted November 23, 2012 (edited) This afternoon I've joined our DS and the Pause Mode worked without any problem. I connected and disconnected from the server more than 10 times and DS came nicely in pause mode. After approximately one hour brake I did another attempt to connect to the DS, but unfortunately DS stayed in Pause Mode. I was remotely monitoring DS behaviour via TeamViewer (RDP) since DS in located in my office 40 km from my home. During my one hour brake no other clients tried to connect to the server. After resetting the DS Pause mode worked "normally" again. I suspect that while server is in the Pause Mode something causes the Pause Mode to stop functioning. Does any of you guys uses Pause Option without a problem? I'll look into it. If there's a problem, I'd suspect something with the server.on_connect and server.on_disconnect callback functions... I sure hope not though. Next time you see it happen, upload C:\Users\<Your User Account>\Saved Games\DCS\Logs\dcs.log. Also, every single bit of info you provide could be helpful (like for example, do you have Servman installed?) I ran with the server pause when empty option enabled for about a week on the VTAG dedicated server with no issues. Also, be sure that you understand that even with the server pause when empty option available, is it possible to override it. "-admin pause override" turns it off until the server is restarted. So if you have the pause override enabled and clients join, the server will not unpause. Also, the -admin pause command can force the server to pause even if the pause when empty option is enabled and clients are connected. Edited November 23, 2012 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Speed Posted November 23, 2012 Author Share Posted November 23, 2012 Ok, I found a potential flaw with the pause when empty logic, but it wouldn't cause the server to pause when there are actually players in it. This is the logic: if slmod_pause_when_empty and (net.get_real_time() > slmod_mission_start_time + 8) then -- 8 second window to hopefully always avoid the CTD if not net.is_paused() then slmod_pause_forced = false -- turn off the forced pause if the server is not paused for any reason. end if not slmod_pause_override then if (not slmod_num_clients or slmod_num_clients == 0) and not net.is_paused() then net.pause() elseif slmod_num_clients and slmod_num_clients > 0 and net.is_paused() and (not slmod_pause_forced) then net.resume() end end end if net.get_real_time() rolls over at midnight, then the pause_when_empty setting could stop working at midnight- the server would not pause again when it was empty- until the mission was reset. I'll check it out when I get the time. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
mladen Posted November 24, 2012 Share Posted November 24, 2012 Speed, thanks for your prompt response... much appreciated. :thumbup: No, the Servman is not installed on DS and I'll upload the dcs.log file as soon as the Pause Mode stops working again. [sIGPIC][/sIGPIC] My pit i7-3770K (3500 MHz) | Corsair Hydro H110 | Corsair Carbide 500R | ASUS P8Z77-V Pro | 16GB Corsair CMZ16GX3M4A1600C9 (4X4GB)| GTX 1080 + GTX750 |520 GB SSD | PSU Antec HCP-850 1x27", 1x21", 1x19" | SB X-Fi | TIR5+Clip Pro |TMHW | Saitek Rudder | Helios | G-13 | G-110 | Win7 x64 Link to comment Share on other sites More sharing options...
mladen Posted November 24, 2012 Share Posted November 24, 2012 ... Next time you see it happen, upload C:\Users\<Your User Account>\Saved Games\DCS\Logs\dcs.log. Also, every single bit of info you provide could be helpful (like for example, do you have Servman installed?) I am attaching the dcs.log (476th_DS_Pause_error_dcs.log). I hope it will be of some use. Thank you for your support :thumbup:476th_DS_Pause_error_dcs.rar [sIGPIC][/sIGPIC] My pit i7-3770K (3500 MHz) | Corsair Hydro H110 | Corsair Carbide 500R | ASUS P8Z77-V Pro | 16GB Corsair CMZ16GX3M4A1600C9 (4X4GB)| GTX 1080 + GTX750 |520 GB SSD | PSU Antec HCP-850 1x27", 1x21", 1x19" | SB X-Fi | TIR5+Clip Pro |TMHW | Saitek Rudder | Helios | G-13 | G-110 | Win7 x64 Link to comment Share on other sites More sharing options...
Speed Posted November 24, 2012 Author Share Posted November 24, 2012 I am attaching the dcs.log (476th_DS_Pause_error_dcs.log). I hope it will be of some use. Thank you for your support :thumbup: So what was the problem this log illustrates? From my reading of the log, it looks like the pause when empty feature was working just fine for quite some time, then everyone left. Approximately 4 hours later, Hammer began a join attempt. The game refused to unpause for him. Is that what happened? If so, that would match the symptoms I would expect if the earlier potential problem I found is, in fact, a problem. Did midnight occur for the server between the time when the pause when empty feature was working, and the time it stopped working? BTW, reloading the mission should fix the problem, so a simple -admin restart SHOULD fix the problem. Anyway, I'm attaching a potentially fixed SlmodMain.lua. I have no way of testing it for several days (see my signature). It's identical to your current one except I have replaced two net.get_real_time calls with calls to os.time. Hopefully, that fixes the problem, Please let me know! I like to avoid os.time as much as possible though, because supposedly it can be operating system dependent.SlmodMain.lua 1 Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Stuka Posted November 24, 2012 Share Posted November 24, 2012 Speed, thanks for your continues support, efforts,.... Windows 11 | i9 12900KF | 64GB DDR4 | RTX 3090 | TM Warthog HOTAS | Saitek Combat Rudder Pedals | TM MFDs + Lilliput 8" | TIR5 Pro Link to comment Share on other sites More sharing options...
ENO Posted November 25, 2012 Share Posted November 25, 2012 Hi Speed... I know my problems are very narrow based (all MP server related) and I've come into a continuing problem with logs being re-written every time the game is restarted. What kind of work is involved in exporting the chat script from the missions into their own log file as they were with servman? I'm just poking around to see if this is something that we may see in the near future... or if I should go and run servman with most features disabled so that I can continue to get the logs. Brood has been a tremendous help for me by providing me with an updated main.lua to help with some of the servman functions... if I disable most of its features that I don't need (messaging, admins, mission restarts etc)... is that my perfect solution? From what I've read it looks like things work OKAY... though slightly buggy. Any input on the subject is extremely valuable. Thank you again for your quick replies to all of the above questions. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
Recommended Posts