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 PDA markers

This tutorial helps you tu understand how to add or delete PDA map markers

Files & folders needed:

assets/gameplay/pda.json

assets/ui/pda/

assets/scripts/p_game.gd

Map size is 568x832, where 0x0 is top left corner of the map.

Here is JSON structure of marker:

pda.json
"garbage_camp_marker": {
  "name": "quest.trus.0.name",
  "spot": "area_neutral.png",
  "type": "camp",
  "position": [384,388],
  "level_id": "garbage_camp"
}
Properties description
garbage_camp_marker = Unique ID for spawning with scripts
name = string or language key from lang_*.json file
spot = marker icon file name relative to assets/ui/pda/ folder
type = "camp" for safe levels, "quest" for combat levels
position = [X, Y] position of the marker on the map (maximum [568, 832])
level_id = name of the folder/file of the level in assets/levels/ that will load
pda.json
"my_mod_level": {
    "name": "My mod new marker",
    "spot": "marker.png",
    "type": "camp",
    "position": [135,28],
    "level_id": "garbage_camp"
}

Create new marker structure at the end of the file, use spot icon from assets/ui/pda/marker.png

Then to add this marker, open assets/scripts/p_game.gd and add this marker to the player PDA.

Using this function:

pda.AddMarker("my_mod_level")

Also you can check if marker exist at the map and delete it:

if pda.GetMarker("my_mod_level"):
    pda.DeleteMarker("my_mod_level")

Don't forget that you need show PDA (enable pda button in menu and on keys M or P on keyboard):

GameManager.ShowPDA(true) # false for disabling

After adding marker with any method, by event key or completed quest, or changed level, check PDA.

PreviousHow to add new questNextHow to change in-game SFX

Last updated 5 months ago

New PDA marker
level_id is equal "garbage_camp" from assets/levels/