remoe
remoe
SMSatisfactory Modding
Created by remoe on 9/27/2024 in #help-developing-mods
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`""
}
24 replies
SMSatisfactory Modding
Created by remoe on 9/25/2024 in #help-developing-mods
Can't run Alpakit with latest SML (for 1.0) and Unreal 5.3.2-CSS
I can't build any Mod with Alpakit. It was running in the past. Could be files that are not in the project folder. The error is: LogAlpakit: Error: [Package SML] RunUAT.bat ERROR: Visual studio and/or AutomationTool.csproj was not found, nor was Engine\Binaries\DotNET\AutomationTool\AutomationTool.dll. Can't run the automation tool. LogAlpakit: Display: [Package SML] BUILD FAILED
18 replies