MIST writeTypes

From DCS World Wiki - Hoggitworld.com


mist.debug.writeTypes

Added with: Mist 4.5
Description
Writes a table of data from your mission file. Contains entries for unit type names, countries, livery names, and CLSIDs. The table that is written is returned in the function.
Syntax
table mist.debug.writeTypes(string fileName )
Valid Input Values:
fileName:
Return value:
table
Return example:
The following is a rough outline of the table format:
   {
    countries = {
       [countryName] = {
          [categoryName] = {
              [unitTypeName] = number of that type for that country,
           },
       },
    },
   units = {
      [unitTypeName] = {
          count = total number of this type in the mission,
          pylons = {
              [pylonIndex] = {
                  [CLSID value] = number of times it is used on that pylon
              },
          }, 
          CLSID = {
             [CLSID value] = number of times it is used on that aircraft,
          },
          livery_id = {
             [countryName] =
                 [liveryName] = number of times livery is used for that country,
             },
          },
      },
    }, 
  }
Usage Examples:
The following would output the data to the pass filename.
       mist.debug.writeTypes('myMission.lua')
Notes:
For this debug function you must (temporarily!) unprotect the Lua environment and enable the io and lfs libraries. You do this by commenting out the sanitizeModule calls in <DCS main directory>/Scripts/MissionScripting.lua. Just be sure to re-protect yourself later when you run missions from untrusted sources.
Related Functions
writeData, dumpDBs, dump_G, writeGroup, writeTypes, changeSetting

Scripting Engine

MIST Root Page