SNAFU Posted May 17, 2013 Posted May 17, 2013 (edited) I am sure it has been asked before somewhere, but where? Is there a way to write all units, zones and trigger existing in the *.miz file into a separate file? My idea was to create a template of randomly created scenery units (f.e. trucks driving around in the airport, planes approaching, border checkpoints, ship traffic, SAM sides etc.) and to load these template units in the beginning via a script. I looked through the SSE wiki, the forum and the MIST guides to find a hint, but couldn´t, only found the MIST.DB functions. They seem to do something similar I am looking for, but the explanation is too short for me to understand, where they write the data to.. etc ;) If this doesn´t exist yet, is there the intention to implement such a function in the future? Thanks in advance... Edited May 17, 2013 by SNAFU [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Grimes Posted May 17, 2013 Posted May 17, 2013 More or less yes, but you have to modify some files. Specifically you need to comment out the line that sanitizes the lfs and io libraries. You comment the lines out in missionScripting.lua found in scripts folder of the DCS install. Be warned, these files are sanitized for a reason. --sanitizeModule('io') --sanitizeModule('lfs') Mist features a function that writes data to a text file. Its incredibly valuable for bug testing assorted scripts, especially with tables. For instance the following line would write a text file of the groupsByName DB. mist.debug.writeData(mist.utils.serialize,{'mist.DBs.groupsByName', mist.DBs.groupsByName}, 'mist.DBs.groupsByName.txt') To write a text file of the mission you can use mist.debug.writeData(mist.utils.serialize,{mission', env.mission}, 'mission.txt') 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
SNAFU Posted May 17, 2013 Author Posted May 17, 2013 Thanks for the help, Grimes! :thumbup: Will try this in the evening... [sIGPIC][/sIGPIC] Unsere Facebook-Seite
pakfront Posted May 17, 2013 Posted May 17, 2013 also worth mentioning that the .miz files are actually .zip files. If you open it up with 7-Zip or a similar program you will see a file called 'mission' which is essentially a lua file defining the mission. You may be able to extract what you need from there.
Recommended Posts