Page 1 of 1

Q: Batch file launch

Posted: 29 Aug 2016, 14:22
by Plaargath
Greetings, fellow stalkers.

I've got a question. I could launch SoC/CoP with a *.bat calling this:

Code: Select all

xrEngine.exe -external -start server(savename/single/alife) client(localhost)

How do I do that with this engine?

Re: Q: Batch file launh

Posted: 29 Aug 2016, 16:14
by Alundaio
The same way but you may need -ltx fsgame_coc.ltx, too

But, why? You want to launch new game instantly? For testing?

Re: Q: Batch file launh

Posted: 31 Aug 2016, 14:33
by Plaargath
Yes, I usually operate on three saves while developing something and to make it all more convenient I launch directly from shortcuts.

Hmm, strange. I cannot get it to work, short after the splash screen pops up I'm getting an error with

Code: Select all

Cannot open file "fsgame.ltx". Check your working folder.

even after renaming fsgame_coc.ltx to fsgame.ltx (both with altering the line accordingly or not). Both with the -ltx... you wrote about added to the line and without it. Both with calling it from _bin level and main folder level (one up from _bin). Also tried via windows shortcut that's launching the .bat and altering the "start in" box - no success.
Also observed that launching just pure xrEngine.exe gives the same error.

To be 100% clear, the batch is two lines long, it goes like this:

Code: Select all

@cd b:\STALKER\11_CoC\_bin
@b:\STALKER\11_CoC\_bin\xrEngine.exe -external - noprefetch -ltx fsgame_coc.ltx -start server(plaargath - quicksave.scoc/single/alife) client(localhost)

So I tried calling Stalker-CoC.exe instead, it went past splashscreen, a bit blank, loading background appeared and shortly after that I got a CTD with another "Fatal Error" window poping up:

And I double checked, "plaargath - quicksave.scoc" is a valid file name, it's there.

Any idea how to make it work?

Re: Q: Batch file launh

Posted: 31 Aug 2016, 15:41
by Alundaio
I believe it should be -fsltx, I was mistaken.

Also you have a space between the '-' and noprefetch

Re: Q: Batch file launh

Posted: 31 Aug 2016, 16:52
by Plaargath
I changed those two things and now I'm getting the same fatal error as on the screen I attached before - both on calling xrEngine.exe or Stalker-CoC.exe.

I also tried to start the line wiht "start" like I saw you did - same effect.

Re: Q: Batch file launch

Posted: 13 Nov 2016, 09:05
by Alundaio
Realized your problem, it should be

Code: Select all

-start server(savegame/single/alife/load) client(localhost)

You are missing load

Re: Q: Batch file launch

Posted: 07 Jul 2017, 12:29
by Plaargath
Yes, I know this is a chess player reaction time...

I try to do this on 1.4.22 and I still get those CTDs after adding the missing '/load'.
This is the batch:

Code: Select all

@start Stalker-CoC.exe -dbg -external -noprefetch -fsltx fsgame.ltx -start server(q1.scoc/single/alife/load) client(localhost)

I make sure that the file is there, I try without the -fsltx part and with it, I tried typing some paths along with bare filename q1.scoc (this one got me launched to main menu understandably), tried with both q1.scoc and q1.scop - no effect. I don't get it :(

And this is the CTD window:
Expression : new_only || no_assert && xr_strlen(game_name)
Function : CALifeUpdateManager::load
File : alife_update_manager.cpp
Line : 283
Description : Cannot find the specified saved game
Arguments : q1.scop

stack trace:

0023:006C3813 xrCore.dll, xrDebug::fail()
0023:04D1A70E xrGame.dll, CDialogHolder::IgnorePause()
0023:04D06B83 xrGame.dll, CDialogHolder::IgnorePause()
0023:77223406 ntdll.dll, RtlQueryPerformanceCounter()
0023:77223431 ntdll.dll, RtlQueryPerformanceCounter()
0023:006C57C7 xrCore.dll, str_container::dock()
0023:04DD98A9 xrGame.dll, CDialogHolder::IgnorePause()
0023:006C89C9 xrCore.dll, CInifile::remove_line()
0023:006C755F xrCore.dll, CInifile::r_string()
0023:006C4972 xrCore.dll, xrMemory::mem_alloc()
0023:05058260 xrGame.dll, xrFactory_Destroy()

Re: Q: Batch file launch

Posted: 12 Jul 2017, 23:30
by Alundaio
Hmm then not sure, maybe the comment needs the local path to the savegame,