Skip to content

Server setup

kaczy93 edited this page Apr 16, 2024 · 9 revisions

Table of contents

  1. Server Setup
    1. Download
    2. Running
    3. Example config
  2. Config entries
  3. Map sizes
  4. CentrED/CentrED+ Migration
    1. CentrED
    2. CentrED+
  5. Building

Server Setup

Download

Download package for your operating system from github releases.
Keep in mind, that release tagged as dev may be unstable.
Once downloaded, extract the package with suitable tool (WinRar, 7-zip on windows, unzip for *nix)

Running

To run the Server, you need .NET 8 Runtime
Just run the Cedserver executable
It will look for xml config file with the same name as executable (eg. Cedserver.exe and Cedserver.xml)
If config file is absent, it will guide you through basic configuration.
If you want to run with different configuration file:

  • (Graphical) Drag-drop desired config file onto executable
  • (Command Line) Pass path to config file to executable e.g. ./Cedserver some_config.xml

CentrED+ mode

To enable compatibility with CentrED+ client, change flag CentrEdPlus in configuration file

Example config

<?xml version="1.0" encoding="utf-8"?>
<CEDConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3">
  <CentrEdPlus>false</CentrEdPlus>
  <Port>2597</Port>
  <Map>
    <Map>map0.mul</Map><!--Also accepts uop-->
    <StaIdx>staidx0.mul</StaIdx>
    <Statics>statics0.mul</Statics>
    <Width>896</Width>
    <Height>512</Height>
  </Map>
  <Tiledata>tiledata.mul</Tiledata>
  <Radarcol>radarcol.mul</Radarcol>
  <Accounts>
    <Account>
      <Name>admin</Name>
      <PasswordHash>password</PasswordHash>
      <AccessLevel>255</AccessLevel>
      <LastPos x="0" y="0" />
      <Regions />
      <LastLogon>2023-01-17T10:00:23.8229516+01:00</LastLogon>
    </Account>
    <Account>
      <Name>user</Name>
      <PasswordHash>password</PasswordHash>
      <AccessLevel>2</AccessLevel>
      <LastPos x="100" y="100" />
      <Regions>
        <Region>region1</Region>
      </Regions>
      <LastLogon>0001-01-01T00:00:00</LastLogon>
    </Account>
  </Accounts>
  <Regions>
    <Region>
      <Name>region1</Name>
      <Area>
        <Rect x1="0" x2="0" y1="10" y2="10" />
        <Rect x1="100" x2="100" y1="110" y2="120" />
      </Area>
    </Region>
  </Regions>
  <AutoBackup>
    <Enabled>false</Enabled>
    <Directory>backups</Directory>
    <MaxBackups>7</MaxBackups>
    <Interval>PT12H</Interval>
  </AutoBackup>
</CEDConfig>

Config entries

  • CEDConfig
    • CentrEdPlus - [boolean] Indicator if server should handle CentrED 0.6.3 or CentrED+ 0.7.9 client
    • Map
      • Map - [string] path to mapX file, can be both MUL and UOP
      • StaIdx - [string] path to staidxX file
      • Statics - [string] path to staticsX file
      • Width - [int] width of map in blocks
      • Height - [int] height of map in blocks
    • Tiledata - [string] path to tiledata file
    • Radarcol - [string] path to radarcol file
    • Accounts - [array] stores information about accounts
      • Account
        • Name - [string] username
        • PasswordHash - [string] md5 hash of user password
        • AccessLevel [byte] user access level
          • 0 - none (block someone from accessing the server without removing the account)
          • 1 - viewer (allow someone to only view the map and chat with others)
          • 2 - normal/editor (view + edit the map)
          • 3 - developer (editor + large scale operations + server flush)
          • 255 - admin (full access)
        • LastPos - (x,y) user last position
        • Regions - [array] List of regions that users can edit, empty means no restriction
          • Region - [string] Region name
        • LastLogon - [datetime] Last login date
    • Regions [array] - list of defined regions
      • Region - region definition
        • Name - [string] region name
        • Area - [array] region area list
          • Rect - (x1,x2,y1,y2) rectangular area of region
    • Autobackup - automatic map backup configuration
      • Enabled - is automatic backup enabled
      • Directory - directory where automatic backups will be stored
      • MaxBackups - Maximum number of backups to store, if exceeded, oldest one will be deleted
      • Interval - Interval between backups in xsduration format

Standard Map Sizes:

# Facet Size(tiles) Size(blocks) Files
0 Pre-Alpha 1024x1024 128x128 map0.mul
staidx0.mul
statics0.mul
0 Felucca(Pre-ML) 6144x4096 768x512 map0.mul
staidx0.mul
statics0.mul
0 Felucca 7168x4096 896x512 map0.mul
map0LegacyMUL.uop
staidx0.mul
statics0.mul
1 Trammel(Pre-ML) 6144x4096 768x512 map1.mul
staidx1.mul
statics1.mul
1 Trammel 7168x4096 896x512 map1.mul
map1LegacyMUL.uop
staidx1.mul
statics1.mul
2 Ilshenar 2304x1600 288x200 map2.mul
map2LegacyMUL.uop
staidx2.mul
statics2.mul
3 Malas 2560x2048 320x256 map3.mul
map3LegacyMUL.uop
staidx3.mul
statics3.mul
4 Tokuno 1448x1448 181x181 map4.mul
map4LegacyMUL.uop
staidx4.mul
statics4.mul
5 TerMur 1280x4096 160x512 map5.mul
map5LegacyMUL.uop
staidx5.mul
statics5.mul

Migration

CentrED# server config is based on original CentrED config.

CentrED

Users of CentrED can reuse their exisitng config without changes.
Simply replace cedserver.exe and you're ready to go

CentrED+

Users of CentrED+ have to adapt their config in a predfined way:

  • Remove Language, Map.Prefix and Map.Format
  • Add CentrEdPlus flag

Building

To build you need a .NET 8 SDK
If you want to build the project yourself, clone the repository and in root of the cloned directory execute
dotnet build
If you want to build without debug information
dotnet build -c Release