UTAdmin

An Admin App and Mutator for Administrating UT2004 Servers.

UTAdmin - Unreal Tournament 2004 Admin API & Flutter App

A modern administration solution for Unreal Tournament 2004 servers, consisting of a server-side mutator that exposes a TCP API and a Flutter-based mobile app for remote server management.

Features

Mutator (Server-Side)

  • TCP API Server - Exposes server controls via a simple JSON-based protocol
  • Passcode Authentication - Secure access with configurable password
  • In-Game Configuration - Edit settings directly from the UT2004 host game menu
  • Real-time Server Control:
    • Broadcast messages to all players
    • Kick players
    • Change maps
    • View server status
    • List connected players
    • Get available maps

Flutter App (Mobile)

  • Cross-Platform - Built with Flutter, supports Android (iOS ready)
  • Connection Management - Save and manage multiple server connections
  • Auto-Reconnect - Automatically reconnects after map changes
  • Dashboard - View server status, player count, current map
  • Player Management - View and kick players
  • Map Control - Browse and change maps
  • Broadcast Messages - Send messages that appear on players' HUDs

Installation

Mutator Installation

  1. Copy Files to UT2004:

    • Copy Mutator/Classes/*.uc to UT2004/UTAdmin/Classes/
    • Copy Mutator/System/UTAdmin.u to UT2004/System/
    • Copy Mutator/System/UTAdmin.ini to UT2004/System/ (optional)
  2. Add to EditPackages (UT2004.ini):

    [Editor.EditorEngine]
    EditPackages=UTAdmin
  3. Configure the Mutator:

    Edit UT2004/System/UTAdmin.ini:

    [UTAdmin.UTAdmin]
    AdminPasscode=your_secure_password_here
    AdminAPIPort=7778
  4. Enable the Mutator:

    Option A - Command Line:

    UT2004.exe DM-Rankin?Game=XGame.xDeathMatch?Mutator=UTAdmin.UTAdmin -server

    Option B - In-Game:

    • Start UT2004
    • Go to Host GameMutators
    • Find UT Admin API in the list
    • Click Configure to set your password and port
    • Add to active mutators
    • Start your server

Compiling the Mutator (Optional)

If you modify the source code:

  1. Place source files in UT2004/UTAdmin/Classes/
  2. Add EditPackages=UTAdmin to UT2004.ini under [Editor.EditorEngine]
  3. Run: ucc.exe make
  4. The compiled UTAdmin.u will be in UT2004/System/

Flutter App Setup

Prerequisites

  • Flutter SDK 3.0 or higher
  • Android Studio / Xcode (for mobile deployment)
  • Android device or emulator

Installation

  1. Navigate to the Flutter app directory:

    cd FlutterApp
  2. Install dependencies:

    flutter pub get
  3. Configure Android SDK (if needed):

    Edit android/app/build.gradle.kts to ensure:

    compileSdk = 36
    minSdk = 21
    targetSdk = 36
    ndkVersion = "27.0.12077973"
  4. Build and run:

    For Android:

    flutter run

    Build APK:

    flutter build apk --release

    The APK will be in build/app/outputs/flutter-apk/app-release.apk

Usage

Connecting from the App

  1. Launch the UTAdmin app
  2. Enter your server details:
    • IP Address: Your server's IP (e.g., 192.168.1.100)
    • Port: API port (default: 7778)
    • Password: The passcode set in UTAdmin.ini
  3. Tap Connect

Managing Your Server

Once connected, you can:

  • Dashboard: View real-time server information
  • Players: See connected players and kick troublemakers
  • Maps: Browse and change maps instantly
  • Broadcast: Send messages that appear on all players' screens
  • Status: View detailed server status

API Protocol

The mutator uses a simple line-based JSON protocol over TCP:

Authentication:

CLIENT: AUTH your_password
SERVER: {"status": "authenticated"}

Available Commands:

PING                          - Keep-alive check
STATUS                        - Get server info
PLAYERS                       - List connected players
MAPS                          - List available maps
KICK <player_name>           - Kick a player
CHANGEMAP <map_name>         - Change to specified map
SAY <message>                - Broadcast message to all players

Example Python Client:

import socket
import json

s = socket.socket()
s.connect(('192.168.1.100', 7778))

# Authenticate
s.send(b'AUTH changeme\n')
response = s.recv(1024).decode().strip()
print(json.loads(response))  # {"status": "authenticated"}

# Broadcast message
s.send(b'SAY Hello players!\n')
response = s.recv(1024).decode().strip()
print(json.loads(response))  # {"status": "Message broadcasted"}

s.close()

Configuration Options

Mutator Configuration (UTAdmin.ini)

Option Default Description
AdminPasscode changeme Password for API access
AdminAPIPort 7778 TCP port for the API server

Security Note: Always change the default password before running on a public server!

In-Game Configuration

When adding the mutator via the UT2004 UI, you can configure:

  • API Passcode: Set your secure password
  • API Port: Change the listening port if needed

Troubleshooting

Mutator Issues

Server won't start with mutator:

  • Check UT2004.log for errors
  • Ensure UTAdmin.u is in the System/ folder
  • Verify EditPackages=UTAdmin is in UT2004.ini

Can't connect to API:

  • Verify the server is running: netstat -an | grep 7778
  • Check firewall settings
  • Ensure the port in UTAdmin.ini matches your connection settings

Flutter App Issues

Build fails on Android:

  • Update Android SDK to version 36
  • Install NDK version 27.0.12077973
  • Run flutter clean then flutter pub get

Connection timeout:

  • Verify server IP and port
  • Check network connectivity
  • Ensure mutator is loaded on the server

Authentication failed:

  • Double-check the password matches UTAdmin.ini
  • Password is case-sensitive

Development

Project Structure

UTAdmin/
├── Mutator/
│   ├── Classes/           # UnrealScript source files
│   │   ├── UTAdmin.uc
│   │   ├── UTAdminAPIServer.uc
│   │   ├── UTAdminConnection.uc
│   │   └── UTAdminMessage.uc
│   └── System/            # Compiled mutator
│       ├── UTAdmin.u
│       └── UTAdmin.ini
└── FlutterApp/
    ├── lib/
    │   ├── main.dart
    │   ├── utadmin_client.dart
    │   ├── screens/
    │   └── widgets/
    ├── android/
    └── pubspec.yaml

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Technical Details

Mutator Architecture

  • UTAdmin: Main mutator class, initializes the API server
  • UTAdminAPIServer: TCP listener that spawns connection handlers
  • UTAdminConnection: Handles individual client connections and commands
  • UTAdminMessage: LocalMessage class for on-screen HUD messages

Flutter App Architecture

  • utadmin_client.dart: Core API client with connection management
  • screens/: UI screens for different functions
  • widgets/: Reusable UI components

License

This project is provided as-is for use with Unreal Tournament 2004.

Credits

Created for the UT2004 community. Built with UnrealScript and Flutter.

Support

For issues, questions, or contributions, please visit the GitHub repository.


Enjoy managing your UT2004 server from anywhere! 🎮📱