Difference between revisions of "MIST dump G"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.debug.dump_G| |vNum = Mist 1.0 |desc=Dumps the global environment (using mist.utils.tableShow) to Saved Games/DCS/Logs/fileName.| |rtnType...")
 
 
Line 5: Line 5:
 
|vNum = Mist 1.0
 
|vNum = Mist 1.0
  
|desc=Dumps the global environment (using mist.utils.tableShow) to Saved Games/DCS/Logs/fileName.|
+
|desc=Dumps the global environment (using mist.utils.tableShow) to Saved Games/DCS/Logs/fileName. The optional value removes entries for mist, slmod, env.mission, env.warehouses, country.by_idx, and country.by_country. These are entries I commonly remove to simplify the file as they can add quite a lot of extra data to the file.
 +
 
 +
|
  
 
|rtnType= nothing
 
|rtnType= nothing
Line 16: Line 18:
 
|reqType4=  
 
|reqType4=  
  
|optType1=  
+
|optType1= boolean
 +
|optName1= simple
 +
 
 +
|optType2=
 +
|optName2=
 +
 
 +
|varExamples=  
  
 +
fileName: "whatever.lua"
  
|varExamples= nothing
+
simple: true
  
 
|rtnExamples= nothing
 
|rtnExamples= nothing
Line 25: Line 34:
 
|example= <code>
 
|example= <code>
 
   do
 
   do
   mist.debug.dump_G('gDumpV126')
+
   mist.debug.dump_G('gDumpV2573.lua')
 
   end
 
   end
 
</code>
 
</code>

Latest revision as of 10:30, 7 July 2021


mist.debug.dump_G

Added with: Mist 1.0
Description
Dumps the global environment (using mist.utils.tableShow) to Saved Games/DCS/Logs/fileName. The optional value removes entries for mist, slmod, env.mission, env.warehouses, country.by_idx, and country.by_country. These are entries I commonly remove to simplify the file as they can add quite a lot of extra data to the file.
Syntax
nothing mist.debug.dump_G(string fileName , boolean simple )
Valid Input Values:
fileName: "whatever.lua"

simple: true

Return value:
nothing
Return example:
nothing
Usage Examples:
 do
 mist.debug.dump_G('gDumpV2573.lua')	
 end

Notes:
For functions mist.debug.dump_G, mist.debug.writeData, and mist.debug.dumpDBs, 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