Difference between revisions of "Miz mission structure"

From DCS World Wiki - Hoggitworld.com
(Created page with "==Intro== The mission file is a lua table present within a .miz file that is accessible to the scripting engine via the table env.mission. This table is almost the entirety of...")
 
(Data and Samples)
Line 12: Line 12:
  
 
<pre>
 
<pre>
   
 
 
     coalition              : table  : Contains all coalition specific data including bullseye, nav_points, and all units.  
 
     coalition              : table  : Contains all coalition specific data including bullseye, nav_points, and all units.  
 
     coalitions            : table  : Contains a list of country ids that belong to a given coalition
 
     coalitions            : table  : Contains a list of country ids that belong to a given coalition
 
     currentKey            : number : Value used by the editor to know what index the dictkey and reskeys are on.  
 
     currentKey            : number : Value used by the editor to know what index the dictkey and reskeys are on.  
 
     date                  : table  : The date the mission takes place at with Year, Month, and Day entries
 
     date                  : table  : The date the mission takes place at with Year, Month, and Day entries
     descriptionText        : string :
+
     descriptionText        : string : Mission briefing defined under the "Situation" page on the briefing panel
     descriptionBlueTask    : string :
+
     descriptionBlueTask    : string : Blue coalition task defined on the briefing panel
     descriptionNeutralsTask: string :
+
     descriptionNeutralsTask: string : Neutral coalition task defined on the briefing panel
     descriptionRedTask    : string :
+
     descriptionRedTask    : string : Red coalition task defined on the briefing panel
 
     drawings              : table  : Table containing information on any drawing placed in the editor.
 
     drawings              : table  : Table containing information on any drawing placed in the editor.
 +
    failures              : table  : Only valid for single player missions. Lists failure parameters for whichever aircraft is set to player. If none are set to player it still populates.
 +
    forcedOptions          : table  : Options that are forced by the mission and their corresponding settings.
 
     groundControl          : table  : Data on the number of Combined Arms slots and their respective coalitions is found here
 
     groundControl          : table  : Data on the number of Combined Arms slots and their respective coalitions is found here
 
+
    map                    : table  : Last position of the map view the user was looking at when the mission was saved.
 
     maxDictId              : number : Internal value used to keep track of what the next unit and group id to use is.  
 
     maxDictId              : number : Internal value used to keep track of what the next unit and group id to use is.  
   
 
   
 
 
     pictureFileNameN      : table  : Neutral coalition briefing images
 
     pictureFileNameN      : table  : Neutral coalition briefing images
 
     pictureFileNameB      : table  : Blue coalition briefing images
 
     pictureFileNameB      : table  : Blue coalition briefing images
 
     pictureFileNameR      : table  : Red coalition briefing images
 
     pictureFileNameR      : table  : Red coalition briefing images
 
 
     requiredModules        : table  : Table of mod names whose units are present within the mission.  
 
     requiredModules        : table  : Table of mod names whose units are present within the mission.  
 
     result                : table  : Conditions and actions defined by mission goals in the editor to decide if a mission is "won"
 
     result                : table  : Conditions and actions defined by mission goals in the editor to decide if a mission is "won"
     sortie                : string : Name of the mission as defined in the briefing panel.  
+
    start_time            : number : Time in seconds since midnight for the date set when the mission starts
     trig                  : table  : Table containing every single trigger.  
+
     sortie                : string : Name of the mission as defined in the briefing panel.
 +
    theatre                : string : Name of the map the mission takes place on
 +
    triggers              : table  : Table of trigger zones indexed numerically
 +
     trig                  : table  : Table containing every single trigger.
 +
    trigRules              : table  : Another table containing data on triggers
 
     version                : number : Value used by the mission editor to know roughly which iteration of the editor the mission was saved in. Used for compatibility warning messages if you open a newer mission in an older editor.  
 
     version                : number : Value used by the mission editor to know roughly which iteration of the editor the mission was saved in. Used for compatibility warning messages if you open a newer mission in an older editor.  
 
     weather                : table  : Table with weather data
 
     weather                : table  : Table with weather data

Revision as of 01:09, 16 November 2022

Intro

The mission file is a lua table present within a .miz file that is accessible to the scripting engine via the table env.mission. This table is almost the entirety of the contents of a given mission.

Notes

This page will not dive into excruciating detail of every possible key and value that may exist within a mission file. If you need details it is best to make a mission file on your own with whatever you are looking for, save, open the miz via favorite zip program, and then open the mission file in your favorite text editor to explore from there.

It is highly probable that inactive data is present within any given mission file. For example with the weather table information on static and dynamic weather may both be present if the mission was saved with either active in the past. Some value will decide which is currently active.

Many string values will either have "DictKey" or "ResKey" in the string names followed by numbers. Anything using these values falls under "localization" where the display name or files may be changed to support different speaking language users better.

Data and Samples

    coalition              : table  : Contains all coalition specific data including bullseye, nav_points, and all units. 
    coalitions             : table  : Contains a list of country ids that belong to a given coalition
    currentKey             : number : Value used by the editor to know what index the dictkey and reskeys are on. 
    date                   : table  : The date the mission takes place at with Year, Month, and Day entries
    descriptionText        : string : Mission briefing defined under the "Situation" page on the briefing panel
    descriptionBlueTask    : string : Blue coalition task defined on the briefing panel
    descriptionNeutralsTask: string : Neutral coalition task defined on the briefing panel
    descriptionRedTask     : string : Red coalition task defined on the briefing panel
    drawings               : table  : Table containing information on any drawing placed in the editor.
    failures               : table  : Only valid for single player missions. Lists failure parameters for whichever aircraft is set to player. If none are set to player it still populates. 
    forcedOptions          : table  : Options that are forced by the mission and their corresponding settings. 
    groundControl          : table  : Data on the number of Combined Arms slots and their respective coalitions is found here
    map                    : table  : Last position of the map view the user was looking at when the mission was saved. 
    maxDictId              : number : Internal value used to keep track of what the next unit and group id to use is. 
    pictureFileNameN       : table  : Neutral coalition briefing images
    pictureFileNameB       : table  : Blue coalition briefing images
    pictureFileNameR       : table  : Red coalition briefing images
    requiredModules        : table  : Table of mod names whose units are present within the mission. 
    result                 : table  : Conditions and actions defined by mission goals in the editor to decide if a mission is "won"
    start_time             : number : Time in seconds since midnight for the date set when the mission starts
    sortie                 : string : Name of the mission as defined in the briefing panel.
    theatre                : string : Name of the map the mission takes place on 
    triggers               : table  : Table of trigger zones indexed numerically 
    trig                   : table  : Table containing every single trigger.
    trigRules              : table  : Another table containing data on triggers
    version                : number : Value used by the mission editor to know roughly which iteration of the editor the mission was saved in. Used for compatibility warning messages if you open a newer mission in an older editor. 
    weather                : table  : Table with weather data

Weather