Server Setup (UT2004)
From UnrealAdminWiki
This tutorial was created by Bry
Contents |
Introduction
Running a UT2004 Server is just as easy as it is for UT2003. Basically the principle is the same you can use a bat file, a service or the command line to start a server. Alternatively on Linux you can start your server via the command line or runserver.sh.
We fully recommend either the batch file or service option.To start of with you will have to request a special server cd-key (unless you are running the server on a computer with the full game already installed) . This can be done by visiting Epic's UT2004 KeyGen Site and then following the instructions supplied in the email.
Warning: You must enter an email capable of receiving a .reg file (if you email provider filters out the whole email you will need to use a different email address)
Starting from a Batch File
Edit your runserver.bat file that is stored in your ut2004\system folder and change it from:
@echo off :10 ucc server %1 %2 %3 %4 %5 %6 %7 %8 %9 -log=server.log copy server.log servercrash.log goto 10
to:
@echo off :10 ucc server ONS-Torlan?game=Onslaught.ONSOnslaughtGame ini=UT2004.ini log=TypeLogNameHere.log copy server.log servercrash.log goto 10
This will start a basic Onslaught Server.
To run as different servers change the line:
ONS-Torlan?game=Onslaught.ONSOnslaughtGame
To one of the following for there respective game types:
Assault = AS-MotherShip?game=UT2k4Assault.ASGameInfo
CTF = CTF-FaceClassic?game=XGame.xCTFGame
Bombing Run = BR-Serenity?game=XGame.xBombingRun
DoubleDomination = DOM-SunTemple?game=xGame.xDoubleDom
DeahtMatch = DM-Rankin?game=XGame.xDeathMatch
TeamDeathMatch = DM-Rankin?game=XGame.xTeamGame
Mutant = DM-Deck17?game=BonusPack.xMutantGame
Invasion = DM-Antalus?game=SkaarjPack.Invasion
LastManStanding = DM-Morpheus3?game=BonusPack.xLastManStandingGame
VehicleCTF = game=XGame.xVehicleCTFGame
Note: there are currently no default maps made to support this
Starting A Linux UT2004 Server
The principle for running a linux server is very similar. You use the same start-up line with the addition of -nohomedir
switch and ucc-bin instead of just ucc
For example to run an ctf server via the linux command line we would have something like:
ucc-bin server CTF-BridgeOfFate?game=XGame.xCTFGame ini=ut2004.ini -nohomedir
You may also run your server via the runserver.sh . Simply open this file in a text editor and use the above command line.
If you wish to start a different type of server then simply use one of the command lines above.
Lastly, if you are starting your server via putty then you may wish to run your server in the background so that it stays running once you exit putty. This is simple to do by adding &
to the end of your command line. For example:
ucc-bin server CTF-BridgeOfFate?game=XGame.xCTFGame ini=ut2004.ini -nohomedir &
Running as a Windows Service
Please see our separate guide on running a UT2004 server as a service.
Mutators
We will use the Instagib mutator as an example of how to add mutator support. This is simply done by adding:
?mutator=MutatorName
All you need to do is change the part that says:
ONS-Torlan?game=Onslaught.ONSOnslaughtGame DM-Rankin?game=XGame.xTeamGame AS-MotherShip?game=UT2k4Assault.ASGameInfo CTF-FaceClassic?game=XGame.xCTFGame BR-Serenity?game=XGame.xBombingRun DM-Rankin?game=XGame.xDeathMatch DM-Deck17?game=BonusPack.xMutantGame DM-Antalus?game=SkaarjPack.Invasion DM-Morpheus3?game=BonusPack.xLastManStandingGame
and add ?mutator=XGame.MutInstaGib
like:
DM-Antalus?game=XGame.XDeathmatch?mutator=XGame.MutInstaGib CTF-Citadel?game=XGame.xCTFGame?mutator=XGame.MutInstaGib BR-Anubis?game=XGame.xBombingRun?mutator=XGame.MutInstaGib DOM-Suntemple?game=xGame.xDoubleDom?mutator=XGame.MutInstaGib DM-Curse3?game=XGame.xTeamGame?mutator=XGame.MutInstaGib DM-Deck17?game=BonusPack.xMutantGame?mutator=XGame.MutInstaGib DM-Antalus?game=SkaarjPack.Invasion?mutator=XGame.MutInstaGib DM-Morpheus3?game=BonusPack.xLastManStandingGame?mutator=XGame.MutInstaGib
If you want to use multiple mutators simply separate them with a comma e.g.:
mutator=XGame.MMutInstaGib,UnrealGame.MutLowGrav
will add instagib and lowgravity.
The list of mutators available are:
Arena - XWeapons.MutArena
Beserk - UnrealGame.MutBerserk
Big Head - UnrealGame.MutBigHead
Delayed Spawn - UnrealGame.MutDelayedSpawn
Float-Away Corpses - XGame.MutHeliumCorpses
InstaGib - XGame.MutInstaGib
Zoom InstaGib - XGame.MutZoomInstaGib
LowGravity - UnrealGame.MutLowGrav
No Adrenaline - XGame.MutNoAdrenaline
No Super Weapons - XWeapons.MutNoSuperWeapon
Quad Jump - XGame.MutQuadJump
AutoHealing - XGame.MutRegen
Slow Motion Deaths - XGame.MutSlomoDeath
Species Specific Stats - XGame.MutSpeciesStats
UDamage Reward - .XGame.MutUDamageReward
Vampire - XGame.MutVampire
UTV2004S (UTV2004 in SeeAll mode)- UTV2004s.utvMutator
UT2k3 Style Weapon Throwing/Boosting - XGame.MutFastWeapSwitch
UTClassic - UTClassic.MutUTClassic
Lightning Gun 2 Sniper Rifle - UTClassic.MutUseSniper
Sniper Rifle 2 Lightning Gun - UTClassic.MutUseLightning
Camouflage Combo (RRRR) - Bonuspack.MutCrateCombo
Pint-sized combo (LLLL) - Bonuspack.MutPintSizeCombo
BigWheels - Onslaught.MutBigWheels
Light Weight Vehicles - Onslaught.MutLightweightVehicles
Onslaught Weapons - Onslaught.MutOnslaughtWeapons
Jumping Vehicles - Onslaught.MutWheeledVehicleStunts
Vehicle Arena - OnslaughtFull.MutVehicleArena
Setting up UT2004 Webadmin System
UT2004 can use one of two admin systems. The first is like Unreal Tournament or like most other games, one admin user and password which allows you access to everything.
This we will call the basic admin system.
UT2004 also has an XAdmin system which allows you to have multiple user accounts and passwords each with different admin levels. For example, one user could have access to kick but not ban while another user could have access to everything but setting a game password.
First, we will setup the generic options needed for both systems
Find in your UT2004.ini file this section:
[UWeb.WebServer] Applications[0]=xWebAdmin.UTServerAdmin ApplicationPaths[0]=/ServerAdmin Applications[1]=xWebAdmin.UTImageServer ApplicationPaths[1]=/images bEnabled=False ListenPort=80
Change bEnabled=False
to True
You may also wish to change ListenPort=80
to annother value. As This will be the port which you run your webserver on
Basic Admin System
To enable WebAdmin from the command line (ie. just 1 user name/pass) then add the
?AdminName=XXXX?AdminPassword=XX</code> parameter to your command line.
An example command line would now be:
ONS-Torlan?game=Onslaught.ONSOnslaughtGame?AdminName=myname?AdminPassword=mypass ini=UT2004.ini log=TypeLogNameHere.log</code>
XAdmin System
To enable the Xadmin system find the section [Engine.GameInfo]
and change the value of the AccessControlClass=
line to XAdmin.AccessControlIni
Now start your server and you will notice a new file is created in your system folder called xadmin.ini . This is where all your admin user/passwords/levels are stored. We strongly recommend you do not edit this file directly but that you set your admins up via webadmin.
Now browser to your server ip:port e.g. http://123.4.56.78:80 and you will be prompted for a user and password. This
is default set to Admin / Admin and it is case sensitive. You will now be able to access the admins and groups menu on the top right of the screen.
We strongly recommend one of the first things you do is to change the default password.
Also, note that you will have to login via console with your username in the format:
adminlogin user password
Running a Server Behind NAT
You will need to open some ports in order to allow outside clients to connect to your server.
The default ports are:
Port | Type | Description |
---|---|---|
7777 | UDP/IP | (Game Port) |
7778 | UDP/IP | (Query Port) |
7787 | UDP/IP | (GameSpy Query Port) |
28902 | TCP/IP | (Allows your Server to Connect to the UT2004 Master Server Browser) |
xxxx | TCP/IP | (Port set via ListenPort that your WebAdmin will run on) |
Also make sure you set the following to True
Find the [IpDrv.MasterServerUplink]
part in your server's ini file, and modify the following value:
ServerBehindNAT=True
If you are unable to browse webadmin using the external IP address of your server, but accessing the webadmin from inside your LAN works, then the following may help you:
Find the [UWeb.WebServer]
in your server's .ini file, and modify the following value (where x.x.x.x is your public internet IP address ):
ServerName=x.x.x.x
Also, please remember due to the way NAT works, any computer within your local NAT network will have to connect and view your server (via the server browser) via the LAN IP else you will have problem's connecting and get N/A for the server details. Anyone outside your network (Internet) should see your server fine now as long as the ports are opened.