Jump to content

Recommended Posts

Posted (edited)

I use the custom presets in the DCS system options menu to toggle between my preferred 2D and VR presets.  I would love if DCS itself could be launched with a flag (e.g. "--custom2-preset") to apply the desired profile from a Windows shortcut.  That way, I could combine it with the "--force-enable-VR" flag to create direct-launching DCS 2D and DCS VR shortcuts which pre-load the relevant settings profiles.  No mess, no fuss.

There are a handful of extremely useful DCS launcher utilities already in existence which variously get close to this.  I've tried a few and found them chockful of features, but haven't found that any provides a way to do exactly what I want (at least, not that I've figured out!).  So I knocked up my own, which works exactly like I wanted, and figured I'd share it.

Usage: dcs_launch.exe [OPTIONS] [ARGS]

Arguments:
  ARGS Arguments to pass to DCS executable [optional]

Options:
  --dcs-bin PATH                  [required]
  --dcs-saved-games PATH          [required]
  --profile-id INTEGER            [required]
  --help                          Show this message and exit.

Simply create a shortcut to this launcher, and set the --dcs-bin, --dcs-saved-games, and --profile-id options in the shortcut target.  You can add any additional arguments as well, which will be forwarded on to DCS.  The launcher will pick up the custom profile options in your saved games folder and integrate them into the options.lua file before launching DCS.  By allowing you to specify the DCS bin directory, you can create separate shortcuts to ST and MT as you wish.

Example shortcut target:

C:\Users\<username>\Downloads\dcs_launch.exe --dcs-bin "C:\Program Files\Eagle Dynamics\DCS World OpenBeta\bin-mt" --dcs-saved-games "C:\Users\<username>\Saved Games\DCS.openbeta" --profile-id 2 --force_enable_VR

Why is it 8-freaking-MB!?  Because I knocked it up in Python, and so the .exe includes an entire Python DLL (I used Nuitka for packaging).  I'll include the extremely short Python script for anyone who wants a look-see.

Just - please - if you want to try this SAVE A COPY OF YOUR  OPTIONS.LUA FIRST.  This script rewrites the file, and while it hasn't been a problem in my extremely limited 5-minutes of testing, consider yourself warned.

 

dcs_launch.exe dcs_launch.py

Edited by potneros
formatting
  • Recently Browsing   0 members

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