Author Topic: UT2004 lan server hosting  (Read 479 times)

Ageon Mystmir

  • Overlord
  • Legendary
  • *****
  • Posts: 280
  • Rep: +2/-1
UT2004 lan server hosting
« on: January 19, 2024, 06:32:40 AM »
  • [Vote]0
  • [Down-Vote]0
  • How to host server !!!

    Starting from a Batch File

    Edit your runserver.bat file that is stored in your ut2004\system folder and change it from:
    Code: [Select]
    @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=server.log
    copy server.log servercrash.log
    goto 10

    This will start a basic Onslaught Server.
    To run as different servers change the line:

    Code: [Select]
    ONS-Torlan?game=Onslaught.ONSOnslaughtGame
    Here is a list of available gametypes in the retail package. If you installed a mod there might me more gametypes available to you.

    If you are starting a LAN based server, add -lanplay to you command line. This will also increase map download speeds.
    Code: [Select]
    @echo off
    :10
    ucc server CTF-Yesterday?game=XGame.xCTFGame ini=UT2004.ini log=server.log -lanplay
    copy server.log servercrash.log
    goto 10


    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:
    Code: [Select]
    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:
    Code: [Select]
    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:
    Code: [Select]
    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
    Code: [Select]
    ?mutator=XGame.MutInstaGiblike:
    Code: [Select]
    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.
    You will find a list with all retail mutators here.

    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:
    Code: [Select]
    [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
    Code: [Select]
    ?AdminName=XXXX?AdminPassword=XX parameter to your command line.

    An example command line would now be:
    Code: [Select]
    ONS-Torlan?game=Onslaught.ONSOnslaughtGame?AdminName=myname?AdminPassword=mypass ini=UT2004.ini log=TypeLogNameHere.log
    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 iport 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. This means that you are using some kind of router. How to forward the ports depends on the router Manufacturer. See your documentation for additional information.

    The default ports are:
    Code: [Select]
    7777 UDP/IP (Game Port)
    7778 UDP/IP (Query Port; game port + 1)
    7787 UDP/IP (GameSpy Query Port; game port + 10)
    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.

    Player / Bot Commands
    Code: [Select]
    ADDBOTS [number] - Adds the specified number of bots
    BEHINDVIEW 1 - Changes to third person view
    BEHINDVIEW 0 - Changes to first person view
    DISCONNECT - Disconnect from current server
    EXIT - Quits the game
    KILLBOTS - Gets rid of all bots
    OPEN [IP address] - Connect to a specific server IP
    OPEN [mapname] - Opens specified map
    QUIT - Quits the game
    RECONNECT - Reconnect to the current server
    SWITCHLEVEL [mapname] - Switches to the specified level
    SWITCHTEAM - Switch your player's team
    SUICIDE - Kills yourself
    TEAMSAY [text] - Displays your message in team chat
    PLAYERSONLY - Freezes \ pauses the bots
    SAY [text] - Displays your message in global chat
    SETNAME [playername] - Changes your player name

    Statistics
    Code: [Select]
    MEMSTAT - Displays Windows memory usage
    STAT ALL - Shows all stats
    STAT AUDIO - Shows audio stats
    STAT FPS - Displays your frames per second
    STAT GAME - Displays game stats
    STAT HARDWARE - Shows hardware stats
    STAT NET - Shows network game play stats
    STAT NONE - Turns off all stats
    STAT RENDER - Displays rendering statistics

    Demo Commands
    Code: [Select]
    DEMOPLAY [demoname] - Plays the specified demo
    DEMOREC [demoname] - Records a demo using the demoname you type
    STOPDEMO - Stop recording a demo

    Admin Commands
    Code: [Select]
    ADMIN SWITCHLEVEL [mapname?game=gametype?mutator=mutator] - Changes the current level to the specified level, game type and mutators
    ADMIN [command] - Performs the specified command
    ADMINLOGIN [password] - Logs the admininstrator onto the server using the specified password
    ADMINLOGOUT - Logs the administrator off the server
    ADMIN SET UWeb.Webserver bEnabled True - Enables the remote admin webserver (after level change)
    ADMIN SET UWeb.Webserver bEnabled False - Disables the remote admin webserver (after level change)
    KICK [playername] - Kicks the specified player from the server
    KICKBAN [playername] - Kicks and bans the specified player from the server using their IP address. To unban the player, edit the server.ini or use the web admin interface


    Other Commands
    Code: [Select]
    BRIGHTNESS [number] - Changes the brightness level to the specified number
    CDTRACK [number] - Plays the specified CD track number
    CONFIGHASH - Displays configuration info
    CONTRAST [number] - Changes the contrast level to the specified number
    DEBUG CRASH - Test crashes the game with an error
    DEBUG EATMEM - Tests memory allocation until full
    DEBUG GPF - Test crashes the game with a general protection fault error
    DEBUG RECURSE - Test crashes the game by infinite recursion
    DUMPCACHE - Displays the memory gcache contents
    EXEC [filename] - Executes a file in the UT2004/system/ directory by default
    FLUSH - Flushes all caches and relights
    FOV [number] - Changes the field of view to the specified number
    GAMMA [number] - Changes the gamma level to the specified number
    GETCOLORDEPTHS - Displays the maximum color depth supported by your hardware
    GETCURRENTCOLORDEPTHS - Displays your current color depth
    GETCURRENTRES - Displays your current resolution
    GETCURRENTTICKRATE - Displays your current tick rate
    GETMAXTICKRATE - Displays the maximum allowed tick rate
    MUSICORDER [number] - Change to a certain track in the song (0=ambient, 1=action, 2=suspense)
    NETSPEED [number] - Sets the net speed, default is 10000
    OBJ CLASSES - Displays a list of object classes
    OBJ GARBAGE - Collects and purges objects no longer in use
    OBJ HASH - Displays object hashing statistics
    OBJ LINKERS - Displays a list of active linkers
    PAUSESOUNDS - Pauses all sounds
    PREFERENCES - Opens advanced settings
    RELAUNCH - Relaunches the engine
    REPORT - Copies a report of the current game to clipboard
    SET [class variable value] - Sets a specified class and specified variable with the specified value
    SETSENSITIVITY [number] - Sets the mouse sensitivity to the specified number
    SETRES [WxHxD] - Sets your screen resolution to the specified width, height, and color depth
    SLOMO 1 - Sets the speed of the game back to normal real time speed
    SLOMO 2 - Sets speed to double. Increase number to go faster
    SLOMO .5 - Sets speed to half. Decrease number to go slower
    SOCKETS - Displays a list of sockets in use
    TOGGLEFULLSCREEN - Toggles fullscreen mode
    TYPE [text] - Displays the specified text on the console
    UNPAUSESOUNDS - Un-pauses all sounds



    Adrenalin Combos and Special Moves

    There are a range of special moves which can be performed by your character under certain circumstances. Some require that you have 100 Adrenalin. Others, like the Dodging moves require that you have the Dodge setting ticked (See In-game Settings section). You can get Adrenalin points through various methods:

    Code: [Select]
    Picking up a red and white adrenalin pill: 3 points
    A Kill: 2 points
    Headshots: 5 points
    The first kill during a round (First Blood): 12 points
    Killing sprees: 12 points

    Adrenalin Combos:

    Once your Adrenalin reaches 100 points, you will be allowed to perform one of the following special moves, the effects of which will only last for a while. The following key combinations need to be pressed in rapid succession to activate the Adrenalin effect:
    Code: [Select]
    Speed: Forward, Forward, Forward, Forward
    Regeneration: Back, Back, Back, Back
    Invisibility: Right, Right, Left, Left
    Berserk: Forward, Forward, Back, Back

    Special Moves:

    These can be performed at any time, but require a fair bit of practice and skill to master. Remember, you need to activate the Dodge setting to use the dodge moves.

    Double Jump: Jump and then press jump again in the arc of the jump
    Dodge: Tap Left, Right, Forward or Back twice quickly
    Dodge Jump: Perform a Dodge, and jump just before you lose your air
    Wall Dodge: Run alongside a wall, jump and quickly Dodge away from it
    Goo Jump: Shoot some goo from the Biorifle, get a shield up using the Shield Gun, jump just when goo explodes (You can also use the shield gun to bounce energy weapons, break your fall and of course block normal weapons.)
    Lift Jump: Jump while on a lift to get an extra boost
    Death from Above: If you jump from a great height and land on someone you'll cause them damage.

    We're fast approaching the conclusion to this guide. The next section covers a few more neat things about UT2004, and wraps the whole show up.

    UNREAL TOURNAMENT ADMIN COMMANDS

    Code: [Select]
    Logging in and out
    Log in as administrator adminlogin <login>
    Log out adminlogout

    Adding and removing actors Note: The following commands may work without the admin prefix. This does not hold for rebooting the server
    Code: [Select]
    Add bots admin addbots <number>
    Spawn actor admin summon <class name>
    Remove all monsters admin killpawns
    Remove all bots admin killall Bot
    Remove redeemer admin killall WarheadLauncher
    Remove damage amplifier admin killall UDamage
    Remove shield belt admin killall ut_ShieldBelt
    Remove invisibility admin killall ut_Invisibility
    Remove armor admin killall Armor2
    Remove thigh pads admin killall ThighPads
    Remove jumpboots admin killall ut_Jumpboots
    Kick player admin kick <player name>
    Kickban player admin kickban <player name>

    Server control
    Reboot the server admin quit or admin exit
    Toggle game pause admin pause or press the pause button
    Code: [Select]
    Switch map admin switchlevel <map name>
    Change gametype admin servertravel <map name>?Game=<gametype>
    Change mutator admin servertravel <map name>?Mutator=<mutator>
    Change both admin servertravel <map name>?Game=<gametype>?Mutator=<mutator>
    Note: There is no space between the map name and the question mark, and between the gametype and its corresponding question mark!
    Restart level admin servertravel ?restart

    Game control Note: To retrieve the current value, replace "set" with "get" and remove any trailing parameters. A
    Code: [Select]
    servertravel is required for changes to take effect with commands containing a <gametype>.
    Set game password admin set Engine.GameInfo GamePassword <password>
    Reset game password admin set Engine.GameInfo GamePassword
    Set time limit admin set <gametype> TimeLimit <number>
    Set capture limit admin set <gametype> GoalTeamScore <number>
    Set frag limit admin set <gametype> FragLimit <number>
    Set minimum players admin set <gametype> MinPlayers <number>
    Add bots up to minimum players (servertravel!) admin set UnrealGame.UnrealMPGameInfo MinPlayers <number>
    Set maximum players admin set Engine.GameInfo MaxPlayers <number>
    Set maximum spectators admin set Engine.GameInfo MaxSpectators <number>
    Set maximum team size admin set <gametype> MaxTeamSize <number>
    Set air control admin set <gametype> AirControl <number>
    Set game speed admin set Engine.GameInfo GameSpeed <number>
    Toggle mute spectators admin set Engine.GameInfo bMuteSpectators <True/False>
    Toggle force respawn admin set <gametype> bForceRespawn <True/False>
    Toggle tournament mode admin set <gametype> bTournament <True/False>
    Set bot strength admin set Botpack.ChallengeBotInfo Difficulty <0-7>
    Toggle translocator admin set <gametype> bUseTranslocator <True/False>
    Toggle weaponstay admin set <gametype> bMultiWeaponStay <True/False>
    Set friendly fire scale admin set <gametype> FriendlyFireScale <0-100>
    Toggle cheats admin set Engine.GameInfo bNoCheating <True/False>
    Add teams (TDM, DOM) admin set <gametype> MaxTeams <number>
    Toggle webadmin admin set UWeb.WebServer bEnabled <True/False>
    Toggle team balancing admin set <gametype> bPlayersBalanceTeams <True/False>
    Full screen message say #<message>

    Server appearance
    Code: [Select]
    Set server name admin set Engine.GameReplicationInfo ServerName <name>
    Set server short name admin set Engine.GameReplicationInfo ShortName <name>
    Set server MOTD admin set Engine.GameReplicationInfo MOTDLine1 <sentence>
    Set server MOTD admin set Engine.GameReplicationInfo MOTDLine2 <sentence>
    Set server MOTD admin set Engine.GameReplicationInfo MOTDLine3 <sentence>
    Set server MOTD admin set Engine.GameReplicationInfo MOTDLine4 <sentence>
    Set admin name admin set Engine.GameReplicationInfo AdminName <name>
    Set admin email admin set Engine.GameReplicationInfo AdminEmail <email>
    Set tickrate admin set IPDrv.TCPNetDriver NetServerMaxTickrate <number>
    Note: Consult with your game server provider to inquire whether you are allowed to change these values.

    UTPure related
    Code: [Select]
    Disable UTPure mutate DisablePure
    Enable UTPure mutate EnablePure
    Toggle NoLockdown (UTPure) admin set UTPure bNoLockdown <True/False>
    Enable hitsounds (UTPure) mutate EnableHitSounds
    Disable hitsounds (UTPure) mutate DisableHitSounds

    No admin required
    Code: [Select]
    Change nickname setname <name>
    Disconnect disconnect
    Reconnect reconnect
    Quit quit or exit
    Take a screenshot shot
    Connect to a server open <server address>[:server port]
    Toggle framerate counter timedemo <1/0>
    Set netspeed netspeed <value>
    Set field of view fov <value>
    Open vote menu (BDB) mutate BDBMapvote Votemenu
    Show tickrate (UTPure) ShowTickrate
    Switch team (UTPure) NextTeam
    Show cheat info (UTPure) CheatInfo

    Tags: