MIST writeGroup
From DCS World Wiki - Hoggitworld.com
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.
Optional value data if present will write what is returned via mist.getGroupData for that group. Otherwise the function uses mist.getGrouoTable |
Syntax |
nothing mist.debug.writeGroup(string groupName , boolean data ) |
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 |