RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

Change game mode for dedicated server?
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=5&t=2235
Page 1 of 2

Author:  Martan [ Fri Apr 10, 2015 12:29 pm ]
Post subject:  Change game mode for dedicated server?

When running a server with rwr_server.exe how do I change/set game mode for the server?
I've tried runing rwr_server.exe and then any doit.bat, like the doit_classic.bat after the server is up. But I always get an error asking me to start rwr first. I've also tried to have the game running but get the same error.

http://i.imgur.com/zwmd8eL.png

What I am trying to achieve is making a server running the "The Time After" mod.

Author:  pasik [ Fri Apr 10, 2015 12:51 pm ]
Post subject:  Re: Change game mode for dedicated server?

That would be the way to run the mode all right, but looks like the script is unable to connect to the server for some reason. Can you post your rwr_server.log from the server folder to pastebin?

Author:  Martan [ Fri Apr 10, 2015 1:03 pm ]
Post subject:  Re: Change game mode for dedicated server?

pasik wrote:
That would be the way to run the mode all right, but looks like the script is unable to connect to the server for some reason. Can you post your rwr_server.log from the server folder to pastebin?

Here's my log
http://pastebin.com/DdWCRwiT

Author:  pasik [ Fri Apr 10, 2015 1:24 pm ]
Post subject:  Re: Change game mode for dedicated server?

The named pipe names are matching at least, so it would seem to be correctly configured.

It probably doesn't help if you call reinit_comms in the console and then run the script?

It might be some kind of permission related issue for creating the pipes. There's a secondary way too using anonymous pipes, that's what the game build does with campaign, and it should be possible to use them with servers too I think, have to check how it was.

Author:  Martan [ Fri Apr 10, 2015 1:42 pm ]
Post subject:  Re: Change game mode for dedicated server?

I tried the reinit_comms before running the script but the issue remains. By the way, the string ANONYMOUS is my computers name and the string Administrator my username on the computer.

Author:  pasik [ Fri Apr 10, 2015 4:58 pm ]
Post subject:  Re: Change game mode for dedicated server?

Regarding my comment about anonymous pipes, silly me, try this:
- launch rwr_server.exe
- in the RWR server console type metagame_selfstart start_classic.php
- that's it.

You won't get any debug display from the script handling this way, but you can verify if it's running by looking at media\packages\vanilla\scripts\metagame.log.

Author:  Martan [ Fri Apr 10, 2015 6:48 pm ]
Post subject:  Re: Change game mode for dedicated server?

When I type that into the console I get this in metagame.log
Code:
18:46:48 command line parameters:
18:46:48 media/packages/vanilla/scripts/start_classic.php
18:46:48 ----------------
18:46:48 fifo i=\\ANONYMOUS\pipe\rwr_server_out, o=\\ANONYMOUS\pipe\rwr_server_in
18:46:48 comms, fifo i=\\ANONYMOUS\pipe\rwr_server_out, o=\\ANONYMOUS\pipe\rwr_server_in
18:46:48 opening out fifo \\ANONYMOUS\pipe\rwr_server_in
18:46:56 PHP ERROR: fopen(\\ANONYMOUS\pipe\rwr_server_in): failed to open stream: No such file or directory
18:46:56 file C:\Users\Administrator\Desktop\RWRServer\media\packages\vanilla\scripts\internal\comms.php, line 81
18:46:56 failed to open \\ANONYMOUS\pipe\rwr_server_in -- start rwr first?

Author:  pasik [ Fri Apr 10, 2015 7:33 pm ]
Post subject:  Re: Change game mode for dedicated server?

Absolutely true btw, I missed one thing that by default does things differently on the servers vs the game.

You need to have a file called metagame.xml in the server folder with the following contents to use anonymous pipes:
Code:
<metagame>
  <interface in="" out=""/>
</metagame>


With that in place metagame.log should start with:
Code:
19:31:39 command line parameters:
19:31:39 media/packages/vanilla/scripts/start_classic.php
19:31:39 anonymous_pipes
19:31:39 ----------------
19:31:39 fifo i=php://stdin, o=php://stdout
19:31:39 comms, fifo i=php://stdin, o=php://stdout
19:31:39 opening out fifo php://stdout
19:31:39 opening in fifo php://stdin

Author:  Martan [ Fri Apr 10, 2015 7:45 pm ]
Post subject:  Re: Change game mode for dedicated server?

The metagame.xml did the trick! Thank you so much for all the help.

Author:  Martan [ Fri Apr 10, 2015 9:07 pm ]
Post subject:  Re: Change game mode for dedicated server?

Got one more question though. When using the metagame_selfstart command in the server console. Is there a way to make it choose another folder instead for the vanilla when looking for the scripts folder?
Since it will check in the media\packages\vanilla\scripts folder right now. I want it to check the media\packages\zombie\scripts folder instead.

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/