ruprecht Posted March 5, 2015 Share Posted March 5, 2015 (edited) Hi, I've just realised, after hours of thinking my script was bugged, that a Lua script that is updated "behind the scenes" isn't refreshed in the .miz file unless it's removed from triggers and re-added. Does anyone have a sneaky trick for forcing DCS to update scripts in the .miz? Thanks *edit* also thanks to the guys behind MIST and Witchcraft, you rock. Edited March 5, 2015 by ruprecht DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 | Streaming DCS sometimes: Link to comment Share on other sites More sharing options...
FSFIan Posted March 5, 2015 Share Posted March 5, 2015 I don't know if there is a way to do it in the mission editor. Because .miz files are ZIP archives, you could automate the task with a batch file. Look at 7-zip's "u" (update) command. Try something like this: 7z u mymission.miz myscript.lua You will have to test what happens if you do this while the mission editor is running (it may overwrite it again with the old version when you save). But I guess that clicking File -> Save in the ME, running your batch file, then clicking File -> Load in the ME is still more convenient than deleting and recreating your trigger action(s), especially if you are updating multiple script files at once. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Shahdoh Posted March 5, 2015 Share Posted March 5, 2015 Assuming you are using the "Do Script File" function, all you need to do is "open" the file (in the ME) again after the script has been saved in your editor of choice (Notepad++). No need to remove the trigger before hand. Link to comment Share on other sites More sharing options...
ruprecht Posted March 5, 2015 Author Share Posted March 5, 2015 Thanks guys DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 | Streaming DCS sometimes: Link to comment Share on other sites More sharing options...
etcher Posted March 5, 2015 Share Posted March 5, 2015 Another solution is to include a dummy script file in the mission that only does: dofile("path/to/my-script.lua") Now you can work on "my-script.lua", and have it automatically reloaded whenever the mission starts. Upon release, all that's left to do is to include the actual "my-script.lua" in the mission via the ME. 1 [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
vicx Posted March 5, 2015 Share Posted March 5, 2015 Thanks Etcher. That way really is foolproof. Link to comment Share on other sites More sharing options...
Wrecking Crew Posted March 5, 2015 Share Posted March 5, 2015 I keep a revision number at the end of each iteration of the script file, ie: 01, 02, 03, .. When I make a change, I increment the rev, and point the Do Script File to the new revision. This way I have all the old versions if I need them. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site. Link to comment Share on other sites More sharing options...
ruprecht Posted March 6, 2015 Author Share Posted March 6, 2015 I keep a revision number at the end of each iteration of the script file, ie: 01, 02, 03, .. When I make a change, I increment the rev, and point the Do Script File to the new revision. This way I have all the old versions if I need them. WC I use Git for the same thing. Also allows me to sync my mission folder between my workstation and my cockpit PCs. DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 | Streaming DCS sometimes: Link to comment Share on other sites More sharing options...
Recommended Posts