powershell-startup-script doesn't load the latest save (1.0)

The SF-startup-powershell script doesn't load the latest save when $loadLatestSave is $true. Here is a generated .ini snippet: SF version: 1.0.0.3
[/Script/EngineSettings.GameMapsSettings]
LocalMapOptions=??skipOnboarding?loadgame=Atlantis_autosave_2
GameDefaultMap=/Game/FactoryGame/Map/GameLevel01/Persistent_Level.Persistent_Level
GameInstanceClass=/Script/FactoryGame.FGGameInstance
EditorStartupMap=/Game/FactoryGame/Map/TestMapFactoryGame.TestMapFactoryGame
ServerDefaultMap=/Game/FactoryGame/Map/DedicatedserverEntry.DedicatedserverEntry
GlobalDefaultGameMode=/Game/FactoryGame/-Shared/Blueprint/BP_GameMode.BP_GameMode_C
TransitionMap=
bUseSplitscreen=True
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
[/Script/EngineSettings.GameMapsSettings]
LocalMapOptions=??skipOnboarding?loadgame=Atlantis_autosave_2
GameDefaultMap=/Game/FactoryGame/Map/GameLevel01/Persistent_Level.Persistent_Level
GameInstanceClass=/Script/FactoryGame.FGGameInstance
EditorStartupMap=/Game/FactoryGame/Map/TestMapFactoryGame.TestMapFactoryGame
ServerDefaultMap=/Game/FactoryGame/Map/DedicatedserverEntry.DedicatedserverEntry
GlobalDefaultGameMode=/Game/FactoryGame/-Shared/Blueprint/BP_GameMode.BP_GameMode_C
TransitionMap=
bUseSplitscreen=True
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
if ($loadLatestSave) {
# https://stackoverflow.com/questions/9675658/powershell-get-childitem-most-recent-file-in-directory
# Steam keeps a steam_autocloud.vdf file in here that isn't a savegame

$latestSaveFile = (Get-ChildItem $SaveFolder -Attributes !Directory -Filter *.sav | sort LastWriteTime | select -last 1)
$latestSaveFileName = $latestSaveFile.Basename

$AutolaunchFilePath = "$($env:LOCALAPPDATA)\FactoryGame\$AutolaunchTempFileName"
New-Item $AutolaunchFilePath -ItemType File -Force
Add-Content $AutolaunchFilePath "[/Script/EngineSettings.GameMapsSettings]"
Add-Content $AutolaunchFilePath "LocalMapOptions=??skipOnboarding?loadgame=$latestSaveFileName"
Add-Content $AutolaunchFilePath "GameDefaultMap=/Game/FactoryGame/Map/GameLevel01/Persistent_Level.Persistent_Level`nGameInstanceClass=/Script/FactoryGame.FGGameInstance"

$Args1 = "$Args1", "EngineINI=`"$AutolaunchFilePath`""
}
if ($loadLatestSave) {
# https://stackoverflow.com/questions/9675658/powershell-get-childitem-most-recent-file-in-directory
# Steam keeps a steam_autocloud.vdf file in here that isn't a savegame

$latestSaveFile = (Get-ChildItem $SaveFolder -Attributes !Directory -Filter *.sav | sort LastWriteTime | select -last 1)
$latestSaveFileName = $latestSaveFile.Basename

$AutolaunchFilePath = "$($env:LOCALAPPDATA)\FactoryGame\$AutolaunchTempFileName"
New-Item $AutolaunchFilePath -ItemType File -Force
Add-Content $AutolaunchFilePath "[/Script/EngineSettings.GameMapsSettings]"
Add-Content $AutolaunchFilePath "LocalMapOptions=??skipOnboarding?loadgame=$latestSaveFileName"
Add-Content $AutolaunchFilePath "GameDefaultMap=/Game/FactoryGame/Map/GameLevel01/Persistent_Level.Persistent_Level`nGameInstanceClass=/Script/FactoryGame.FGGameInstance"

$Args1 = "$Args1", "EngineINI=`"$AutolaunchFilePath`""
}
Solution:
What I've tried without success: created a file named "steam_appid.txt" in the folder "c:\Program Files (x86)\Steam\steamapps\common\Satisfactory" . I wrote the following in the file: 526870...
Jump to solution
14 Replies
Robb
Robb•2mo ago
it seems like something changed for steam in 1.0 - it opens the game twice, the first copy crashes, and then the second copy opens but doesn't get any launch args do you have the game on epic to try it there perchance?
Mircea
Mircea•2mo ago
That has always been the case That's why the asset toolkit command has -NoSteamClient
Robb
Robb•2mo ago
-NoSteamClient is already included in the script's common args that it uses every time
remoe
remoeOP•2mo ago
no, sorry
Robb
Robb•2mo ago
I'll update my epic copy to 1.0 and try it out
remoe
remoeOP•2mo ago
There are some logs to force exit in the first start:
[ 0]LogOnlineServices: Game restarting within Steam client, exiting
[ 0]LogWindows: FPlatformMisc::RequestExit(0, <NoCallSiteInfo>)
[ 0]LogWindows: FPlatformMisc::RequestExitWithStatus(0, 0, <NoCallSiteInfo>)
[ 0]LogCore: Engine exit requested (reason: Win RequestExit)
[ 0]LogOnlineIntegration: Error: Failed to initialize 'STEAM' online backend
[ 0]LogOnlineIntegration: Error: Failed to initialize backend Platform
[ 0]LogOnlineServices: Game restarting within Steam client, exiting
[ 0]LogWindows: FPlatformMisc::RequestExit(0, <NoCallSiteInfo>)
[ 0]LogWindows: FPlatformMisc::RequestExitWithStatus(0, 0, <NoCallSiteInfo>)
[ 0]LogCore: Engine exit requested (reason: Win RequestExit)
[ 0]LogOnlineIntegration: Error: Failed to initialize 'STEAM' online backend
[ 0]LogOnlineIntegration: Error: Failed to initialize backend Platform
It's the Steam client :/ It terminates the Satisfactory process on the first launch. When I enter these parameters directly as startup parameters in the Steam client:
-EpicPortal -NoSteamClient -NoMultiplayer -nosplash -log -windowed -WinX=0 -WinY=32 ResX=960 ResY=1040
-EpicPortal -NoSteamClient -NoMultiplayer -nosplash -log -windowed -WinX=0 -WinY=32 ResX=960 ResY=1040
Then it doesn't exit.
Archengius
Archengius•2mo ago
I don't really think there is a clean way to make this work on a shipping build steam app id is kinda hardcoded and the option does not do anything anymore either so what you should do is make the script put steam_appid.txt next to the FactoryGameSteam-Win64-Shipping.exe with the appid of satisfactory inside and that should fix the relaunch issue and also make steam login work
Solution
remoe
remoe•2mo ago
What I've tried without success: created a file named "steam_appid.txt" in the folder "c:\Program Files (x86)\Steam\steamapps\common\Satisfactory" . I wrote the following in the file: 526870 because of https://store.steampowered.com/app/526870/Satisfactory/ Then I ran the powershell script. It still kills the first SF process. And remove of the following parameters doesn't help:
-NoSteamClient -NoMultiplayer
-NoSteamClient -NoMultiplayer
remoe
remoeOP•2mo ago
Ok, I've ran procmon and found that the steam_appid.txt need to be placed in
"c:\Program Files (x86)\Steam\steamapps\common\Satisfactory\Engine\Binaries\Win64"
"c:\Program Files (x86)\Steam\steamapps\common\Satisfactory\Engine\Binaries\Win64"
Folder. Now it's possible to load any saved game and it breaks on breakpoints! 🥳 does it work on your side?
Robb
Robb•2mo ago
haven't gotten to test it yet sorry, will do that now
Robb
Robb•2mo ago
worked on epic EA, here is the exact (WIP) script I used
No description
Robb
Robb•2mo ago
Robb
Robb•2mo ago
PS C:\Git\SF_ModProject\RobWorkingDir> .\SFLaunch_Advanced.ps1 -branch EA -launcher epic
remoe
remoeOP•2mo ago
Then we can mark this as resolved?
Want results from more Discord servers?
Add your server