# Introduction

Welcome to the documentation page! This page serves as a comprehensive guide for all of our Plugin, or API. It is designed to provide you with the necessary information to help you get through the integration process. Whether you are a newcomer or an experienced user, this documentation page is here to assist you.

Our team has put together this documentation page to ensure that you have all the information you need to use our Plugins or API effectively. We have included step-by-step instructions, helpful tips, and other useful resources to guide you through every aspect.

We hope to make the experience as easy and straightforward as possible. If you have any questions or concerns while using our plugin or API issues, please do not hesitate to contact us.

Thank you for choosing ReverseWinterStudios, and we hope that this documentation page proves to be a valuable resource for you!


# Errors

All error response messages get returned in a JSON format

| **Field**   | **Type** | **Description**        |
| ----------- | -------- | ---------------------- |
| code        | string   | RWS server error code. |
| description | string   | Error description.     |

&#x20;

```json
{
   error: {
      code: "0",
      description: "description"
   }
}
```

&#x20;

**404 Not Found**

| **Code** | **Description**    |
| -------- | ------------------ |
| 001-001  | User not found.    |
| 001-002  | Project not found. |
| 001-003  | Object not found.  |

&#x20;

**403 Forbidden**

| **Code** | **Description** |
| -------- | --------------- |
| 002-001  | Invalid token.  |

&#x20;

**401 Unauthorized**

| **Code** | **Description**                                    |
| -------- | -------------------------------------------------- |
| 003-001  | Invalid token.                                     |
| 003-002  | Unable to authorize banned user.                   |
| 003-003  | Wrong username or password.                        |
| 003-004  | User account not confirmed.                        |
| 003-005  | Unauthorized user.                                 |
| 003-006  | RWS Login server or resource owner denied request. |
| 003-007  | Missing Information.                               |
| 003-008  | Game mismatch or doesn't own game.                 |
| 003-009  | Game doesn't exist for user.                       |
| 003-010  | Access denied.                                     |

&#x20;

**400 Bad Request**

| **Code** | **Description**                                                       |
| -------- | --------------------------------------------------------------------- |
| 004-001  | Request has invalid parameters.                                       |
| 004-002  | Client authentication failed.                                         |
| 004-003  | Parameter state missing or too weak as it has less than 4 characters. |
| 004-004  | Authorization grant is invalid or expired.                            |
| 005-001  | Something went wrong.                                                 |

&#x20;

**422 Unprocessable Entity**

| **Code** | **Description**                                                                                    |
| -------- | -------------------------------------------------------------------------------------------------- |
| 006-001  | Nickname missed in query.                                                                          |
| 006-002  | User with specified username already exists.                                                       |
| 006-003  | Server specified already exists.                                                                   |
| 006-004  | Server specified failed to remove.                                                                 |
| 006-005  | Server specified failed to update.                                                                 |
| 006-006  | No Servers Found.                                                                                  |
| 006-007  | Exceeded server max limit.                                                                         |
| 006-008  | Call unavailable for this Login project.                                                           |
| 006-009  | Change this Login project settings in RWS Developer Account or Contact Us.                         |
| 006-010  | Mismatch project type.                                                                             |
| 006-011  | Social network authentication failed: SERVICE\_NAME (e.g. Social Provider name. Discord, Steam..). |
| 006-012  | This social account already linked to another user.                                                |
| 006-013  | Authentication via this social network not enabled for this Login project. Need's to be enabled.   |
| 006-014  | Password reset disabled for this Login project.                                                    |
| 006-015  | Duplicated attributes.                                                                             |

&#x20;

**429 Too Many Requests**

| **Code** | **Description**                                                                  |
| -------- | -------------------------------------------------------------------------------- |
| 007-001  | Allowed number of search attempts exceeded. Wait one second before next request. |
| 007-002  | Allowed number of requests exceeded.                                             |

&#x20;

**200 Successful**

| **Code** | **Description** |
| -------- | --------------- |
| 008-001  | Access granted. |


# Plugins

1. [Server Manager](/plugins/server-manager)
   1. [About](/plugins/server-manager/about)
   2. [Configuration](/plugins/server-manager/configuration)
   3. [Usage](/plugins/server-manager/usage)
      1. [Merge With Project](/plugins/server-manager/usage/merge-with-project)
      2. [Find Session](/plugins/server-manager/usage/find-session)
      3. [Create Session](/plugins/server-manager/usage/create-session)
      4. [Server Building](/plugins/server-manager/usage/server-building)

<br>


# Server Manager

> &#x20;[Buy Now](https://www.unrealengine.com/marketplace/en-US/product/server-manager) - Unreal Engine

1. [About](/plugins/server-manager/about)
2. [Configuration](/plugins/server-manager/configuration)
3. [Usage](/plugins/server-manager/usage)
   1. [Merge With Project](/plugins/server-manager/usage/merge-with-project)
   2. [Find Session](/plugins/server-manager/usage/find-session)
   3. [Create Session](/plugins/server-manager/usage/create-session)
   4. [Server Building](/plugins/server-manager/usage/server-building)

<br>


# About

Revolutionize server creation & management in Unreal Engine with Server Manager! Create multiple dedicated servers with ease, host from anywhere, & track usage. Streamline your game development today!

### Features

* Create Match
* Find Match
* View and Manage All Servers
* Region Search
* Player Queue
* Server Browser
* Adjustable Matchmaking Delay
* Adjustable Settings
* Automatic Server Clean-Up

### Getting Started

{% content-ref url="/pages/sA7bYuUHvfyvn5HRMBoO" %}
[About](/plugins/server-manager/about)
{% endcontent-ref %}


# Configuration

### Create RWS Account

[Login](https://reversewinterstudios.com/login/) or [create an account](https://reversewinterstudios.com/registration/)

### Create Developer Account

Are you ready to take your game development to the next level? Create a developer/publisher account with us by [Clicking Here](https://reversewinterstudios.com/developer/)! Don't worry, you don't have to publish your game - you can keep it hidden/private. This is to get 2 access keys so we can use it later. Don't miss out on this game-changing opportunity.

### Navigate To Developer Portal

To access the Developer Portal, kindly navigate to the Account Menu and select the Developer Portal. Once you have opened the Developer Portal, locate your Game Project and Login Project. Please ensure that you have completed the necessary verification process, which can be confirmed by checking the left-hand side of the screen for the "Verification Needed" status. Once verified, click on Server Manager and follow the provided instructions. Upon approval, you will receive an email notifying you of the successful acceptance, after which you may proceed with the subsequent steps. Note that both the Project ID and Login Project ID are required for the next step.

You may be wondering how can I get my Project ID or Login Project ID, first you need to click on Login can be found in the side menu, and you will need to create a login project if one is not already created. If so you can click on it or copy the ID. Now you will see on the top menu "Project ID:" and "Login Project ID:" now you can save those for later.

### Download RWSManager

Downloading the RWSManager can be found inside your Developer Portal on the left sidebar it will say Downloadable and click Server Manager. Again, if you haven't already you will need to be verified to download the server manager.

{% hint style="warning" %}
If you are on Windows Server some versions you have to run (msiexec /i "C:\YOUR\PATH\TO\RWSManager.msi") but then after it will automatically get updated.
{% endhint %}

### Enabling the Plugin

Download the plugin through the Epic Games Launcher and install it to an engine version. Once the plugin is installed, go to **Edit -> Plugins** and under the *"*&#x4F;the&#x72;*"* section you should be able to see *RWSManager SDK*. Please make sure that the plugin is enabled.

If you plan on using Server Manager from C++ don't forget to list it in your build dependencies! The build file is located in the *Source* folder of your project.

```cpp
// Include RWSManager as a dependency.
PrivateDependencyModuleNames.Add("RWSManager");
```

### Changing Project Settings

Navigate to unreal engine project settings then scroll down until you see RWSManager and paste in the Project ID and the Login Project ID you found earlier.

### Adding your own maps

Navigate to the RWSManager Content Folder, you may need to go into View Options and make sure "Show Plugin Content, and Show Engine Content is checked" then find RWSManager plugin folder then `Manager > Common > Lobby > Settings > MapList`  Then you can add your own maps into this list, or you can create your own enum for a list of maps this is just so we don't have to redefine the name in multiple different places only just one.


# Usage

1. [Merge With Project](/plugins/server-manager/usage/merge-with-project)
2. [Find Session](/plugins/server-manager/usage/find-session)
3. [Create Session](/plugins/server-manager/usage/create-session)
4. [Server Building](/plugins/server-manager/usage/server-building)

<br>


# Merge With Project

You may need to go into View Options and make sure "Show Plugin Content, and Show Engine Content is checked"

### Parenting GameMode

You will need to open your own gamemode and go to Class Settings, and click Parent Class and search for RWSManagerGameMode then after you have parented you will need to copy some code into your own. `RWSManager Content > Manager > Common > Game > GameGameMode` Then back in your gamemode paste the code you found in the GameGameMode then on Event Begin Play right click and click "Add call to parent function" you will also need to do the same if you have any of these events in your gamemode **Pre Login, Begin Play, Post Login, and Logout.**

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2F1pGGjgZi8ZELAIYfbT5J%2FNodes.png?alt=media&amp;token=e6c7c7d2-3802-4a2c-ab19-08281e96078f" alt=""><figcaption></figcaption></figure>

### Adding GameMode Events

* OnBeforeServerStart (This is when the server is starting and you wanna load all ur data before users actually join.)
* OnServerStarted (This is when the server has been posted and ready for users.)
* OnServerError (This is when any errors occur)
* OnMatchmakingPlayerJoined (When a player joins you can also get there custom matchmaking data)

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2FGoENSlWKIB2gghACkoD7%2FOnBeforeStart.png?alt=media&amp;token=2f3e0f54-35b8-4813-baa4-aebedbe61a0c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2FEAiNUdWQ3Wisj4txGReD%2FOnServerStarted.png?alt=media&amp;token=b6bc8d6f-62fb-460a-ae53-dc8ed2209010" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2FiwQvejbNWfKPT6bpQTdl%2FOnServerError.png?alt=media&amp;token=9faa006b-86cc-41b1-86c3-1edfc9458784" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2F4SdMBbpogmVYbLLgPXta%2FOnMatchmakingPlayerJoined.png?alt=media&amp;token=632a947d-fc7b-4223-808f-08757e85a412" alt=""><figcaption></figcaption></figure>


# Find Session

Below you will find an image or code on how to implement a find session, or you could of course just use the lobby we've provided you inside the example project it comes with find session fully assembled and ready.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://1651438638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5DtJrZqhDYpS6sAk6i1%2Fuploads%2FZCEILB92BbBT4NqRVhVI%2FFindSession.png?alt=media&amp;token=fef7db75-8856-44e4-986e-befcc1684c27" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Let me explain a little bit about each variable.&#x20;

Map Name: This will be the map name that you're searching for.

Game Mode: This will be the mode you're searching for.

Game Region: This will be the region you're searching for we also have a node called "RWSGetRegions" to get a list of region usually you add this to a dropwdown and when a user selects that you return the result and plug it into GameRegion. We do this inside the Example Lobby if you wanna take a look at that.

Game Type: This is your Type aka genre, Can be FPS, Third Person, Battle Royale. It will be publicly viewed.

Custom: This will return the data on the server

Matchmaking Custom: Will be called once a user has connected to the server. So say you have a party of user and you want to reconnect them on a server level this is what this variable is used for.

Success Callback: Callback function called after successful Find Session.

Error Callback: Callback function called after the request resulted with an error.

Message Update Callback: Callback function called after the request has been updated with data.


# Create Session

Create session is done automatically by the Server Manager application, so basically when some is searching for a match via Find Session it will send the request to the Master Server, and you can adjust the X amount of attempts via the project settings. by adjusting the time this will do basically say someone is searching 10 times and a match is not found it will create one. The reason we do this instead of leaving them open is purely keeping your server clean especially when no is using the server you dont want unwanted usage.


# Server Building

### Build For Dedicated Server

Build your project for a dedicated server. If you don't know how to create a dedicated server you can follow this [guide](https://docs.unrealengine.com/5.1/en-US/setting-up-dedicated-servers-in-unreal-engine/) make sure you change it to the engine version you are on found on the top left of the guide.

### Now Assign Maps

Now you need to assign the maps that the server manager can open can be found by opening the server manager then going to Settings and then click on the Plus sign next to Map List then you will need to put the exact map name its case sensitive.


# Advanced Chat System


# Usage


# Setup

**Step 1**:

Login or Sign Up an account By clicking on [Login](https://reversewinterstudios.com/login/) or [Sign Up](https://reversewinterstudios.com/registration/) at the top of the page

<br>

**Step 2**:

Create a developer/publisher account by [Clicking Here](https://reversewinterstudios.com/become_developer) don't worry this does not mean you need to publish the game. You will be able to make your game hidden/private you just need the access keys it gives you after you create a publisher account. This is to help keep our tools secure.

<br>

**Step 3**:

Navigate to the Developer Portal in the Account Menu after you have the Developer Portal open go to your Game Project. Make sure you have finished the verification you can check by looking at the left where it says Verification Needed then just click on Advanced Chat and follow the instructions. Then after it has been accepted you will receive an email and keep following the rest of these steps.

![](https://reversewinterstudios.com/uploads/documentation/image/original/DeveloperPortal-Image.PNG)

<br>

**Step 4 (OPTIONAL)**:

If you plan on using the all servers chat you will need to download the [RWSChatSystem](https://reversewinterstudios.com/app/chat_system/installer/). You will be running the server and have full control over the chat system.

* &#x20; **Step 3.1**: After you have downloaded the chat system you will need to port forward your port **8999** on your server.
* &#x20; **Step 3.2**: You will need login to your RWS Account this will be a one time process after it will start automatically logging you into your account. Your **Project ID** and **Login Project ID** can be found inside your developer portal.

![](https://reversewinterstudios.com/uploads/documentation/image/original/ChatClient.png)


# Merge With Project

**Step 1**:

Open your widget and inside the pallet type ChatWidget and move into your widget.

**Step 2**:\
Open your player controller and parent the player controller called RWSChatPlayerController or move the function inside the player controller to your own and replace the references to your player controller.


