Jump to content

Simple Mission Restart (smr) - server script to simplify mission restart


Recommended Posts

Posted (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 by cfrag
  • Like 2
  • Thanks 1
  • cfrag changed the title to Simple Mission Restart (smr) - server script to simplify mission restart
  • 1 year later...
Posted
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. 

Posted

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.

  • Like 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

 

Posted (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 by Wrecking Crew
  • Like 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.

  • 7 months later...
Posted (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 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

 

Posted

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

 

Posted
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

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...