Connecting Guide and FAQ v.2

'Yack it up.'
Post Reply
User avatar
erpmario
Posts: 3
Joined: Fri Dec 22, 2017 8:53 pm

Connecting Guide and FAQ v.2

Post by erpmario » Sat Dec 30, 2017 2:31 am

SEGS - Info & Installation Guide

About SEGS

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

SEGS requires:

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

magnet:?xt=urn:btih:c2e7e0aa72004594337d73ae6a305242e23d815f
To report any bugs, please visit our github:

https://github.com/Segs/Segs

To join our community of developers, join our Discord:

https://discord.gg/N6dSTpP

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).

Installation

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
This will create a new directory segs/ containing all SEGS files and directories. Then, proceed to the section of this README titled Configuration.

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

magnet:?xt=urn:btih:c2e7e0aa72004594337d73ae6a305242e23d815f
After the download completes, navigate to the download folder and run CoX-Setup.exe. Follow the prompts to install the Issue 0 CoX client.

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
You should then see a folder called bin be created in your SEGS output directory. Simply move it into the data folder.

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

-project SEGS
If you would like to run the client in windowed mode for debugging purposes, add these optional instructions:

Code: Select all

-fullscreen 0 -screen 1024 768
When you want to launch the client, you will need to use this shortcut.

7. Continue Server Setup

The client is now ready for play, but continue the server setup by following along below.

Setup Database

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

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:

[AdminServer]

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

[AuthServer]

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.

[GameServer]

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.

[MapServer]

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:

Username: Admin
Password: Segs123

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).

Enjoy!

More Information

Additional information will be available here, including optional steps to take after configuration and where to find additional help.

FAQs

Frequently asked questions will go here.
Last edited by erpmario on Thu Jan 04, 2018 7:48 pm, edited 1 time in total.
Fly free, my friends. Fly free.

User avatar
erpmario
Posts: 3
Joined: Fri Dec 22, 2017 8:53 pm

Re: Connecting Guide and FAQ

Post by erpmario » Sat Dec 30, 2017 2:45 am

Reserved for future use
Fly free, my friends. Fly free.

User avatar
broxen
Posts: 43
Joined: Tue Jun 07, 2016 8:26 am
Location: USA
Contact:

Re: Connecting Guide and FAQ

Post by broxen » Sat Dec 30, 2017 2:46 am

Thank you Eric! This is a much needed update.

@Nemerle, can you please sticky this?
-broxen

User avatar
nemerle
Posts: 387
Joined: Thu Jan 10, 2013 3:40 pm

Re: Connecting Guide and FAQ v.2

Post by nemerle » Sat Dec 30, 2017 10:28 am

aaaaand, done. :)
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

ccrackheads
Posts: 6
Joined: Thu Apr 04, 2013 9:47 pm

Re: Connecting Guide and FAQ v.2

Post by ccrackheads » Tue Feb 13, 2018 9:45 pm

A few things of note:
settings.cfg is actually called local_1.cfg in the (most current) https://github.com/Segs/Segs/releases release.

There is also no piggtool to be found, so not sure how to extract the required costume.bin and supergroupcolors.bin from bin.pigg file
The closest thing I could find was pigg_extract.rb, which is located in the github under \Projects\CoX\Utilities\DistributionTools

edit: Was able to find a program online called PiggViewer that allowed me to extract the .bin files.
costume.bin and supergroupcolors.bin couldn't be found (failed when I ran authserver.exe) when they were located under \data\bin\ ..... Moved them bin files to \data\ and authserver.exe found them.

Able to run around the city (albeit a bit jumpy). Thanks!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest