Skip to content

Adding Locations

Locations are the places in your game world. Players travel between them using the map.

Create content/locations/tavern.yaml:

id: tavern
name: '@location.tavern.name'
description: '@location.tavern.description'
banner: tavern.png
music: tavern_ambience.ogg
ambient: ''
FieldDescription
idUnique identifier, used in dialogue effects and map references
nameDisplay name (use @key for localization)
descriptionText shown when the player is at this location
bannerImage displayed at the top of the location view
musicBackground music track (auto-plays, crossfades between locations)
ambientAmbient sound loop (plays alongside music)

Maps connect locations and let players travel between them. Create content/maps/town.yaml:

id: town
name: '@map.town.name'
image: town_map.png
scale: 1
locations:
- id: tavern
x: 200
y: 350
- id: market
x: 500
y: 200
FieldDescription
idUnique map identifier
nameDisplay name
imageBackground image for the map
scaleTravel time multiplier (higher = longer travel)
locationsArray of location markers with x/y coordinates on the map image

The x and y coordinates position clickable markers on the map image. Players click a marker to travel.

Use triggered dialogues to narrate a location’s first visit:

content/dialogues/tavern_intro.dlg
TRIGGER tavern
REQUIRE notFlag seenTavernIntro
NODE start
NARRATOR: @narrator.tavern_intro
SET flag seenTavernIntro
CHOICE @narrator.choice.look_around
END dialogue
END

The TRIGGER keyword auto-starts this dialogue when the player enters the tavern. The REQUIRE notFlag ensures it only fires once.

When a player travels to a location:

  1. currentLocation updates to the new location
  2. Time advances based on map scale and distance
  3. Any active dialogue ends
  4. Triggered dialogues at the new location are checked

You can also move the player via dialogue effects:

CHOICE @npc.choice.follow_me
GOTO location market
END

The map can be toggled with the SET mapEnabled effect:

# Disable map during a dialogue sequence
SET mapEnabled false
# Re-enable after
SET mapEnabled true

The player starts with the map enabled by default.

Characters can be moved to different locations:

SET characterLocation merchant market

Only characters at the player’s current location appear in the charactersHere list.