cfrag Posted September 2, 2022 Posted September 2, 2022 (edited) TL;DR: a tiny server script that allows any mission to restart when they set flag "simpleMissionRestart" to 1 Long Story On of the more annoying obstacles in mission design is that there is no unified, easy way to restart a mission. You could use a LOAD MISSION action, but for this to work you need to select the mission itself in the file dialog. This breaks as soon as you change the mission's name. Diligent mission builders, of course, put the mission's version in the name - which will break the LOAD MISSION action unless you remember to change it. Until we have a better, unified 'RESTART MISSION' action (that hopefully arrives one day), we need a work-around. smr is such a work-around. It's a tiny server script and therefore must be added to C:/Users/<YOUR USERNAME>/Saved Games/DCS/Scripts/Hooks to work. Also, the mission must be run as multiplayer for the script to activate. Once the script is active, it inspects the value of the flag "simpleMissionRestart" once a second. If that value is anything other than 0 (zero), the currently running mission is restarted - whatever its name may be. Files Included: smrGUI.lua - server script demo - smr restart.miz - demo mission. must be run in multiplayer with smrGUI installed Enjoy, -ch demo - smr restart.miz smrGUI.lua Edited September 2, 2022 by cfrag 2 1
cfrag Posted June 12, 2024 Author Posted June 12, 2024 26 minutes ago, Beardy McWhisky said: Any tips? From what little I can tell it looks as if you added the "smrGUI" script to a mission. That will not work, it must be added to your server as described in the OP. It's a one-time drop, takes no performance when running and will not interfere with other missions at all.
Mistermann Posted June 12, 2024 Posted June 12, 2024 Thanks for this, Cfrag! I'm one of those guys that puts the option to restart on the F10 menu. 70% of the time I forget to update the RESTART MISSION trigger. This little script is brilliant. Thanks. 1 System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
Wrecking Crew Posted June 12, 2024 Posted June 12, 2024 (edited) 4 hours ago, Mistermann said: Thanks for this, Cfrag! I'm one of those guys that puts the option to restart on the F10 menu. 70% of the time I forget to update the RESTART MISSION trigger. Yep. me too! I put the Load Mission event at the top of the stack to help me remember to change it. Haha - this is from 2018... Ah - 2016... You'd think it would be simple Edited June 12, 2024 by Wrecking Crew 1 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.
Mistermann Posted February 10 Posted February 10 (edited) Hey @cfrag - somehow the use of "smr" no longer works on my server. Might some recent ED undocumented changes be at play here? I checked to make sure I still have smrGUI installed in server hooks folder and verified it was loading in the DCS.log. I don't see any error messages in the log indicating something went wrong (looked for +++ and smr in the log). This used to work fine and I can't find anything in my mission causing the issue. You mind verifying this is still working on your end? Oh, and the lua file says I am running v1.0.0 (created 20220902). If you've updated beyond that, I'm feeling embarrassed. Edited February 10 by Mistermann System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
cfrag Posted February 10 Author Posted February 10 36 minutes ago, Mistermann said: somehow the use of "smr" no longer works on my server. Thank you for the headsup. It seems to work on my setup. smr test.miz
Mistermann Posted February 10 Posted February 10 Thanks! I'll check it out and see what's up. System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
Mistermann Posted February 10 Posted February 10 6 hours ago, cfrag said: Thank you for the headsup. It seems to work on my setup. Strange - didn't work on mine when I tested. However, I went in and deleted and replaced the smrGUI.lua in the hooks folder with the same file extracted from the zip you provided. Stopped and restarted server and voila ... working now. System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
Recommended Posts