chromium Posted April 25, 2016 Posted April 25, 2016 Hello, has anyone tried yet to add a trigger to the "mission" file inside the miz archive by script? 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.
FSFIan Posted April 25, 2016 Posted April 25, 2016 The way that question is asked, you may get a "yes" from someone who has tried it before (unlikely), but no one can answer "no" because they can't rule out the possibility that there is someone else out there that did try it. I assume you want to know if it is possible and if so, how to do it. We are going to need more information to be able to answer that question. Is the script running inside a mission, in another Lua environment inside DCS (e.g. server), or as a standalone Lua script? Is the mission running when you want to make that modification? Is it a single player mission (might be possible) or a multiplayer mission (probably won't work because the DCS.exe process has that file open)? Has the sanitation module been disabled (whether this is required depends on where the script is running)? And the most important one -- what are you trying to achieve with that in the first place? (There might be an easier solution.) DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
chromium Posted April 25, 2016 Author Posted April 25, 2016 the script is a modification of the multiplayer interface and isn't running in any effective environment. You might better think about it as a external app that unzip the miz archive and then re-zip it after modifications. Given access to the mission table and the dictionary table, I would need to know what step are needed or which entries are required to create a "doscript" trigger that should be run at mission start, and isn't previously existing... regardless of the mission table that has been loaded from the miz archive. I'm testing a version of DAWS Weather that currently parse a real world weather (given the ICAO code of a reference airport) and parse it into static weather engine parameters at every server start command. But I need to give the metar string information available to the clients who join the server. My ideal solution would be to add a "radio item" trigger that will give a text message at any request by F10 radio menù. 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.
Grimes Posted April 26, 2016 Posted April 26, 2016 I have modified missions in the past. To get an idea of the correct formatting its always a good idea to just make a mission with the needed trigger created and open it up the miz in a zip archive program to see what has been generated. mission.trig and mission.trigrules are where the triggers are actually defined. You will also need to read and modify mission.maxDictId when generating dictionary keys that are used to lookup appropriate values in the l10n folders dictionary or resource files. Which also means modifying both those files (in each localization subfolder if applicable) if a relevant addition was created there. 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
Recommended Posts