The easiest way to get started with OpenDAoC is to use Docker. This will allow you to run a server without having to install any dependencies on your machine.
A Docker image is available on Docker Hub.
The following instructions should act as a guide for properly setting up a development environment to fetch and push file changes with GitHub as well as build and run a DAoC server successfully.
Instructions currently exist regarding setups for both Ubuntu and Windows operating systems. These configurations may be likewise performed and a local server run on macOS, with some minor alterations--though you'll need either a Windows or an emulation setup to run the DAoC client.
IMPORTANT: Check the Environment Requirements section first as you will not be able to complete certain sections without the proper resources or privileges.
The following sections outline the process of preparing your machine to develop, build, and run an OpenDAoC server:
- Environment Requirements
- Setting Up on Ubuntu
- Setting Up on Windows
- Building Your OpenDAoC Server Locally
- Accessing Local Servers
- Testing
- Logging
- License
The following are the main OS, tool, and version requirements to consider when setting up an environment:
- Operating System: Ubuntu or Windows (macOS usable as a server, but cannot run the DAoC game client without third-party apps)
- Source-Code Editor: .NET IDE that supports C#, such as Visual Studio Community or Jetbrains Rider (if you have a student email address)
- Source Control: Git is recommended for tracking file changes, and GitHub is the current source control service
- RDBMS: MariaDB v.10.5.X+
- .NET SDK Framework: 6.0+ required
This process assumes you do not already have a fully-configured environment with the specific tools or software installed previously.
If you've already completed a step previously, we recommend that you quickly review the steps again to ensure no special configurations are missed.
.NET is an open-source developer platform used for building applications. OpenDAoC uses .NET 6.0.X specifically.
Perform the following steps from the Terminal:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install apt-transport-https
sudo apt-get install -y dotnet-sdk-6.0
dotnet --list-sdks
dotnet --list-runtimes
MariaDB is an open-source relational database management system (RDBMS). OpenDAoC specifically utilizes v10.5.
Perform the following steps from the Terminal:
sudo apt update && sudo apt upgrade
sudo apt -y install software-properties-common
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'
sudo apt update
sudo apt install mariadb-server mariadb-client
- Type
y
to accept.
The RDBMS is installed, but needs a user and database for OpenDAoC to access and use.
The following steps walk you through the process of adding a user and database using MariaDB.
If you're already familiar with the process and wish to skip it, in the following steps we will use the following configurations:
- There must be a user named
opendaoc
. - The user's password must be
opendaoc
. - The
opendaoc
user must have sufficient privileges. - A database must exist called
opendaoc
.
NOTE: If you set values (user ID, user password, and database name) contrary to those specified here, the build will fail.
sudo mysql -u root
CREATE DATABASE opendaoc;
SHOW DATABASES;
CREATE USER 'opendaoc'@localhost IDENTIFIED BY 'opendaoc';
SELECT User FROM mysql.user;
- To grant all privileges for all databases to the opendaoc user, use the following command:
GRANT ALL PRIVILEGES ON *.* TO 'opendaoc'@localhost;
- To grant all privileges only to the opendaoc DB, use this command:
GRANT ALL PRIVILEGES ON opendaoc.* TO 'opendaoc'@localhost;
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'opendaoc'@localhost;
The most recent version of the required DummyDB.sql
file is available as archive at \OpenDAoC-Core\DummyDB.zip
.
Without it, you cannot successfully build a local OpenDAoC server.
After installing MariaDB, you should also notice it installed a program called HeidiSQL, which you'll need to use for this section.
- Launch the Terminal and type
sudo mysql -u root opendaoc < ~/path/to/DummyDB.sql
. This copies the file's contents to theopendaoc
database. - To check that the import was successful, enter
sudo mysql -u root -p
. This launches the MariaDB Client. USE opendaoc;
SHOW TABLES;
This should list multiple tables, which indicates the import was successful.
With Git ready, it's time to clone the OpenDAoC-Core
repository.
- From the Terminal, navigate to the desired directory to house the repos.
- In a browser, navigate to GitHub and open the desired repo.
- Click the Clone button at the top-right corner.
- Copy the clone address.
- Returning to the Terminal, (and from your desired directory) type
git clone (PASTE THE ADDRESS)
. Enter your credentials when prompted, or the SSH key passphrase.
With the repo on your local hard
8000
drive, you need to alter the serverconfig.xml
file to avoid some errors when building OpenDAoC locally.
- Copy the file
/OpenDAoC-Core/CoreServer/config/serverconfig.example.xml
to/OpenDAoC-Core/CoreServer/config/serverconfig.xml
. - Open the
serverconfig.xml
file. - Within the
RegionIP
tags, change the value0.0.0.0
to one of these:- To test locally, enter
127.0.0.1
. - To test over LAN, enter your machine's IP address (use the Terminal command
ip a
, and it should start with192
). - To test outside your network, enter your public IP address.
- To test locally, enter
- Configure the database access as per your own configuration.
Now you're ready to run your own instance of OpenDAoC!
This process assumes you do not already have a fully-configured environment with the specific tools or software installed previously.
If you've already completed a step previously, we recommend that you quickly review the steps outlined to ensure no special configurations are missed.
- Installing .NET 6.0
- Installing MariaDB 10.5
- Installing Git
- Cloning OpenDAoC' Repos
- Altering
serverconfig.xml
.NET is an open-source developer platform used for building applications. OpenDAoC uses .NET 6.0.X specifically, which is supported on all recent versions of Windows.
- Download the .NET 6.0 installer.
- Install the tool and make any configurations as needed.
MariaDB is an open-source relational database management system (RDBMS). OpenDAoC specifically uses v10.5.
- Download MariaDB:
- Initiate the MariaDB installer.
- Enable Use UTF8 as default server's character set. Make any changes to the following dialog windows as desired.
- Complete the installation by clicking Install and then Finish.
The RDBMS is installed, but needs a user and database for OpenDAoC to access and use.
The following steps walk you through the process of adding a user and database using MariaDB.
If you're already familiar with the process and wish to skip it, in the following steps we will use the following configurations:
- There must be a user named
opendaoc
. - The user's password must be
opendaoc
. - The
opendaoc
user must have sufficient privileges. - A database must exist called
opendaoc
.
_NOTE: If you set values (user ID, user password, and database name) contrary to those specified here, the build will fail.
- Launch the MySQL Client (MariaDB 10.5) option from the Start menu.
CREATE DATABASE opendaoc;
SHOW DATABASES;
CREATE USER 'opendaoc'@localhost IDENTIFIED BY 'opendaoc';
SELECT User FROM mysql.user;
- To grant all privileges for all databases to the opendaoc user, use the following command:
GRANT ALL PRIVILEGES ON *.* TO 'opendaoc'@localhost IDENTIFIED BY 'opendaoc';
- To grant all privileges only to the opendaoc DB, use this command:
GRANT ALL PRIVILEGES ON opendaoc.* TO 'opendaoc'@localhost;
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'opendaoc'@localhost;
Prior to accomplishing this step, you will need a recent copy of the DummyDB.sql
file. Without it, you cannot successfully build a local OpenDAoC server. After installing MariaDB, you should also notice a program called HeidiSQL, which you'll need to use for this section.
- Launch the HeidiSQL app.
- At the bottom-left corner. click New > Session in root folder.
- Enter a root user Password if you set one previously.
- Click Save.
- Now click Open to start a connection with MariaDB.
- Select the
opendaoc
database you created previously. - Click File > Load SQL file.
- Navigate to the
DummyDB.sql
file and click Open. - Select the Run file(s) directly option as loading the file will cause HeidiSQL to crash.
The application will process the entire SQL file. Once done, you should now see tables and data populating the opendaoc
database.
With Git ready, it's time to clone the OpenDAoC-Core
repositories.
- From Windows PowerShell, navigate to the desired directory to house the repos.
- In a browser, navigate to GitHub and open the desired repo.
- Click the Clone button at the top-right corner.
- Copy the clone address.
- Returning to the Terminal, (and from your desired directory) type
git clone (PASTE THE ADDRESS)
. Enter your credentials if prompted, or the SSH key passphrase. - Perform these steps for each repo.
With the repos on your local hard drive, you need to alter the serverconfig.xml
file to avoid some errors when building OpenDAoC locally.
- Copy the file
/OpenDAoC-Core/CoreServer/config/serverconfig.example.xml
to/OpenDAoC-Core/CoreServer/config/serverconfig.xml
. - Open the
serverconfig.xml
file. - Within the
RegionIP
tags, change the value0.0.0.0
to one of these:- To test locally, enter
127.0.0.1
. - To test over LAN, enter your machine's IP address (use the Terminal command
ipconfig
, and it should start with192
). - To test outside your network, enter your public IP address.
- To test locally, enter
- Configure the database access as per your own configuration.
Now you're ready to run your own instance of OpenDAoC!
This section provides the commands necessary for both building and running an OpenDAoC server locally.
- Launch the Terminal or PowerShell, navigate to the
/OpenDAoC-Core/
directory and typedotnet build DOLLinux.sln
. This builds the OpenDAoC server on your machine. - If the build was successful, now enter the command
dotnet run --project CoreServer
to launch the server, making it accessible to player logins.
Congratulations! You're now running an instance of OpenDAoC on your machine.
The best way to connect to your local instance, is to use the latest OpenDAoC DAoC client:
- Download the installer and follow the instructions available on OpenDAoC Website.
The client is ready for all OpenDAoC servers.
- Open the folder where you installed the client and create a new file called
local.bat
. - Open the file in a text editor and enter the following:
connect.exe game1127.dll 127.0.0.1 YOURUSERNAME YOURPASSWORD
Notes:
- The IP address should match the IP of the machine running the server.
- With the standard configuration, the account will be created automatically at the first connection.
Once you've built your OpenDAoC server and it's running locally, you can now access it using the DAoC client and DAoCPortal.
- Launch DAoCPortal.
- Navigate to the Custom Shards tab.
- Right-click in the app and click Add Server....
- Enter whatever values you want for Name and Description.
- For IP or Hostname, enter
127.0.0.1
if you're accessing the server from the same machine. - Leave the port set to
10300
. - Click OK.
- Click on the desired server.
- Provide a value for User (Username) and Pass (Password).
- Click Play!
The DAoC client launches and creates a new account based on the credentials you entered. You should be brought to the character selection screen now.
When testing OpenDAoC in-game, special attention should be paid when utilizing the /plvl
GM command. Changing this setting for an account is currently permanent in OpenDAoC.
Also, testing components such as combat (PvP or PvE) cannot be done as a Gamemaster or Admin (creatures and players cannot attack these player types). You must have an account with /plvl 1
status.
If you're using Visual Studio, these are recommended extensions to assist with testing:
If you're using Jetbrains Rider, explore plugins currently available.
Should you have any tools or plugins you'd like to recommend, please let us know and we'll include them here.
NOTE: Currently, not all tests run reliably during a full suite run. This is especially true in the Integration
category, as several ephemeral failures may result due to race conditions with the database. Performing manual reruns of individual tests after a full-suite run should have the end result of clearing most previous failures.
Logging is controlled by the /OpenDAoC-Core/Debug/config/logconfig.xml
file. The default configuration may not be verbose enough for the purposes of development, so make any changes here as needed for logging.