Jump to content

[TESTING] Local Server for Testing porpuses


Merak_Haguen

Recommended Posts

In this topic i'll go into how to create a local server and how to test it with multiple clients and loging every action.

Setting up a local server:

First, to setup a local server you need to run a certain command i'll post bellow on CMD (Command Prompt)  or Powershell. The command accept parameters separated by a character "?", but during my testing, i found out that not every available parameter can be overridden on a single command line command, so in that case, you might want to check and edit the following file:

Renegade-X\UDKGame\Config\UDKRenegadeX.ini

I would recommend doing a backup of the UDKRenegadeX.ini file

The file contains a bunch of tags that defines some server settings, for example InitialCredits, as there you can set up the initial credits a player will have when it joins the server. The value must be changed/placed after the equal sign.

Bellow is an example of a command i use to create a server for testing purposes, using a mutator i created (note that you might need to adjust the game path):

start E:\Games\Renegade-X\Binaries\Win64\UDK.exe server CNC-Walls?mutator=RenX_Mutator_Epic_Units.RenX_Mutator_Epic_Units?maxplayers=64?bRequiresPassword=0?AdminPassword=TestAdmin?SERVER_NAME="Merak_Hagen_Epic_Units"?GameName="Merak_Hagen_Epic_Units"?TimeLimit=0?ServerDescription="Merak_Hagen_Epic_Units"?-port=7777 -nosteam -log

The command above loads the UDK.exe (Renegade X) in server mode, opening a new console window for it, on the map CNC-Walls (note that the map must exist in the maps folder), loading a mutator named RenX_Mutator_Epic_Units with a mutator package  RenX_Mutator_Epic_Units, with 64 max players slot, requiring no password (it's set to 0, so no password will be checked), with an admin password of TestAdmin (to invoke admin powers available here https://wiki.renegade-x.com/wiki/RCON). It also sets a server name, a match without any time limit, description to the server, and the running port, that should be 7777 in most or all cases. The last two parameters are important and stands for.
-nosteam, this one will make the server run without the need to be logged on a steam account, witch it be useful to join with multiple clients.

-log, this one will generate any log messages into files on the server, after the server has been terminated (logs can be found at: Renegade-X\UDKGame\Logs). It also show the log messages at console window while it's running.

Running Multiple Clients:

To run multiple client in the fastest possible way, and in a way you can actually easily alt tab through them, is by executing a console command on CMD (Command Prompt) or Power Shell. Here is it:

E:\Games\Renegade-X\Binaries\Win64\UDK.exe 127.0.0.1 -windowed -nosteam -nomovies -log

The command bellow will execute UDK.exe (Renegade X) in client mode, joining the server specified by the ip address 127.0.0.1, witch stands for localhost, it will open on windowed mode, witch allow you to easy alt tab between windows, it does not run with any steam account that is currently logged on the machine and will enable the client log, that will also open a prompt window showing any logs, very useful for testing purposes. Each time the command is run, a new client will open and join the server, and each new client has its own prompt log window. 
Note: Running with -nosteam option on both client and server is to prevent Ghost Client detection, a mechanism that will kick you from server. Also, you will have to go over the ini file i have mentioned on the start of this topic and change the value of the this variable bListed to false, so it wil lbe like this:


bListed=False

 

Setting Server through bat file:

I am attaching a bat file i use to created that starts the server as well as copying any new version of the compiled  mutator, if it exists,  to one folder, to another. Since the server name would take no effect from the command line directly i have also made it to replace the default server name RenegadeXServer to my own on the .ini file that sets it up. This could be replicated to any other replacement you want by just copying the code bellow and reusing it with different values for search and replace: 
The file that contains this information is and many other are: 

Renegade-X\UDKGame\Config\UDKGame.ini
I would recommend doing a backup of the UDKGame.ini file

set "search=RenegadeXServer"
set "replace=%SERVER_NAME%"
for /f "delims=" %%i in ('type "%textFile%" ^& break ^"%textFile%" ') do (
        set "line=%%i"
        setlocal enabledelayedexpansion
        >>"%textFile%" echo(!line:%search%=%replace%!
        endlocal
    )
)

To load any other mutator, would be just to change variable value, and also the file name itself, to represent more its purpose. To load additional mutators, could just be by adding new variable and following the script pattern of concatenating strings.

Logging:
To log any variable and output it into either server console or client console you would just call the following function in the RenX code, located in UDK Folder
(Renegade_X_SDK-7634M\Development\Src):

`Log("Starting Epic Units");

 

RenX_Epic_Units_Bat_Server.bat

Edited by Merak_Haguen
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

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...