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.
What you will learn
Section titled “What you will learn”- 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
Add the starting location
Section titled “Add the starting location”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.
Add the town
Section titled “Add the town”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" }}Read the town model
Section titled “Read the town model”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.
mainLandMass
Section titled “mainLandMass”true requests placement on the main land mass. It helps avoid an unsuitable isolated placement but does not replace visual playtesting.
services
Section titled “services”Greyhaven exposes four supported services:
tavernblacksmithshrinesage
These are registry values. A plausible word is not automatically a supported service.
Service radii
Section titled “Service radii”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.
personality
Section titled “personality”waterside is a supported town personality. It influences the generated settlement presentation; it does not create a custom map.
Town center versus service POI
Section titled “Town center versus service POI”Later content can mean either:
somewhere in or around Greyhavenor:
inside Greyhaven's tavernThose 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.
Validate
Section titled “Validate”Run the Author validator again. Check that:
tutorial_codex:greyhavenis recognized,- all four service values are accepted,
- the personality is accepted,
- the intro start location has valid coordinates and map ID.
Playtest the placement
Section titled “Playtest the placement”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.
Checkpoint 2
Section titled “Checkpoint 2”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.