Jump to content

How to setup two Instances on One System


Recommended Posts

Posted

Install Your Server files.

Make a Directory in "Renegade X\UDKGame\Config\ini"

Configure your first Server, start it and close the server.

copy the file "UDKGame.ini" in the "Renegade X\UDKGame\Config\ini" folder and rename it to "UDKGame_1.ini"

Configure your Second Server, start it and close the server.

copy the file "UDKGame.ini" in the "Renegade X\UDKGame\Config\ini" folder and rename it to "UDKGame_2.ini"

you now have two Server inis with 2 Different Names.

Now its time to make your Server.bat file.

This is the Bat file for Server one

@echo off
cd "c:\Program Files (x86)\Renegade X\UDKGame\Config\ini"
copy UDKGame_1.ini ..\UDKGame.ini
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7777

And this is the bat file for Server two

@echo off
cd "c:\Program Files (x86)\Renegade X\UDKGame\Config\ini"
copy UDKGame_2.ini ..\UDKGame.ini
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7777

The best Way is a simple Batch Script

@echo off
:start
echo ########################################
echo # Renegade-x Multiple Server startmenu #
echo #                                      #
Echo # Which server do you want to start ?  #
echo ----------------------------------------
choice /n /c "12x" /m "1 or 2 ? X=Exit this Menu"
if errorlevel 3 goto exit
if errorlevel 2 goto two
if errorlevel 1 goto one

:one
cd "c:\Program Files (x86)\Renegade X\UDKGame\Config\ini"
copy UDKGame_1.ini ..\UDKGame.ini
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7777
cls
echo Please Wait 30sec for Server loading !
ping -n 30 127.0.0.1>NUL

goto start

:two
cd "c:\Program Files (x86)\Renegade X\UDKGame\Config\ini"
copy UDKGame_2.ini ..\UDKGame.ini
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7778
echo Please Wait 30sec for Server LOading
ping -n 30 127.0.0.1>NUL
pause
goto start

:exit

It works on my server without problems :)

Posted

uh, that's a horrible way to do it... it's much cleaner to just use -configsubdir in your command line, so each configuration goes in it's own file.

Eg:

UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7777 -configsubdir=server1
UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -port=7787 -configsubdir=server2

7778 is normally used as a port within the UE3 engine, you should change this in your UDKEngine.ini file, for each server

Posted

Thanks for your info, this I have searched but not found.

I have the script rewritten a bit.

As you've already been writing are in the Config folder now three subfolders with different configs.

I, however, noticed that the server after a certain time simply crashes.

No error windows or the like only a Windows dialog box with the info that the UDK engine no longer works.

For this reason I have my script modified a little.

You can either start all three server individually or let the server run in autostart mode.

I post once the script maybe it can even use a

The Ps tools are needed (so that the UDK server ends)

http://technet.microsoft.com/de-de/sysi ... 96649.aspx

unzip to C: \ pstools otherwise it does not work scipt!

@echo off
:start
echo ########################################
echo # Renegade-x Server starter            #
echo #                                      #
Echo # Which Server ?                     #
echo ----------------------------------------
choice /n /c "123ax" /m "Server 1-2-3 or (a)utostart ? X=Exit"

if errorlevel 5 goto exit
if errorlevel 4 goto autostart
if errorlevel 3 goto drei
if errorlevel 2 goto zwei
if errorlevel 1 goto eins

:eins
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv1 -port=7777
echo Start Server 1
goto start

:zwei
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv2 -port=7779
echo Start Server 2
goto start

:drei
cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv3 -port=7780
echo Start Server 3
goto start

:autostart
cls 
C:\pstools\pskill udk.exe
ping -n 5 127.0.0.1>NUL

echo Start all Servers...
echo Server be stopped after 6 hours and restarted
echo CTRL+C exit the Script

cd "C:\Program Files (x86)\Renegade X\Binaries\Win32"
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv1 -port=7777
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv2 -port=7779
start UDK.exe server CNC-Field.udk?game=RenX_Game.Rx_Game?dedicated=true? -configsubdir=srv3 -port=7780
ping -n 21600 127.0.0.1>NUL
goto autostart

:exit

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...