Skip to content

dev-osrose/osIROSE-new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

osIROSE - Open Source International R.O.S.E Online Server

Build status

AMD64 Build Codacy Badge

Development and Community

GitHub Repository Community Forum Join the chat in Discord

Issues and Status

GitHub issues

Project Info

Language GitHub license

Software Services Used

Thanks to the following services that make our development easier:

  • Crash reporting analysis provided by backtrace-badge

C++ Installation - Unix

Unix software required

gpp libmysql cmake python

If you get the source from github, you need to setup the build environment:

    git submodule update --init --recursive
    mkdir build
    cd build
    cmake ..

Note, you may need to install the following packages depending on your OS:

    unzip
    autoconf
    libtool
    libssl-dev
    libncurses5-dev
    libreadline-dev
    libmysqlclient-dev

To build the servers, execute the following:

    make

To install the servers to the system (not recommended), execute the following commands:

    make install

"make install" may require superuser privileges.

If you installed the servers, to run the servers execute the following:

    LoginServer&
    CharServer&
    MapServer&

If you opted to keep them in place, the server binaries are located in the bin folder inside the build directory. So from where you ran the command make, you will want to run the following:

    ./bin/LoginServer&
    ./bin/CharServer&
    ./bin/MapServer&

After running for the first time, the servers will create a config file in the current directory that you need to edit.

C++ Installation - Windows

Windows 64bit software required

vis-studio cmake mysql python openssl

After downloading and installing the above applications, to compile the servers run the following commands:

    git submodule update --init --recursive
    mkdir build
    cd build
    cmake ..
    cmake --build . --config Release

This will setup the build directories and compile. The compiled server will be in the bin folder created in the directory you ran cmake in (which should be the build folder).

After running for the first time, the servers will create a config file in the current directory that can be modified.

Server Configuration

The servers can be configured using a server.json file. This file is automatically generated if any server is started and no server.json file exists. It's recommended to generate this file before continuing with the project setup. Simply start any of the servers to generate the file.

Client Setup

The server is designed to work with the assets from the ROSE_112_112NA client. Using different assets may cause issues due to incompatibility. The client is available to download here.

Run the installer and install the game to a desired location. While this project uses the assets from that client it does not use the binaries. For full compatibility you will need to download the latest client binaries from the project's Releases Page

12/5/2019 - Until a new client release is up on github you'll need to use the client from discord: SHA256 Client

After downloading the client files, copy them to the ROSE_112_112NA installation directory (default: C:\Program Files (x86)\TriggerSoft\Rose Online) and overwrite the existing files.

Connecting to the server requires using a special command from the command line, like so:

trose.exe @TRIGGER_SOFT@ _server 127.0.0.1 (replace the IP if not running locally

For convenience, this command can be saved to a file with the extension .cmd in the same folder as trose.exe. Then, the game can be launched by double clicking this file.

Database Setup

The server requires a MySQL (or MariaDB) database server.

To setup the database, first create a new database (e.g. osirose). You will then need to execute the Database/osirose.sql script to generate the database schema and the Database/item_db.sql to populate the item database. This can be done using a database tool or from the command line like so:

  mysql -u<user> -p<password> <database_name> < Database/osirose.sql
  mysql -u<user> -p<password> <database_name> < Database/item_db.sql

NOTE: The item table was generated using client v112_112na. If you are using a different client, please generate your own table to match the information you need.

After setting up the database, two special users need to be created for the login and character servers. They can be created by executing the following SQL commands:

  call create_account("login", "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08");
  call create_account("char", "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08");
  update accounts set account_type="system" where username="login";
  update accounts set account_type="system" where username="char";

The value 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 is an SHA256 hash of the default server passwords created in the default server.json file. It should match the following sections:

    ...
    "charServer":  {
        ...
        "loginUser":         "login",
        "loginPassword":     "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        ...
    },
    "mapServer":   {
        ...
        "charUser":     "char",
        "charPassword": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        ...
    },
    ...

To use your own password, generate an SHA256 hash of your password and update the accounts database and the server.json file.

Finally, we need to create an account to join the game with. Run the create_account procedure again to create a user account, for example:

  call create_account("admin", "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918") # Password is admin

Alternatively, automatic account creation can be enabled in the server config. This will automatically create an account if a user attempts to login to an account that exist. This is recommended as it is much more convenient than having to create password hashes and running sql commands. Simply, try to log in, fail, then try to login again with the same credentials!

To enable it modify server.json to enable createAccountOnFail:

  "loginServer": {
      "createAccountOnFail": true,
      ...
  },

Contributing

If you want to contribute, please read the code of conduct. You can find some documentation about the source code here. Don't hesitate to contribute!