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

# How to add PDA 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:

{% code title="pda.json" %}
```json
"garbage_camp_marker": {
  "name": "quest.trus.0.name",
  "spot": "area_neutral.png",
  "type": "camp",
  "position": [384,388],
  "level_id": "garbage_camp"
}
```
{% endcode %}

{% code title="Properties description" %}
```ini
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
```
{% endcode %}

{% code title="pda.json" %}
```json
"my_mod_level": {
    "name": "My mod new marker",
    "spot": "marker.png",
    "type": "camp",
    "position": [135,28],
    "level_id": "garbage_camp"
}
```
{% endcode %}

Create new marker structure at the end of the file, use spot icon from <mark style="color:orange;">assets/ui/pda/marker.png</mark>

<figure><img src="https://944141123-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuMONzcWE3AZUdxqlF6bS%2Fuploads%2FxucYCwgMwzq0Ax6Z8Ibs%2Fimage.png?alt=media&#x26;token=26589b67-b351-411b-819b-f9f739c13fb4" alt="" width="220"><figcaption></figcaption></figure>

Then to add this marker, open <mark style="color:orange;">assets/scripts/p\_game.gd</mark> and add this marker to the player PDA.

Using this function:

```gdscript
pda.AddMarker("my_mod_level")
```

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

```gdscript
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):

```gdscript
GameManager.ShowPDA(true) # false for disabling
```

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

<figure><img src="https://944141123-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuMONzcWE3AZUdxqlF6bS%2Fuploads%2F3O3EUlWiPMGrSNDJPMsA%2Fimage.png?alt=media&#x26;token=2b8c0fdc-3ade-42b7-b4b9-d91f1acc1562" alt=""><figcaption><p>New PDA marker</p></figcaption></figure>

<figure><img src="https://944141123-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuMONzcWE3AZUdxqlF6bS%2Fuploads%2FKAQhFz6vQHQl6MLWdy4v%2Fimage.png?alt=media&#x26;token=3facb044-d9ba-4821-8f29-32e724552ad8" alt=""><figcaption><p>level_id is equal "garbage_camp" from assets/levels/</p></figcaption></figure>
