> For the complete documentation index, see [llms.txt](https://mdswork.gitbook.io/ragemode-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mdswork.gitbook.io/ragemode-docs/guides/game-setup.md).

# Game setup

Setting up a game can be done through GUI or manually from commands. You can choose as you like.

{% embed url="<https://www.youtube.com/watch?v=CWB1G25ifFY>" %}

### Step 1: Create game

To begin, you need to create a game instance. Each game must have a name which will be used in many options like placeholders.

```
/rm addgame <gameName> [maxPlayers] [minPlayers] [gameType]
```

`gameName` - The game name must meet this regex expression pattern to create game (this is to avoid using special characters that are difficult to type):

```regex
^[a-zA-Z0-9_\\-]+$
```

`maxPlayers`, `minPlayers` - Specify optional arguments for maximum and minimum amount of players

* `maxPlayers` - can range from 2-1000
* `minPlayers` - can range from 1-1000

`gameType` - Specify optional argument for selecting game type for the game which can be `classic` for [PvP player mode](/ragemode-docs/classic-game-guide/setup.md) and `apocalypse` for [PvE zombie mode](/ragemode-docs/zombie-game-guide/setup.md).

{% hint style="warning" %}
Once creating a game, the game will be set to **LOCKED** state, meaning players can not join and start this game. You need to perform all required settings to make it available.
{% endhint %}

**After this, setup GUI will open for you**

<div align="left"><figure><img src="/files/8mF4FK7pjzVvbPP1gS4j" alt=""><figcaption></figcaption></figure></div>

Or you can open this menu using `/rm gamesetup <game> gui` command. Within this menu, you can adjust game preferences to your liking.

### Step 2: Configure game locations

{% hint style="warning" %}
The recommended map (world) for these game modes is a small, bordered box from which players cannot exit.
{% endhint %}

<details>

<summary>Watch: Setting game locations</summary>

<figure><img src="/files/rsihFt9DpW4jHSIRobMy" alt=""><figcaption></figcaption></figure>

</details>

* `Lobby position` - The location where players are teleported when they join a game and waiting for start.
* `First corner` - The first corner location of the arena (A)
* `Secondary corner` - The secondary corner location of the arena (B)
* `Spawns` - Add or remove player/zombie spawn locations
  * *Zombie spawn locations are optional if random spawn is enabled,* [*reminder about random spawn*](/ragemode-docs/zombie-game-guide/setup.md)

<details>

<summary>Watch: Select game platform using selection wand</summary>

<figure><img src="/files/G8JGlIZjILxycwYJkuX1" alt=""><figcaption></figcaption></figure>

</details>

{% hint style="warning" %}
With wand selection or manually with `/rm area pos12` you also need to perform `/rm area add <gameName>` command to save area location for the specified game.
{% endhint %}

{% hint style="info" %}
Make sure to select a lowest and highest point location of the area. This ensures that zombies, players and item actions won't destroy blocks, spawn entity outside of game area.
{% endhint %}

### Step 3 (Optional): Create [interactable signs](/ragemode-docs/guides/signs.md)

<details>

<summary>Watch: Create different types of signs</summary>

<figure><img src="/files/I6i3PEZp6C8YGuxeX1Pw" alt=""><figcaption></figcaption></figure>

</details>

These are the types of signs you can create:

* `join`, `spectate`
  * Parameters: `<gameName>`
* `randomjoin`
* `lobbyshop` (can only be used in lobby)
* `stats`
* `leaderboard`

### Step 4 (Optional): Set times

By default once you create a game, default game time is 5 minutes, and lobby time is 30 seconds. You can change this for your liking within the setup GUI menu or through command: `/rm gamesetup gametime` or `/rm gamesetup lobbytime`

Minimum game time: **180 seconds (3 minutes)**\
Maximum game time: **3600 seconds (1 hour)**

Minimum lobby time: **5 seconds**\
Maximum lobby time: **180 seconds (3 minutes)**
