# How to add new tutorial message

Files & folders needed:

> assets/gameplay/help\_tips.json
>
> assets/ui/
>
> assets/scripts/p\_game.gd
>
> assets/texts/lang\_\*.json

Structure of the tutorial message:

{% code title="help\_tips.json" %}

```json
{
    "id": "radiation_tip",
    "topic_img": "rad_icn.png",
    "topic_img_size": 64,
    "text": "rad.tip.text"
}
```

{% endcode %}

{% code title="Properties description" %}

```ini
id = unique ID for calling with scripts
topic_img = texture name relative to assets/ui/ folder
topic_img_size = size of the topic image texture
text = can be string or language key
```

{% endcode %}

Create a duplacate at the end of the file:

```json
{
    "id": "my_mod_tutorial",
    "topic_img": "items/ecolog_outfit.png",
    "topic_img_size": 64,
    "text": "my.mod.tutorial.message.text"
}
```

<figure><img src="/files/yntHZs5yTrincPvcdGWU" alt="" width="406"><figcaption><p>It will be looks like this. Don't forget to place comma when adding something at the end. Last element doesn't contains commas.</p></figcaption></figure>

Go to <mark style="color:orange;">assets/texts/lang\_en.json</mark> and add new language text key to the file.

{% code title="lang\_en.json" %}

```json
"my.mod.tutorial.message.text": "Hello world! Tutorial message!\nIt can be [color=red]colored[/color]!\nOr even [center]centered[/center].\nAlso [b]BOLD[/b].\nAnd font size [font_size=48]like this[/font_size]\nOr it can be [right]right side[/right]"
```

{% endcode %}

Go to <mark style="color:orange;">assets/scripts/p\_game.gd</mark> and change new game tutorial id to yours at intro level changed function.

<pre class="language-gdscript" data-title="p_game.gd"><code class="lang-gdscript">"intro":
    # wait 2 seconds before tutorial message will appear
<strong>    await get_tree().create_timer(2).timeout
</strong>    game_process._show_tutorial("my_mod_tutorial")
</code></pre>

Don't forget to check <mark style="color:orange;">assets/scripts/p\_app.gd</mark> script and check this line:

{% code title="p\_app.gd" %}

```gdscript
GameManager.GameProcess.show_tutorial = true
```

{% endcode %}

It must be <mark style="color:blue;">true</mark> for showing any tutorial messages in the game.

Run the new game. After 2 seconds you will see popup message.

<figure><img src="/files/3qzeSdikmyH91T1LbBGe" alt=""><figcaption></figcaption></figure>


---

# 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://picnic-in-the-oblivion.gitbook.io/assets/modding/how-to-add-new-tutorial-message.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.
