TEMPEST.114 Posted November 15, 2022 Posted November 15, 2022 Thanks to this amazing post buried in another thread: I’ve just discovered new functions called ‘DCS Server Control’ but there is literally zero information in the wiki for any of these. Can anyone elaborate? Are these only accessible if the mission & script is running on a ‘DEDICATED’ server, or are they available anytime when a mission is running for multiplayer? It seems this is where a function exists to get the whole mission Lua table… but I’ve never seen anyone mention this singleton before Am I missing something?
Grimes Posted November 15, 2022 Posted November 15, 2022 It is a separate lua environment from the mission scripting engine. Thus I gave it its own section on the wiki. ED also have documented it better than mission scripting and have a html file with that documentation included with the game. https://wiki.hoggitworld.com/view/DCS_server_gameGUI The "net" functions were added to the mission scripting environment sometime between this new server env and now. So some functions are accessible in both. The server env is more like a mod where you can place files in savedgames/DCS/scripts/hooks that can run code or execute other files on that computer to run whatever scripting of your choice. It is used on client side mods like tacview and SRS to interface with the game to know when you are in a mission for example. There are also server side admin tools, stats, etc for running a game server. Basically everything you see in the "simulator scripting engine" section (aka mission scripting) simply doesn't exist to code you run from the server environment. There is no "env" table, nor sub tables like env.mission. As a result there is the function DCS.getCurrentMission() that returns the mission table for whatever use you may have for it within that environment. 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
Recommended Posts