SEGS is the Super Entity Game Server. It is a free, open source (under the terms of the BSD License), cross-platform, and object-oriented suite of protocols and services designed to interface with popular super hero themed MMORPG clients. SEGS is written in C++ and facilitates common MMORPG functionality such as account and character storage to a database, account and character retrieval from a database, secure client authentication, client movement in a virtual world, and client chat.
For legal information, please see License.txt.
For a list of SEGS authors and contributors, please see Authors.txt.
Requirements and Notes
A copy of the CoH client from Issue 0 (release) version 0.22. This can be found through various sources online, or via magnet link:
Code: Select all
To join our community of developers, join our Discord:
Note that all directories mentioned in this document are always relative to the directory of your SEGS installation, and commands are meant to be run from this directory (except for the initial commands that create that directory).
1. Choose one of two methods to download SEGS.
a. Download and compile from source. (recommended)
SEGS will compile in either Linux or Windows. The libraries you'll need to install are listed below and are availble from your distro's package manager, or via the links below:
QT >5.8 - https://www.qt.io/download-qt-for-appli ... evelopment
CMake >3.6 - https://cmake.org/download/
Git - https://git-scm.com/download
Ensure that your Qt environment is set to "Debug."
For detailed instructions, visit https://segs.nemerle.eu/developers
WARNING: All ye who enter here, abandon all hope!
You are entering the dark side of Qt configurations. There is a Qt plug-in for Microsoft Visual Studio (VS) that allows you to work with Qt projects. The plug-in is available for three VS versions:
2013: https://marketplace.visualstudio.com/it ... tudioTools
2015: https://marketplace.visualstudio.com/it ... oTools2015
2017: https://marketplace.visualstudio.com/it ... ools-19123
Note that we do not recommend the use of this plug-in, nor can we guarantee that SEGS will build and run properly in VS. We are also not offering official support for VS at this time. We attempted, and it fought us tooth and nail. If, after all this warning, you still wish to challenge the beast that is Qt Visual Studio Tools, do so at your own risk.
b. Download and extract SEGS from a stable release.
You can obtain the latest stable SEGS release from https://github.com/Segs/Segs/releases
Files are available in .tar.gz and .zip formats and can be extracted using most compression tools.
To download and extract the files on a typical Unix/Linux command line, use the following commands:
Code: Select all
wget https://github.com/Segs/Segs/releases/segs-latest.tar.gz tar -zxvf segs-latest.tar.gz
2. Install CoX Client version 0.22.
SEGS will only communicate with the CoH client from Issue 0 (release) version 0.22. This can be found through various sources online, or via magnet link:
Code: Select all
3. Copy the PIGG files to SEGS.
The CoX client uses files ending in .pigg to store important game information. SEGS uses these same files to run the game world.
Once installed, navigate to the SEGS output folder. If you compiled from source, this will be in the /out/ folder wherever you built your Qt project. The build folder should be named something like: build-PROJECT_NAME-Desktop_Qt_YOUR_VERSION_NUMBER_MinGW_32bit-Debug. If the folder ends in "Default" instead of "Debug," then you built an incorrect Qt environment type and SEGS will not work. Ensure your Qt environment is set to "Debug." If you downloaded a release version, this will be wherever you extracted it to.
Navigate to the CoX folder and copy the contents of the /piggs/ subfolder to the /data/ directory of SEGS.
4. Using the piggtool located in the SEGS output folder, extract the BIN files from bin.pigg.
SEGS requires that we extract bin.pigg to the /data/bin/ folder. Open a command prompt console. Using the cd command, navigate to the SEGS output folder, which should contain piggtool. To confirm you are in the correct directory, simply enter piggtool in the console. If you receive a help menu about its usage, you are in the correct folder. Type the following into the console and press Enter:
Code: Select all
piggtool -x ./data/bin.pigg
5. Point the CoX client towards your server.
Run CoX-Auth.exe from the CoX directory and set the IP address to that of your server. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network.
6. Bypass the CohUpdater requirement.
The Issue 0 client requires that you launch the game with a program called CohUpdater.exe. To bypass this, create a shortcut to CoX.exe and place it wherever you'd like. Access its properties, and in the Target: field, add the following:
Code: Select all
Code: Select all
-fullscreen 0 -screen 1024 768
7. Continue Server Setup
The client is now ready for play, but continue the server setup by following along below.
SEGS requires two databases in order to function: segs and segs_game. These files come premade with SEGS and are located in SEGS base directory. These instructions assume that you're using these included SQLite databases, as this is the recommended setup for new installations. If these two files are not present in your SEGS directory, or if you need to reset your server, then please run the included program dbtool.
ADVANCED: Manual configuration of the SQLite databases is possible with the help of a GUI tool like the popular SQLite Browser (http://sqlitebrowser.org)
Optionally, SEGS can utilize a remote database server setup utilizing PostgreSQL. This method is only recommended for advanced users and requires PostgreSQL 8.3 (or greater) (http://www.postgresql.org/).
Configuration of your SEGS server is done using the settings.cfg file saved in the SEGS folder, and must be completed before running your server for the first time. See below for an exhaustive breakdown of server configuration.
1. Setup ./settings.cfg.
The settings.cfg file contains all of the configuration options for your private SEGS server. Within this file are several sections:
This section contains information for connecting to the SQL databases required by the server. It's broken down into two sections: AccountDatabase and CharacterDatabase, with the same setting variables for both. These are set to default values and likely don't need to be changed unless your configuration is advanced. A brief summary is below:
db_driver -- The database engine. QSQLITE is the default.
db_host -- The IP of the database host. Using the default sqlite files, this is 127.0.0.1 (localhost)
db_port -- The port to access the database. Almost always 5432
db_name -- The name of the database. By default this is segs for AccountDatabase and segs_game for CharacterDatabase.
db_user -- An administrative username for this database
db_pass -- The password for the database user
This section contains settings specific to the authentication server authserver.
listen_addr -- This is the IP of the server that clients will connect to, followed by :2106 which is the default listening port. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network. The port never changes.
This section contains settings:
server_name -- The name of your private server. This will show up on the server select screen in the client.
listen_addr -- This is the IP of the server that clients will connect to, followed by :7002 which is the default listening port. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network. The port never changes.
location_addr -- This is the IP of the server where the clients will receive from the server, followed by :7002 which is the default listening port. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network. The port never changes.
max_players -- The maximum number of concurrent connections allowed by the server.
max_character_slots -- This is the default number of character slots allowed for each account.
listen_addr -- This is the IP of the server that clients will connect to, followed by :7003 which is the default listening port. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network. The port never changes.
location_addr -- This is the IP of the server where the clients will receive from the server, followed by :7003 which is the default listening port. If running your server locally this CANNOT be 127.0.0.1 (localhost) and must point to your actual IP address on the network. The port never changes.
2. Setup Admin Account
SEGS comes with a default admin account setup with the login details below:
It is advised to change this login information immediately.
// FINISH SETTING UP AN ADMIN ACCOUNT GOES HERE //
Start the Server and Play
At this point you're ready to start the server by running the program authserver. Once running, start the CoX client we set up earlier and log in using any username and password combination (users are autocreated).
Additional information will be available here, including optional steps to take after configuration and where to find additional help.
Frequently asked questions will go here.