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 *** [
Q. Who are you guys/gals?
A. Former Citizens of Paragon, just like you. We’re just trying to rebuild our
online home, one line of code at a time. We volunteer our time and skills
to get the job done
Q. Are you guys for real? Not an April Fools?
A. Nope we’re real. We WERE going to announce on April 1st, but we waited an extra
day because we didn’t want to come off as a prank.
Q. For reals?!
Q: How is this different from ParagonChat?
A: PChat appears to be focused on providing an interactive chat environment using
the CoX client. The chat platform they're building on will make things like combat
extremely difficult, if not impossible. They are also working with the I23+ client
currently. The SEGS team, on the other hand, is building a true server, designed to
interface with multiple CoX clients. This will eventually allow for AI enemies and
combat. Currently focusing on Issue 0 client, but with plans to eventually move to
a newer client.
From a technical perspective, PChat is not an authoritative server, meaning it does
not care what you tell it you're doing. A clever "hacker" can tell the server that
he's wearing a Statesman costume and flying upside-down at superspeed, and the PChat
server will just assume that's ok and send it out to all other clients. This poses
some obvious challenges for combat and competitive types of play. In simplistic terms,
PChat is a chat server that interprets client information to send back and forth, it
really doesn't try to be more (yet?). PChat appears to be closed source.
SEGS however IS an authoritative server. This is the reason why we're still working on
rubberbanding issues. The server must know what your character is doing at all times,
and needs to ensure that you're allowed to do that. This means that both the server
and client need to calculate interpolation for movement the same way. It needs to
ensure your costume is legitimate and that you have the powers you're using. It makes
development much more complicated, but also means that we can eventually have the game
we all love and remember. Because SEGS is an actual c++ developed server, it also
means that we can eventually have combat and AI and missions and etc.
Q: Are there any DMCA concerns from NCSoft for intellectual property? Are entities
like Statesman and the like going to be genericized, much like player characters
that too closely resembled The Hulk et all were back in the real game?
A: We don't think so. NPC definitions and such will either come from user
supplied files, or converted client assets, and converted client assets are in the
hands of the user base. We won't be distributing those. So pretty much like how
Paragon Chat came about. And the clients were all freely available from NCSoft's own
FTP server when the game was still active. We haven't modified it, or changed it
in any way.
Q: So, is it possible to actually play City of Heroes?
A: As of right now, it's not's possible to play the full game. The current version of
this server allows you to be able to log in create a toon and walk around Atlas Park.
But the map doesn't know where anything or anyone is right now, so it will rubber
Q. How do I create my own server?
A. Well, it’s not a complete server. More like 5%. By if you want
to try what we have, you can download a Windows EXE file, or compile the code using
QT Creator version 5.8+. Then using the I0 client, and an app to tell it what address
to connect to, login, create a character and be in Atlas Park. More detailed
instructions are in the Readme on our GitHub page.
Q. How do I get the client and address app?
A. There's torrent you can get it from. The link for the torrent is in the Readme.
(Hint: reading the Readme file is VERY important. It has a lot of information.)
Q. Should I read the "Readme File?"
A. Yes. Several times. Commit it to memory. There will be a quiz next period.
Q: How can I help you guys?
A: Well, if you know C++ and are comforatble with Object Oriented coding, OO for short,
You can go to the GitHub page, and look at issues, and pick a task that fits your
knowledge. Some of them are marked as "good first issue". If you're not a coder, you
can still help by downloading the EXE or compiling the code for your platform, and
running it, and sending in bug reports. Plus there are a few non-programmer issues
you might be able to tackle as well.
Q: How can I keep up with what is going on?
A: Follow us on Twitter (@segscode), stop by these forums often, or join us in chat. You
can find the info for the chat and forums in the Readme on the GitHub page.