Mission Scripting Tools Documentation
Current release: 4.4
ED Forums Thread For discussion and downloads of current and legacy versions.
GitHub Link Mist is now on github. Suggest your own features, write your own code for merging, or make your own modifications to mist!
MIssion Scripting Tools (Mist) is a collection of Lua functions and databases that is intended to be a supplement to the standard Lua functions included in the simulator scripting engine. Mist functions and databases provide ready-made solutions to many common scripting tasks and challenges, enabling easier scripting and saving mission scripters time. The table mist.flagFuncs contains a set of Lua functions (that are similar to Slmod functions) that do not require detailed Lua knowledge to use. However, the majority of Mist does require knowledge of the Lua language, and, if you are going to utilize these components of Mist, it is necessary that you read the Simulator Scripting Engine guide on the official ED wiki.
Using Mist in a mission
How to Load It Mist is not a mod of the game files. You include it into your missions simply by using any of the DO SCRIPT FILE trigger actions to load Mist at or near mission start. The screenshot below illustrates trigger logic that loads Mist at mission time = 1 sec (using DO SCRIPT FILE).
(Also note that in the above screenshot the trigger named "Mission Script". This trigger is similar to the trigger activating mist, however the condition is "Time More (2)." The mission script used in this example requires Mist to be loaded first, otherwise a LUA error will occur and the mission will not function correctly.) Once your mission trigger logic loads Mist, Mist exists within the global mission scripting Lua environment, and its components are accessible in all subsequent scripts run with DO SCRIPT, DO SCRIPT FILE, AI Lua stop conditions, etc. The 1.2.4 patch added the "initialization" script or script file option in the triggers list, this also works.
NOTE #1: Due to its size Mist must be loaded using a DO SCRIPT FILE. Mist is simply too large to paste into a DO SCRIPT text box.
NOTE #2: It is best if Mist is loaded into your mission as early as possible. Unlike Slmod, Mist should not be vulnerable to being used too early, and it will be fine if you load it on a MISSION START type trigger.