# Gamemodes

## <mark style="color:red;">▸Verify Gamemode</mark>

After installing **Vliss**; you need to ensure that Vliss is utilizing the correct gamemode. Vliss is able to recognize numerous gamemodes; however, may not catch every single one.

View your **server console output** and look for the following:

![Example of vliss properly detecting the gamemode](/files/-MNT9J3ODGD_HeIRg6QW)

![Example of vliss not detecting the gamemode](/files/-MNT9NR4efKbjnIg6A8_)

If console reads *<mark style="color:yellow;">**Gamemode Detected: Unknown**</mark>*; this means that you are running a gamemode not detected by Vliss.

Go to folder <mark style="color:yellow;">**`addons\vliss\lua\vliss\sh\gamemodes\`**</mark>

Find the gamemode file similar to your gamemode and open it.

If running <mark style="color:yellow;">**Prophunt**</mark>; open:<mark style="color:yellow;">**`sh_cfg_gm_prophunt.lua`**</mark>

If running <mark style="color:yellow;">**DarkRP**</mark>; open:<mark style="color:yellow;">**`sh_cfg_gm_darkrp.lua`**</mark>

After it is open; view the setting at the top which ends in **Enable** and set it to **true.** Review the examples below if you need help:

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

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_darkrp.lua

rp.Enabled = true
```

{% endtab %}

{% tab title="Deathrun" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_deathrun.lua

deathrun.Enabled = true
```

{% endtab %}

{% tab title="Melon Bomber" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_melonbomber.lua

melon.Enabled = true
```

{% endtab %}

{% tab title="Murder" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_murder.lua

murder.Enabled = true
```

{% endtab %}

{% tab title="Prophunt" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_prophunt.lua

prophunt.Enabled = true
```

{% endtab %}

{% tab title="Sandbox" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_sandbox.lua

sandbox.Enabled = true
```

{% endtab %}

{% tab title="Terror Town" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_ttt.lua

ttt.Enabled = true
```

{% endtab %}

{% tab title="Zombie Survival" %}

```lua
-- OPEN: addons\vliss\lua\vliss\sh\gamemodes\sh_cfg_gm_zombiesurvival.lua

zombie.Enabled = true
```

{% endtab %}
{% endtabs %}

Once you have set your gamemode's config to <mark style="color:yellow;">`true`</mark>; restart your server and join. You should now be setup to run your proper gamemode.

{% hint style="info" %}
The latest version of Vliss includes a "smarter" gamemode detection system. This is the same system that will be included in the complete re-write.
{% endhint %}

## <mark style="color:red;">▸Adding New Gamemodes</mark>

To add support for your gamemode properly; follow the instructions below:

Open the gamemode loader file located in<mark style="color:yellow;">**`lua\vliss\sh\sh_cfg_gm.lua`**</mark>

Determine what entry best explains your running gamemode. If it is based on darkrp; then you can add your new gamemode under the darkrp listings:

```lua
/*
    rp
*/

[ 'darkrp' ]            = { id = 'rp', name = 'DarkRP' },
[ 'dark_rp' ]           = { id = 'rp', name = 'RP Based' },
[ 'starwarsrp' ]        = { id = 'rp', name = 'Starwars RP' },
[ 'hogwartsrp' ]        = { id = 'rp', name = 'Hogwarts RP' },
[ 'hogwarts_rp' ]       = { id = 'rp', name = 'Hogwarts RP' },
[ 'new_gamemode' ]      = { id = 'rp', name = 'Your Gamemode Name' },
```

**Line 10+** is where you will add your new gamemode to the list. Ensure that you enter your gamemode name correctly in the area before the equal sign where **'new\_gamemode'** is in the example above. It is the name you use in your *server's startup parameters* when you specify your gamemode name. It is also the name of the gamemode folder on your server.

You may use whatever name you wish for the **name** value; but you MUST keep the **id** as **`'rp'`** or it won't know which settings to load (if you're running an RP gamemode).

Other gamemodes such as Prophunt, etc; are the same, but with a different **id** value.

####

## <mark style="color:red;">▸Gamemode ID List</mark>

In the above information ([**Adding a New Gamemode**](/setup/gamemodes.md#adding-new-gamemodes)); it requires you to use an **id** for each new custom gamemode you add. Below, those IDs have been provided:

| **Gamemode**                                                    | **ID** |
| --------------------------------------------------------------- | ------ |
| <mark style="color:green;">**DarkRP**</mark>                    | rp     |
| <mark style="color:green;">**Deathrun**</mark>                  | dr     |
| <mark style="color:green;">**Melon Bomber**</mark>              | mb     |
| <mark style="color:green;">**Murder**</mark>                    | mu     |
| <mark style="color:green;">**Prophunt**</mark>                  | ph     |
| <mark style="color:green;">**Sandbox**</mark>                   | sb     |
| <mark style="color:green;">**Trouble in Terrorist Town**</mark> | ttt    |
| <mark style="color:green;">**Zombie Survival**</mark>           | zs     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vliss.rlib.io/setup/gamemodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
