Regions
Edit tabs/regions.json.
Required Fields
| Field |
Requirement |
name |
Must match object key exactly |
basicInfo |
One paragraph describing geography, climate, and atmosphere |
x |
Integer grid coordinate - must be adjacent to other regions in the same realm |
y |
Integer grid coordinate - must be adjacent to other regions in the same realm |
realm |
Which realm this region belongs to |
images.map |
The region's map image: { crop: { focus: { x, y }, zoom }, imageUrl }. crop (focus x/y and zoom) is required whenever the image object is present; imageUrl is optional. Focus x/y run 0..100 (50 = centered), zoom 100..300 (100 = no zoom); out-of-range values are clamped. When imageUrl is absent, the engine generates a map during play and saves it back; an existing map is never regenerated |
Conditional Fields
| Field |
When to Include |
known |
Set to false to hide from map at game start. Omit or set true for visible by default |
factions |
Only when region has dominant faction presence affecting the entire area |
npcLevelRange |
{ min, max } band for NPCs generated anywhere in this region whose level you don't set explicitly. A location's own band overrides it. Use it to set a baseline difficulty for the whole region |
Never Include
| Field |
Reason |
hiddenInfo |
Unused field — region secrets belong in location or NPC entries instead |
basicInfo Format
One paragraph covering three aspects:
- Geography - Terrain, landmarks, natural features
- Climate/Atmosphere - Weather patterns, sensory details, mood
- Inhabitant hints - Who or what lives here, without full faction details
Format: "[Terrain description]. [Climate and atmospheric details]. [Brief mention of inhabitants or dangers]."
Coordinate System
Regions use integer grid coordinates. Within a realm, regions must be adjacent (differ by 1 in x or y, not diagonal).
(0,0) (1,0) (2,0)
(0,1) (1,1) (2,1)
(0,2) (1,2) (2,2)
Rules:
- Regions in the same realm must form a connected grid (no isolated regions)
- Adjacent means sharing an edge, not diagonal
- Check existing regions in
tabs/regions.json before assigning coordinates
Design guidance:
- Place related regions adjacent to each other
- Consider travel routes when positioning
- North is -y, South is +y, East is +x, West is -x
- Regions at same coordinates in different realms can represent parallel locations
Region Scope
Regions are large geographic areas containing multiple locations. Think:
- A forest, not a single grove
- A mountain range, not a single peak
- A coastal stretch, not a single beach
- A district or quarter, not a single building
Each region typically contains various locations.
Schema
interface Region {
name: string
basicInfo: string
x: number
y: number
realm?: string
known?: boolean
hiddenInfo?: string
factions?: string[]
npcLevelRange?: { min: number; max: number }
images?: { map?: SceneImage }
}
interface SceneImage {
crop: { focus: { x: number; y: number }; zoom: number }
imageUrl?: string
}
Reference
For detailed documentation, see regions-reference.md.
1---2name: regions3description: Schema and rules for creating regions4---56# Regions78Edit `tabs/regions.json`.910## Required Fields1112| Field | Requirement |13|-------|-------------|14| `name` | Must match object key exactly |15| `basicInfo` | One paragraph describing geography, climate, and atmosphere |16| `x` | Integer grid coordinate - must be adjacent to other regions in the same realm |17| `y` | Integer grid coordinate - must be adjacent to other regions in the same realm |18| `realm` | Which realm this region belongs to |19| `images.map` | The region's map image: `{ crop: { focus: { x, y }, zoom }, imageUrl }`. `crop` (focus x/y and zoom) is required whenever the image object is present; `imageUrl` is optional. Focus x/y run 0..100 (50 = centered), zoom 100..300 (100 = no zoom); out-of-range values are clamped. When `imageUrl` is absent, the engine generates a map during play and saves it back; an existing map is never regenerated |2021## Conditional Fields2223| Field | When to Include |24|-------|-----------------|25| `known` | Set to `false` to hide from map at game start. Omit or set `true` for visible by default |26| `factions` | Only when region has dominant faction presence affecting the entire area |27| `npcLevelRange` | `{ min, max }` band for NPCs generated anywhere in this region whose level you don't set explicitly. A location's own band overrides it. Use it to set a baseline difficulty for the whole region |2829## Never Include3031| Field | Reason |32|-------|--------|33| `hiddenInfo` | Unused field — region secrets belong in location or NPC entries instead |3435## basicInfo Format3637One paragraph covering three aspects:38391. **Geography** - Terrain, landmarks, natural features402. **Climate/Atmosphere** - Weather patterns, sensory details, mood413. **Inhabitant hints** - Who or what lives here, without full faction details4243Format: "[Terrain description]. [Climate and atmospheric details]. [Brief mention of inhabitants or dangers]."4445## Coordinate System4647Regions use integer grid coordinates. **Within a realm, regions must be adjacent** (differ by 1 in x or y, not diagonal).4849```50(0,0) (1,0) (2,0)51(0,1) (1,1) (2,1)52(0,2) (1,2) (2,2)53```5455**Rules:**56- Regions in the same realm must form a connected grid (no isolated regions)57- Adjacent means sharing an edge, not diagonal58- Check existing regions in `tabs/regions.json` before assigning coordinates5960**Design guidance:**61- Place related regions adjacent to each other62- Consider travel routes when positioning63- North is -y, South is +y, East is +x, West is -x64- Regions at same coordinates in different realms can represent parallel locations6566## Region Scope6768Regions are large geographic areas containing multiple locations. Think:69- A forest, not a single grove70- A mountain range, not a single peak71- A coastal stretch, not a single beach72- A district or quarter, not a single building7374Each region typically contains various locations.7576## Schema7778```typescript79interface Region {80 name: string81 basicInfo: string82 x: number83 y: number84 realm?: string85 known?: boolean86 hiddenInfo?: string87 factions?: string[]88 npcLevelRange?: { min: number; max: number }89 images?: { map?: SceneImage }90}9192interface SceneImage {93 crop: { focus: { x: number; y: number }; zoom: number }94 imageUrl?: string95}96```9798## Reference99100For detailed documentation, see [regions-reference.md](references/regions-reference.md).