Jump to content

Recommended Posts

Posted (edited)

If this is of use to anyone who switches graphic settings between settings for 2D/VR, here's my launch script. I created this because I got tired of swapping configs manually when I want to confirm whether bugs were VR specific or not.

 

Modify it, improve it, do whatever you want. Open it in your powershell ISE and change the gamepath, steampath, and VR variables as needed. Backup your startup.cfg files. 

 

Edit; Script is provided as-is/I might not be able to fix any issues you encounter. 

Quote

 

$gamepath = "D:\Steam\steamapps\common\IL-2 Sturmovik Battle of Stalingrad\data\"
$steampath = "D:\Steam\"
$vrpath = "D:\Steam\steamapps\common\SteamVR\bin\win64\"

function Show-Menu
{
    $Title = "Reanimate's IL-2 Launcher"
    Clear-Host
    Write-Host "============== $Title =============="
    
    Write-Host "1: IL-2 Standard."
    Write-Host "2: IL-2 VR."
    Write-Host "3: IL-2 Windowed."
    Write-Host "4: Backup current startup config."
    Write-Host "5: Make new 2D config based on current config."
    Write-Host "6: Make new VR config based on current config."
    Write-Host "======================================================="
    Write-Host "Q: Press 'Q' to quit."
}

Show-Menu
 $selection = Read-Host "Please choose from the menu"
 switch ($selection)
 {
     '1' {
            del "$gamepath\startup.cfg"
            Write-Host 'Removed old startup.cfg' -ForegroundColor Yellow
            copy "$gamepath\startup2d.cfg" "$gamepath\startup.cfg"
            Write-Host 'Added fullscreen startup.cfg' -ForegroundColor Green
            Start-Sleep -s 5
         Start-Process $steampath\steam.exe steam://rungameid/307960
         exit
         }
     '2' {
            del "$gamepath\startup.cfg"
            Write-Host 'Removed old startup.cfg' -ForegroundColor Yellow
            copy "$gamepath\startupvr.cfg" "$gamepath\startup.cfg"
            Write-Host 'Added VR startup.cfg' -ForegroundColor Green
         Start-Process $vrpath\vrstartup.exe
         Start-Sleep -s 5
         Start-Process steampath\steam.exe steam://rungameid/307960/VR
         exit
         }
     '3' {
            del "$gamepath\startup.cfg"
            Write-Host 'Removed old startup.cfg' -ForegroundColor Yellow
            copy "$gamepath\startupwindowed.cfg" "$gamepath\startup.cfg"
            Write-Host 'Added windowed startup.cfg' -ForegroundColor Green
            Start-Sleep -s 5
         Start-Process $steampath\steam.exe steam://rungameid/307960
         exit
         }
     '4' {
            copy "$gamepath\startup.cfg" "$gamepath\startup.bak"
         'Startup config backed up!'
         }
     '5' {
            del "$gamepath\startup2d.cfg"
            copy "$gamepath\startup.cfg" "$gamepath\startup2d.cfg"
         'Startup config saved!'
         } 
     '6' {
            del "$gamepath\startupvr.cfg"
            copy "$gamepath\startup.cfg" "$gamepath\startupvr.cfg"
         'Startup config saved!'
         } 
     'q' {
         return
     }
 }

 

 

Edited by R3animate
  • Like 1
  • Thanks 1

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...