dark_wood Posted March 28, 2022 Posted March 28, 2022 Hi all, Building complex missions means a lot of flags, and sometime is hard to follow them across the entire mission, so, wouldn’t be great to see them listed in mission or exported to a file? Attached you will find a zip archive which include a LUA script and a .miz example. What you should do: Open the mission in ME, go to triggers, select first trigger (named “Show Flags” – is executed on Mission Start). In ACTIONS tab, select first option, DO SCRIPT Here you will find some settings: exportToFile – values ‘yes’ or ‘no’ – you want flags exported to a file? Choose ‘yes’ pathToFile – if you set previous step to ‘yes’ then you need to specify the path where the file should be exported, in my case: 'D:/ED/DCS.openbeta/Logs/' filename – name of the .txt file which will be exported showMessages – set this to 0 if you don’t want to see the messages in game messageTime – still, if you want to see them, you can set the time in seconds *Note – if you decide to export the log to .txt file, you must allow it from DCS: Comment sanitizeModule('io') on your installation folder, something like: F:\Eagle Dynamics\DCS World OpenBeta\Scripts\MissionScripting.lua It should look like this: sanitizeModule('os') --sanitizeModule('io') sanitizeModule('lfs') >>> You will need to repeat this step after each ED update. **Note – do not delete DO FILE option and make sure you don’t delete any comma or quote when you edit the settings (if you break them, they are inside flag-listing.lua file, commented) After you finished with settings, save the mission and now you can test it. I have added some random flags so you can see the script in action, feel free to add/remove/modify them. Play the mission, choose ‘observer’ or ‘player’ role, hit communication menu, then: F10 Other, __CHECK Flags, _Check If showMessages is set to 1, you will see the flags listed as defined on ME trigger window If exportToFile is set to ‘yes’, check the .txt file created inside folder you defined at pathToFile and named as defined on filename. Each time you will hit _Check in comm menu, a new log file will be created, with name incremented: flag-report_1.txt, flag-report_2.txt and so on, so you can compare them. Inside the txt file should be the flags listed, and at the end, the log time, something like: 3 minutes – this is the time (in minutes) since mission started. If you include it in a mission which use/loads other LUA scripts, make sure is included after all of them – I’m still not very sure how it will work with dynamic added flags. Please let me know if you find this script useful, any feedback is welcome. CHK_FLAGS_v.0.0.1.zip 1 1
ADHS Posted March 28, 2022 Posted March 28, 2022 Hello. Thank you this is very useful specially for missions/campains that you can continue later Well, i am using some kind of Excel to have all plan with actions and flags in columns and rows 1 Democracy was already invented, while Scrat was eating oak fruits.
Rudel_chw Posted March 29, 2022 Posted March 29, 2022 13 hours ago, dark_wood said: Please let me know if you find this script useful, any feedback is welcome. Thanks for sharing this, will give it a try, as it may help me to update my triggers to make use of Named Flags For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
dark_wood Posted March 29, 2022 Author Posted March 29, 2022 2 hours ago, Rudel_chw said: Thanks for sharing this, will give it a try, as it may help me to update my triggers to make use of Named Flags My pleasure @Rudel_chw, I'm opened to all good ideas
Recommended Posts