Back to Projects

Unreal Tournament 4 - Server Controller Script and Guide

Last Updated: 2024-07-22

Table of Contents

  1. Overview
  2. Download Links
  3. Installation
  4. hub-config.ini
  5. Project Dir
  6. Usage and Commands

Overview

Described is a script which automates and simplifies much of the configuration, deployment, and management of an Unreal Tournament 4 server (HUB).

What it provides you is a simple project folder, with directories for maps, mutators, rulesets, and config files.
It then aims to script and automate:

  • Downloading the latest UT4 server build from Epic Games.
  • Installation of game configuration, maps, and mutators to 1-or-multiple server instances.
  • Automatic creation of redirect md5 hashes and upload to redirect server.
  • Rulesets can be individually managed through separate files.
  • The only thing that's left is for you to configure your gametypes, add some maps, mutators, and get to fraggin'!!!!

Limitations

Usage instructions and documentation need much improvement still. Current code only supports Linux and deploying to a Linux UT4 server. With the migration to Python, future versions will include Windows support for Smileyface itself and I don't think it'd be too much different to support a Windows UT4 server as well. That doesn't work yet however.

What You Need

  • A server* to host the instance and run the game server.
  • A redirect server to send custom content to players.
  • A good attitude: You're almost done. You need to edit the variables at the top of the script to point to the right directories and network paths so it knows what to do. After being configured correctly, it's easy to install and configure your hub(s).

*For best player experience, server and redirect should be distinct and have reserved internet capacity. However, you can technically run the server, the redirect, and even the game client on the same computer. The limitation is there will be major ping spikes if you download on the same connection. It's pretty easy to acquire these servers if you don't mind paying for it. An entry-level cloud server is $20/month.

Download Links

Installation

More instructions coming soon.

  1. Download Smileyface project via one of these download links above
  2. Install the required Python dependencies via ./setup.py install (you may need admin rights or a user-level python environment)
  3. Create the project directory structure, defined below
  4. Configure hub-config.ini
  5. Run the script to build and deploy the hub server

Configuration (Specified in hub-config.ini)

You need to configure the variables in the created config.ini. See 'edit-config-linux.sh' or 'edit-config-windows.ps1'.
An example hub-config.ini is provided here. File location is:

  • Windows: $env:USERPROFILE\appData\Local\smileyface-ut4\hub_config.ini
  • Linux: $HOME/.config/smileyface-ut4/hub_config.ini

project_dir
Filepath to the 'project' directory on your local machine.
config_dir
Instance config files (used to toggle between instances)
skip_validate (boolean)
By default, will show the user all configured parameters and confirm before every command. Use this to disable if preferred.
download_url
Download url for UnrealTournament Linux Hub (default = https://s3.amazonaws.com/unrealtournament/ShippedBuilds/%2B%2BUT%2BRelease-Next-CL-3525360/UnrealTournament-Server-XAN-3525360-Linux.zip)
download_md5
md5sum of UnrealTournament-Server-XAN-3525360-Linux (default = cad730ad6793ba6261f9a341ad7396eb)
redirect_protocol
One of 'http' or 'https' which will be put into the redirect references inside Game.ini
redirect_url
Domain name and path to the redirect webserver.
remote_game_host
Destination server and path for the instance files.
remote_game_dir
Destination path on the server (e.g. /home/ut4/serv but can be anywhere)
remote_redirect_host
Destination server and path for the redirect webserver files.

Project Dir

The project dir contains maps, mutators, ini files, rulesets. This can be anywhere on your computer or network drive, provided you have the space. Typical install may be 10gb or more with maps. You can download a starter hub project_dir with an almost-empty structure of these folders here. Included is start/stop scripts, a systemd service file for running the server, an example hub-config.ini, and a barebones project_dir for the hub.

$PROJ_DIR/base
Contains UnrealTournament-Server-XAN-3525360-Linux.zip and unzipped LinuxServer/
$PROJ_DIR/files
Contains source maps, mutators, ini files, rulesets
$PROJ_DIR/files/config
Contains Engine.ini and Game.ini
$PROJ_DIR/files/maps
Contains any map.pak files which can be added to the server
$PROJ_DIR/files/mutators
Contains any mutator.pak files which can be added to the server
$PROJ_DIR/files/rulesets
Contains 1..n rulesets files which are combined into final rulesets.json on the server instance
$PROJ_DIR/files/unused
Spot for unused (won't be transferred to server) paks. Not necessary
$PROJ_DIR/instance
The script will combine all the files from ./base and ./files directories to create the instance. This will be the files transferred to the server.

Usage Instructions (Command List)

After that is configured correctly, here are the commands:

delete_instance
Delete the instance for rebuilding (this is safe).
download_linux_server
Downloading the linux server release from Epic.
generate_instance
Install the maps, mutators, and config into the server build, on your LOCAL machine. This step also computes all the md5sums required for the RedirectLines.
start_server
Starts the server, restarting if it ever crashes.
stop_server
Stops and kills all instances of the server.
upload_redirects
Upload all PAKs to the redirect web server.
upload_server
Upload the generated instance to the instance server for multiplayer hosting.

Come Play!

Find my hub at Warehouse Party (OVHCloud Dedicated). See screenshot.

See Also