> For the complete documentation index, see [llms.txt](https://picnic-in-the-oblivion.gitbook.io/assets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://picnic-in-the-oblivion.gitbook.io/assets/modding/how-to-add-new-quest.md).

# How to add new quest

Files needed:

> assets/gameplay/quests.json

Quest JSON structure:

{% code title="quests.json" %}

```json
{
    "id": "quest_unique_ID",
    "title": "quest.language.key.name",
    "money": 0,
    "reward": [],
    "map_spot_id": null
}
```

{% endcode %}

{% code title="Properties description" %}

```ini
money = reward money that will be added to player after quest completed
reward = list of items IDs that will be added to player
map_spot_id = cut-off feature, always set to null
```

{% endcode %}

You can create new quest by adding new structure with unique ID to the quests file.

{% code title="quests.json" %}

```json
{
  "id": "my_mod_quest",
  "title": "my.mod.quest.name",
  "money": 1500,
  "reward": ["medkit","medkit","antirad","ammo_ak"],
  "map_spot_id": null
}
```

{% endcode %}

Now you can add this quest in <mark style="color:orange;">assets/scripts/p\_game.gd</mark> file with GameManager:

```gdscript
GameManager.AddQuestJson("my_mod_quest")
```

And complete it with GameManager:

```gdscript
GameManager.CompleteQuest("my_mod_quest")
```

How it looks like in the game:

<figure><img src="/files/9eF7NaTGJsa75pvgEoLK" alt=""><figcaption><p>Quest added to the journal</p></figcaption></figure>

<figure><img src="/files/A48fE5kTbcTCODgWxw0y" alt=""><figcaption><p>Quest completed and reward is received</p></figcaption></figure>
