Closed TBBle closed 3 years ago
Trying to work out why
ue4 run Highrise?Bots=8 -server -nosteam
doesn't pass Bots through to the started server, I realised that the command being generated was
Bots
D:\Unreal\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Cmd.exe D:\Unreal\ShooterGame\ShooterGame.uproject -stdout -FullStdOutLogOutput Highrise?Bots=8 -server -nosteam
but UE4 (4.24 here) isn't parsing the URL that late in the CLI, so it needs to be
D:\Unreal\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Cmd.exe D:\Unreal\ShooterGame\ShooterGame.uproject Highrise?Bots=8 -server -nosteam -stdout -FullStdOutLogOutput
i.e. in UnrealManagerBase.runEditor, extraFlags needs to be interpolated immediately after projectFile, not at the end. The below seems to work in my testing:
UnrealManagerBase.runEditor
extraFlags
projectFile
Utility.run([self.getEditorBinary(True), projectFile, *extraFlags, '-stdout', '-FullStdOutLogOutput'], raiseOnError=True)
That's a rather bizarre (and brittle) parsing behaviour that UE4 is exhibiting there. Oh well, at least we know how to work around it.
"Brittle" is a kind term to use for UE4's command-line parsing setup.
Trying to work out why
doesn't pass
Bots
through to the started server, I realised that the command being generated wasbut UE4 (4.24 here) isn't parsing the URL that late in the CLI, so it needs to be
i.e. in
UnrealManagerBase.runEditor
,extraFlags
needs to be interpolated immediately afterprojectFile
, not at the end. The below seems to work in my testing: