MIST writeGroup

From DCS World Wiki - Hoggitworld.com
Revision as of 10:38, 7 July 2021 by Grimes (talk | contribs) (Created page with "{{Mission Scripting |fName= mist.debug.writeGroup| |vNum = Mist 4.5 |desc= Writes the table from the miz file corresponding to the passed group to a file of the same name....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.debug.writeGroup

Added with: Mist 4.5
Description
Writes the table from the miz file corresponding to the passed group to a file of the same name. This is useful for quickly getting the contents of any tasks or custom data for reference or later scripting use. For example writing the table for an aircraft and copying the contents of the payload entry within that table into your own script.
Syntax
nothing mist.debug.writeGroup( )
Valid Input Values:
fileName:
Return value:
nothing
Return example:
Examples here:
   Ground Group
   Ship Group  
   Helicopter Group
   Plane Group
Usage Examples:
The following would output every single group in your mission to their own file.
 for gName, gData in pairs(mist.DBs.groupsByName) do
       mist.debug.writeGroup(gName)	
 end
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