MBot Posted February 7, 2015 Posted February 7, 2015 I am trying to open and re-pack mission files in a LUA for windows environment (outside the game, not in the SSE). The mission editor seems to utilize minizip to handle mission files, so I hoped to use it as well. I have found the lua-minizip.dll and the various functions used by the ME, but I cannot get it to work under windows. First I am confused how minizip is loaded by the DCS ME. The script files use require('minizip'), but there is no minizip.lua or minizip.dll to be loaded anywhere. When I use require('lua-minizip') instead it goes ahead (since there is a dll is called lua-minizip.dll), but the script immediately fails with the error message that the dll is no valid Win32 application. Any ideas how to get this to work?
FSFIan Posted February 7, 2015 Posted February 7, 2015 I assume that -- like the rest of DCS -- the DLL is 64-bit and you are using a 32-bit Lua interpreter. Use "luae.exe" in the "bin" folder of your DCS: World installation. In that case, require("minizip") will also work in addition to require("lua-minizip"). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
chromium Posted February 7, 2015 Posted February 7, 2015 check pm :) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
MBot Posted February 8, 2015 Author Posted February 8, 2015 Thanks for your help guys! I originally wanted to create a standalone exe using srlua, but this would have been based on the LUA for windows interpreter which seems to be 32 bit. What I did now was to place my scripts in a new sub-folder under DCS World and add a bat file which runs everything by the LUA interpreter provided by DCS. Access to minizip functions achieved :)
xcom Posted February 11, 2015 Posted February 11, 2015 MBot, is this thread leading to creating an updated miz file directly from the mission? If so, I want to have it! :) Please consider doing something generic. [sIGPIC][/sIGPIC] BuddySpike Website | Live Map & Statistics BuddySpike Twitch Channel Buddyspike Discord Buddyspike Facebook
Dangerzone Posted April 24, 2022 Posted April 24, 2022 On 2/8/2015 at 1:46 AM, chromium said: check pm Hi, I'm reviving this topic as I'm stuck and also wanting to get minizip to work. It seems like the answer may have been provided via a PM? I was wondering if someone can please help me out too? My issue is that if I use either: local minizip = require("lua- minizip") local zipFile = minizip.unzOpen(Zipfile, MyPath) or local minizip = require("minizip") local zipFile = minizip.unzOpen(Zipfile, MyPath) I get the error attempt to call global 'require' (a nil value) I don't know if it makes any difference but this is being ran outside of the mission itself (I call dofile from within the mission editor to run the file). Thank DZ
chromium Posted April 24, 2022 Posted April 24, 2022 Sorry I don't have experience on editing the mission editor. To see something about minizip try to check in DSMC mod, SAVE.lua file. Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
HC_Official Posted April 24, 2022 Posted April 24, 2022 (edited) On 2/7/2015 at 2:18 PM, MBot said: I am trying to open and re-pack mission files in a LUA for windows environment (outside the game, not in the SSE). The mission editor seems to utilize minizip to handle mission files, so I hoped to use it as well. I have found the lua-minizip.dll and the various functions used by the ME, but I cannot get it to work under windows. First I am confused how minizip is loaded by the DCS ME. The script files use require('minizip'), but there is no minizip.lua or minizip.dll to be loaded anywhere. When I use require('lua-minizip') instead it goes ahead (since there is a dll is called lua-minizip.dll), but the script immediately fails with the error message that the dll is no valid Win32 application. Any ideas how to get this to work? I use 7z to handle doing this very thing Edited April 24, 2022 by HC_Official No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
Chump Posted April 24, 2022 Posted April 24, 2022 12 hours ago, Dangerzone said: I get the error attempt to call global 'require' (a nil value) Open \Scripts\MissionScripting.lua and comment out the following line: _G['require'] = nil 1
Dangerzone Posted April 25, 2022 Posted April 25, 2022 13 hours ago, Chump said: Open \Scripts\MissionScripting.lua and comment out the following line: _G['require'] = nil Wonderful. That was it. I must have overlook this part. Thank you!
Recommended Posts