Assets
Modding
Modding
  • Introduction
  • How to add new items
  • How to add new events
  • How to add new stashes
  • How to add new tutorial message
  • How to add weapon HUD image
  • How to add new weapon and ammo
  • How to edit traders
  • How to add language
  • How to add new quest
  • How to add PDA markers
  • How to change in-game SFX
  • How to add ambient sounds to level
  • How to add new dialogue
  • How to change player data
  • How to add new enemy
Powered by GitBook
On this page

How to add new tutorial message

Tutorial "How to add help message like at the game start"

Files & folders needed:

assets/gameplay/help_tips.json

assets/ui/

assets/scripts/p_game.gd

assets/texts/lang_*.json

Structure of the tutorial message:

help_tips.json
{
    "id": "radiation_tip",
    "topic_img": "rad_icn.png",
    "topic_img_size": 64,
    "text": "rad.tip.text"
}
Properties description
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

Create a duplacate at the end of the file:

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

Go to assets/texts/lang_en.json and add new language text key to the file.

lang_en.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]"

Go to assets/scripts/p_game.gd and change new game tutorial id to yours at intro level changed function.

p_game.gd
"intro":
    # wait 2 seconds before tutorial message will appear
    await get_tree().create_timer(2).timeout
    game_process._show_tutorial("my_mod_tutorial")

Don't forget to check assets/scripts/p_app.gd script and check this line:

p_app.gd
GameManager.GameProcess.show_tutorial = true

It must be true for showing any tutorial messages in the game.

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

PreviousHow to add new stashesNextHow to add weapon HUD image

Last updated 5 months ago

It will be looks like this. Don't forget to place comma when adding something at the end. Last element doesn't contains commas.