Script tool for Saving and Restore main.mcf

  • Until IPACS finds the time to come up with a means of saving a flight scenario, please could some smart script writer provide a work around that saves the C:\Users\YOURUSERNAME\Documents\Aerofly FS 2\main.mcf files with a user selected name - or at least just appending the date-time for the new name.

    Then the script would provide a list of those main_Flight_KSFO_KLAX.mcf, main_07-17-17_08:30.mcf, etc files and let us select one to copy to main.mcf before startup of FS2. This would allow us to have the different Navigation routes and restore them.

    Pretty please

    Thanks

    Dave

  • Hi Dave,

    I'm still busy right now and we also have to write the tutorials but I'll try to script something in the next couple of days.

    Thinking of a tool that can modify the main.mcf to change the flight plan. Maybe even display it on a map (in the future)

    Also, I'm going to ask the developers if we can simply add a function for this now. We will need some way to store flight plans at some point in the future, would be nice to be able to do it now, since this isn't too complicated I think.

  • Jan,

    Thanks for all your efforts on this amazing flight sim! My career was with the US Navy and Boeing Seattle (BTW, we need a Boeing Max 737 10 or 787 sometime!) doing engineering flight sims and FS2 has rekindled my interest due to it being the best VR flight sim BY FAR!! Your effort on the "Q" and other autopilot/autothrottles recently is truly notable! We are very fortunate to have you on the team!

    One thing to note about the MCF file is that in addition to the flight plan, all the other settings - which aircraft and where it should start, etc. are also part of the info that makes it into a "scenario" for me. When I start with that - I would set everything up (aircraft, field location, flight plan, weather, time of day, etc.) for takeoff and then exit, then save it using this tool. Then later, I could restore it and start with exactly the same situation.

    Thanks again

    Dave W.

    • Official Post

    One thing to note about the MCF file is that in addition to the flight plan, all the other settings - which aircraft and where it should start, etc. are also part of the info that makes it into a "scenario" for me. When I start with that - I would set everything up (aircraft, field location, flight plan, weather, time of day, etc.) for takeoff and then exit, then save it using this tool. Then later, I could restore it and start with exactly the same situation.

    That is a great idea, thanks for the hint.

  • Alright,

    I wrote a small PowerShell script that I think will fill the gap, it ain't pretty, but does the job.

    1) Download the file afs2configmanager.ps1.txt

    2) Rename the file to just .ps1 on the end

    3) Right click and select "run with Powershell"

    4) You may have to hit Y to allow execution

    ...

    6) Profit!

    It should be fairly self explanatory, but let me know if you have any questions or suggestions for enhancements. The only thing I might add is to fire it up in VR mode directly. NOTE: Be very careful with scripts you download from the internet, and always back up!


  • Hi,

    Seems like a great little tool....but...how does this work? I try to start it, I see something happen very fast but no menu or anything. BTW, is this safe?? I just tried it but then realised that it might be dangerous to use.

  • Please note that during development, at times, updates may change the main.mcf file. Please proceed with caution to use any 3rd party application that modifies, backs up, or copies this file for later use.

    IPACS Development Team Member

    I'm just a cook, I don't own the restaurant.
    On behalf of Torsten, Marc, and the rest of the IPACS team, we would all like to thank you for your continued support.

    Regards,

    Jeff

  • @cofeecup1978

    Thanks for your efforts - with caveats from Jeff, it would work until the next release possibly - then editing of the the MCF file might be required?? It would be much better if IPACS could simply provide this fairly simple issue!


    @ others

    You have to use Win 10 powershell - maybe a little out-of-the-ordinary for some of us.

    You could run a BAT file with the contents:

    powershell -ExecutionPolicy ByPass -File afs2configmanager.ps1

    Security Note:

    powershell security is discussed here:

    https://stackoverflow.com/questions/4037…-on-this-system


    Dave W.

  • @ others

    You have to use Win 10 powershell - maybe a little out-of-the-ordinary for some of us.

    It runs fine in my Win8 install (PSv3), and I don't see any reason why it wouldn't work in Win7 as it is just using base cmdlets that should be v2 compliant.

    Tnx. I run win 7. Is that a problem?

    Try to create a bat file with Dave's command in it (Thanks Dave!) in the same folder:

    You could run a BAT file with the contents:


    powershell -ExecutionPolicy ByPass -File afs2configmanager.ps1

    Please note that during development, at times, updates may change the main.mcf file. Please proceed with caution to use any 3rd party application that modifies, backs up, or copies this file for later use.

    Good point Jeff. I might add a check if there is a version control number in the file to prevent it from restoring it.

    Again, this was a quick workaround, but use with care, and please back up your main.mcf, especially after upgrading to a new version.