Skip to content

2. Add Greyhaven

Greyhaven is an overworld town center made up of the town center and various point of interest (POIs) as defined by you the author.

Start from Checkpoint 1 or download Checkpoint 2.

  • How an overworld town is defined
  • How services are generated around a town center
  • How the player’s start location relates to the town
  • The difference between a town center and a service POI
  • Why obsolete street anchors are dangerous

Inside intro block, add:

"startLocation": {
"x": 112,
"y": 98,
"mapId": "overworld"
}

The player begins close to Greyhaven rather than on the exact town-center coordinate. That leaves the town readable on the map and avoids spawning directly on top of generated content.

Replace the empty towns object with:

"towns": {
"tutorial_codex:greyhaven": {
"id": "tutorial_codex:greyhaven",
"name": "Greyhaven",
"near": {
"x": 112,
"y": 96
},
"mainLandMass": true,
"services": [
"tavern",
"blacksmith",
"shrine",
"sage"
],
"serviceMinRadius": 3,
"serviceRadius": 6,
"safetyRadius": 10,
"personality": "waterside"
}
}

The near coordinate identifies the town center. The runtime uses the surrounding area to place the town’s service locations.

Coordinates are implementation choices, not prose. They require a runtime check: the intended land, roads, and nearby features must actually make sense in the generated world.

true requests placement on the main land mass. It helps avoid an unsuitable isolated placement but does not replace visual playtesting.

Greyhaven exposes four supported services:

  • tavern
  • blacksmith
  • shrine
  • sage

These are registry values. A plausible word is not automatically a supported service.

serviceMinRadius and serviceRadius define the placement band around the center. The services are related to Greyhaven, but they are not all stacked on the center tile.

safetyRadius reserves room around the settlement for a safer arrival and town experience.

waterside is a supported town personality. It influences the generated settlement presentation; it does not create a custom map.

Later content can mean either:

somewhere in or around Greyhaven

or:

inside Greyhaven's tavern

Those are different placement intentions.

General town-relative content uses the town ID and omits a service POI. Tavern content uses the verified tavern placement path introduced in Chapter 3.

Run the Author validator again. Check that:

  • tutorial_codex:greyhaven is recognized,
  • all four service values are accepted,
  • the personality is accepted,
  • the intro start location has valid coordinates and map ID.

Import Checkpoint 2 and begin a new local game.

Observe:

  • the player begins near the intended area,
  • Greyhaven appears on reachable terrain,
  • the four services appear around the settlement,
  • the start does not place the player in water or an obstructed tile.

This is the first checkpoint where runtime observation matters. Static validation cannot judge whether coordinates produce a good arrival.

Your file now adds:

  • intro.startLocation,
  • towns["tutorial_codex:greyhaven"],
  • Greyhaven’s four services,
  • the approved town-center and placement radii.

Record the coordinates you actually tested. Do not change them casually in later chapters.

Continue to Chapter 3: Add Mara and the Tavern.