GuiVM#

The GuiVM is the Lua environment behind DCS World’s main menu and UI shell. Unlike the MissionVM, it runs continuously while DCS is open, even before a mission has been loaded or after one has ended, and is used for custom menus, UI mods, briefing screens, and other front-end tooling.

Execution#

GuiVM scripts are loaded from the Scripts folder (both the installation’s base Scripts folder and the user’s Saved Games Scripts folder), typically via mod entry points registered against the GUI shell rather than through Mission Editor triggers or A.I. Tasking actions. Because it is independent of any mission, GuiVM code can run at any time the game is open, including at the main menu, in the mission briefing screen, and while a mission is loaded.

Sandboxing#

The GuiVM is a separate Lua state from both the MissionVM and ExportVM. It is not subject to the same MissionScripting.lua sanitization applied to mission scripts, since it is not exposed to untrusted mission content in the same way – but it also does not expose the world/mission-oriented singletons and classes that MissionVM does.

API Hierarchy#

The API surface exposed to the GuiVM is comparatively narrow. It currently exposes:

  • net
    • The GuiVM’s version of the net singleton, focused on chat, server browsing, and connection management from the UI layer. See net (GuiVM).

See the following section for details: