t3ssel
who am i

UT2004 Dedicated server notes

- infra, games

 The Unreal series have always been very important to me. I literally have them all, including the old solo games and the console ones. Unreal Tournament 2004, however, was a very interesting one. A full working editor (UnrealEd) was included out of the box, aside of the game, expanding the game lifetime by a lot. The main trend was to create maps, which were often “signed” by their author, like Under_LE, but executing code was also possible using the UnrealScript language. In the end, the game was so editable you could create a new game out of it.

After almost 20 years, I finally decided to launch my own public server game, or at least to try, and it was a real hassle. Almost all the official ressources are offline or not working (watching you the serial key generator). In the end, I have finally a running dedicated server, here are my notes.

Prerequisites

Assuming you have a fresh Debian installation, you’ll also need:

Installation

Please create a dedicated user (you’ll be running a 20 years old binary after all)

adduser unreal

Game server is 32bits

dpkg --add-architecture i386
apt-get update
apt-get install libstdc++5 libstdc++5:i386

On dedicated user, unzip files and patch game server

unzip DedicatedServer3339-BonusPack.zip -d ut2004
tar jxvf ut2004-lnxpatch3369-2.tar.bz2
cp -r -u -v ut2004-lnxpatch3369-2/* ut2004/

Install serial key

echo "[serial key]" > ut2004/System/cdkey

Configuration

Setting up your server can be a long and painful task. Here are the main settings you’ll need to edit, for more read the ini reference guide.

[URL]

Listening port:

Port=7777

[Engine.Engine]

Select a gamemode from the gamemode list:

DefaultGame=XGame.XDeathmatch 	
DefaultServerGame=XGame.XDeathmatch

Note: overwritten from the command line options.

[Engine.GameEngine]

Please disable the VoIP subsystem (could lead to security issues):

VoIPAllowVAD=False

Package list, force players to download them if missing locally:

ServerPackages=satoreMonsterPackv120

[Engine.GameInfo]

If you enable the voting system, you need to link it:

VotingHandlerType=xVoting.xVotingHandler

[xVoting.xVotingHandler]

Map voting system configuration:

[xVoting.xVotingHandler]
VoteTimeLimit=70
ScoreBoardDelay=5
bAutoOpen=True
MidGameVotePercent=50
bScoreMode=False
bAccumulationMode=False
bEliminationMode=False
MinMapCount=2
MapVoteHistoryType=xVoting.MapVoteHistory_INI
RepeatLimit=4
DefaultGameConfig=0
bDefaultToCurrentGameType=True
bMapVote=False
bKickVote=False
bMatchSetup=False
KickPercent=51
bAnonymousKicking=True
MapListLoaderType=xVoting.DefaultMapListLoader
ServerNumber=1
CurrentGameConfig=0
GameConfig=(GameClass="XGame.xDeathMatch",Prefix=,Acronym=,GameName="new",Mutators=,Options=) 

Note: don’t forget to edit your GameClass according to your gamemode, your Mutators list and your prefix/acronym values to the maps you want to play on (example: Prefix="DM",Acronym="DM" for DM* maps).

[IpDrv.TcpNetDriver]

Allow players to download files directly from your game server:

AllowDownloads=True

Maximum bit rate given to each player:

MaxInternetClientRate=20000

Make you server publicly visible:

DoUplink=True

Disable Gamespy (this service is now offline):

UplinkToGamespy=False

Disable statistics sent to master server:

SendStats=False

If behind a NAT firewall, prevents ping to be shown as N/A:

ServerBehindNAT=False

[Engine.GameInfo]

Disable statistic generator:

bEnableStatLogging=False

Max number of spectators:

MaxSpectators=2

Max number of players:

MaxPlayers=16

Will weapon stay after being picked up:

bWeaponStay=True

Allow players to drop weapons:

bAllowWeaponThrowing=True

Can admin players pause the game:

bAdminCanPause=True

[Engine.GameReplicationInfo]

Server name show in server list:

ServerName="Amazing and crazy server"

Admin name shown in server info:

AdminName=SuperAmazingAdmin

Admin email address shown in server info:

AdminEmail=admin@superserver.com

A message of the day shown on player screen:

MessageOfTheDay="Welcome!|This is a new line"

[UWeb.WebServer]

Enable/disable admin web console:

bEnabled=True
ListenPort=80

Note: crashes when moving pages around too quickly (Close: Error while attempting to close socket.).

Mutator installation

To install a mutator, copy the System/* files to your System/ folder, the StaticMeshes/* files to your StaticMeshes/ folder and so on. Each mutator has a unique package name located in its .ucl file:

Mutator=(ClassName=MyMutatorName.SubClassName)

Then add its package name (here MyMutatorName) to your ServerPackages list and its full class name to your Mutators list (both in your voting subsystem and command line options).

Their configuration usually comes from a PackageName.ini file in your System folder (here System/MyMutatorName.ini) that you can force the generation of by starting a game locally with the mutator enabled.

Systemd service

An example of a systemd service, can be written in /lib/systemd/system/ut2004.service:

[Unit]
Description=Unreal 2004 Dedicated game server
After=network.target

[Service]
Type=simple
User=unreal
WorkingDirectory=/home/unreal/ut2004/System
ExecStart=/home/unreal/ut2004/System/ucc-bin-linux-amd64 server CTF-BridgeOfFate?game=XGame.xCTFGame?AdminName=admin?AdminPassword=XXXXXXXX ini=UT2004.ini log=server.log -nohomedir
Restart=always

Note: edit your gamemode, admin credentials and mutator list if needed.

Summary

 Most of the time everything works pretty well. You can also completely remove everything related to graphical settings in your ini file in you want to. I also had issues with the admin web console (crashing non stop) and the ports list which seems to be outdated. I ended up opening them all which I discourage to do. Can’t wait for Fornite to die so we can finally have a new finished and polished Unreal game.

Links