chromium Posted March 9, 2020 Posted March 9, 2020 Hi, is it possible to detect if a server is using dedicated server mode by lua variable? or from a table information? Thanks 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.
Maverick87Shaka Posted March 10, 2020 Posted March 10, 2020 (edited) Hi, is it possible to detect if a server is using dedicated server mode by lua variable? or from a table information? Thanks Really I don't know if ED store this information in a Variable suitable and usable by script, making some test I notice this: 2020-03-10 11:05:34.002 INFO Dedicated Server: Mission list is empty, server not started. When you start dedicated server without populate server settings like mission etc. Taking a deep look, unfortunately seams this result it's not driven by a variable, but rather seams hard coded in the dedicatedServerGUI.lua and webGUI.lua files, but they are also available on standalone installation and doesn't seems to contain any usable stuff. Going further, on a clean installation of standalone vs dedicated server , what I can see it's some difference on serverSettings.lua, where dedicated server has some specific value that I didn't see when hosting a mission with clean standalone installation. in this example you can see there is the cfg table containing: ["uri"] = "setServerSettings",and is only present in dedicated server settings. Unfortunately, cfg seems not accessible via scripting, I try to dump it by MissionScripting.lua but i got nil. I don't know if someone know how to access it, but if u get the chance to read it, could be the possibile "condition" to understand if it's dedicated server or not. It's still not a real method, since sysadmin can copy/paste the serverSettings.lua file from personal standalone installation and put on dedicated server to make the edit simpler ( I admit I also done it before, and suggest this method as workaround for server description and some other missing feature of the WebGUI for dedicated server ) p.s loading serverSettings.lua from standalone to dedicated doesn't prevent the dedicated server to start, it's run normally! :cry: Edited March 17, 2020 by Maverick87Shaka 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!
chromium Posted March 10, 2020 Author Posted March 10, 2020 Really I don't know if ED store this information in a Variable suitable and usable by script, making some test I notice this: When you start dedicated server without populate server settings like mission etc. Taking a deep look, unfortunately seams this result it's not driven by a variable, but rather seams hard coded in the dedicatedServerGUI.lua and webGUI.lua files, but they are also available on standalone installation and doesn't seems to contain any usable stuff to. Going further, on a clean installation of standalone vs dedicated server , what I can see it's some difference on serverSettings.lua, where dedicated server has some specific value that I didn't see when hosting a mission with clean standalone installation. in this example you can see there is the cfg table containing: and is only present in dedicated server settings. Unfortunately, cfg seems not accessible via scripting, I try to dump it by MissionScripting.lua but i got nil. I don't know if someone know how to access it, but if u get the chance to read it, could be the possibile "condition" to understand if it's dedicated server or not. It's still not a real method, since sysadmin can copy/past the serverSettings.lua file from personal standalone installation and put on dedicated server to make the edit simpler ( I admit I also done it before, and suggest this method as workaround for server description and some other missing feature of the WebGUI for dedicated server ) p.s loading serverSettings.lua from standalone to dedicated doesn't prevent the dedicated server to start, it's run normally! :cry: I already edit serversetting in my project, which is running in plugin env. I'll check about that variable consistency between install. Thanks! 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.
chromium Posted March 10, 2020 Author Posted March 10, 2020 ok it seems that if someone works with "--server" mode, he has that "uri" variable, while local version does not, even if hosting something. It could be interesting to understand what variable of the DCS.exe does the trick, if the nographic or server. Anyway, I probably found a viable solution. 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.
Maverick87Shaka Posted March 10, 2020 Posted March 10, 2020 ok it seems that if someone works with "--server" mode, he has that "uri" variable, while local version does not, even if hosting something. It could be interesting to understand what variable of the DCS.exe does the trick, if the nographic or server. Anyway, I probably found a viable solution. I can make some test if you want, i've spare machine to do that, i just don't know how to access cfg table, I still have lot of stuff to learn about coding for DCS :book: 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!
chromium Posted March 10, 2020 Author Posted March 10, 2020 I'll contact you asap (See discord ;) ) 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.
chromium Posted March 17, 2020 Author Posted March 17, 2020 uri variable worked: it exist only in dedi server loading, for those who need this. 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.
Zyll Posted September 26, 2023 Posted September 26, 2023 On 3/17/2020 at 4:21 AM, chromium said: uri variable worked: it exist only in dedi server loading, for those who need this. could you explain how you got access to the uri (or anything else in serverSettings.lua) through the scripting engine? I'd like to be able to determine which dedicated server my mission is running on, so I can through script manipulate the SRS port being used in a lua file. Thanks,
chromium Posted September 28, 2023 Author Posted September 28, 2023 Il 26/9/2023 at 19:59, Zyll ha scritto: could you explain how you got access to the uri (or anything else in serverSettings.lua) through the scripting engine? I'd like to be able to determine which dedicated server my mission is running on, so I can through script manipulate the SRS port being used in a lua file. Thanks, It's not possibile in SSE, only in plugin env... but now I'm not using anymore cause to detect if it's a server or not I simply launch DCS.getConfigValue("norender"). Always in plugin env, obviously. 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.
Recommended Posts