Maps, Hexes & Tactical Boards
Elthoria separates overland hex exploration, tactical battle grids, ANTLR map DSLs, and revision-checked persisted boards into explicit, auditable tools so map state never drifts between GM narration and what the players see.
TIP
Looking for the TTRPGMap.g4 and HexMap.g4 grammar sections, cell symbol legends, and how ANTLR maps embed into WorldSimState? Read ANTLR Map DSLs & World Simulator Data Format.
Procedural hex worlds & locations (HexMcpTools, EncounterGenerationMcpTools)
Hex campaign maps
| Tool | Purpose |
|---|---|
generate_world_map | Procedurally generate a full hex campaign map (terrain, hydrology, settlements, factions, roads, POIs, dungeons, encounter tables) via HexWorldGeneratorService and persist it |
list_hex_campaign_maps / get_hex_campaign_map / search_hex_campaign_maps | Browse, load, or search saved hex campaign maps |
save_hex_campaign_map / delete_hex_campaign_map | Persist or remove a hex campaign map |
update_hex_terrain | Change a hex's single-character terrain code (P plains, F forest, M mountain, etc.) without touching tactical grids |
update_hex_location_data | Update a hex's inline metadata (name, description, POI type, danger level, NPCs, services, faction control, quests, rumors, explored flag) |
parse_hex_map_text / generate_hex_map_text / get_hex_map_antlr_text | Round-trip between structured hex map JSON and the HexMap.g4 ANTLR DSL (elthoria-map-dsl) |
Hex locations & linking tactical encounters
| Tool | Purpose |
|---|---|
create_hex_location / update_hex_location / delete_hex_location | Author individual hex locations with coordinates, terrain, and metadata |
list_hex_locations / get_hex_location / get_hex_location_by_coords / search_hex_locations | Query hex locations by act, terrain, exploration status, ID, or (x, y) coordinates |
generate_encounter_for_hex | Generate 3 tactical grid proposals tailored to a hex's terrain and danger level |
link_grid_to_hex | Bind an existing saved tactical grid to a campaign hex so entering that hex loads the linked battle map |
Tactical battle grids & map DSL (GridMcpTools, MapMcpTools)
| Tool | Purpose |
|---|---|
generate_grid / generate_procedural_layout | Generate a tactical battle grid or procedural dungeon layout (rooms, passages, traps, loot, flow analysis) with full ASCII preview |
save_grid / load_grid / list_saved_grids | Persist, load, or list saved tactical grids with their current board revisions |
get_grid_info / get_grid_ascii / get_grid_antlr_text / get_grid_text | Inspect grid dimensions, ASCII visualization, and structured TTRPGMap.g4 ANTLR DSL |
parse_antlr_grid / generate_ttrpg_map | Parse ANTLR grid DSL text into a live grid or emit full TTRPG map text (including encounters/statblocks) |
get_grid_cell / update_grid_cell / update_grid_cells_batch | Inspect or edit individual cells or rectangular regions in one call |
add_entity_to_grid / move_entity_on_grid / remove_entity_from_grid / list_grid_entities | Place, reposition, remove, or enumerate tokens/entities on a tactical grid |
list_saved_maps / get_saved_map / search_maps_by_title / search_maps_by_author / search_maps_by_campaign / delete_saved_map / get_map_antlr_content | Manage general saved map configurations |
Persisted revision-checked boards (HexBoardMcpTools, TacticalBoardMcpTools)
Persisted boards enforce optimistic concurrency (expected_revision) and idempotency (command_id), preventing stale overwrites when a GM or UI updates the same board.
Hex board (HexBoardMcpTools)
| Tool | Purpose |
|---|---|
get_hex_board | Read a player-safe persisted campaign hex board by explicit map_id and campaign_id |
apply_hex_board_command | Apply a revision-checked GM terrain edit (requires map_id, campaign_id, expected_revision, command_id). GM editing only — not rules-validated travel. |
Tactical board (TacticalBoardMcpTools)
| Tool | Purpose |
|---|---|
get_tactical_board | Read a persisted trusted-local GM tactical board by saved_grid_id and campaign_id (audience: GM, playerSafe: false) |
apply_tactical_board_command | Activate a GM board, reposition a subject (editor move), or configure explicit square perception/movement profiles (configure-movement with square-single-cell-ground.v1 or .v2, feetPerCell: 5, traversableCells, and explicit difficultCells in v2 where entering difficult terrain costs 10 ft orthogonal / 15 ft diagonal) |
show_tactical_board | Read-only inline display request for an already-activated persisted GM tactical board (not player-safe; never mutates, activates, or moves pieces) |
WARNING
Critical board invariants
- Never leak GM snapshots to players. Any payload with
audience: GMorplayerSafe: falsemust stay strictly in GM views. - A view intent is not canon. Calling
show_tactical_boardnever saves or moves anything. Always verify mutation success withget_tactical_board/get_hex_boardandget_play_dashboard. - Never silently rebase conflicts. If a command fails with a revision conflict, re-read the current board and confirm the intended edit before issuing a new command. For uncertain network retries of the exact same operation, keep the identical request body, original
expected_revision, and originalcommand_id. - Board editing ≠ legal combat movement. Use
execute_combat_command(adjudicate_npc_move/adjudicate_pc_move) for rules-validated combat movement;apply_tactical_board_commandmoves are GM setup/editing.
Same-runtime local UI attachment (PlayConnectionMcpTools)
| Tool | Purpose |
|---|---|
get_play_connection | Read local same-runtime UI attachment metadata (status, apiBaseUrl, runtimeId). Takes no arguments, starts no UI, and mutates nothing. |
When status is READY and apiBaseUrl is non-null, a local GM UI can attach to that exact running Elthoria process (avoiding a second H2 database owner or a second Kompile backend). Remember that a private stdio child's URL expires when the stdio process exits, and runtimeId is correlation metadata — not authentication.
Zero-Angular browser board views (frontend/)
elthoria-harness ships framework-neutral DOM renderers and managed web play apps under frontend/ so you can inspect and GM-edit persisted boards without Angular:
elthoria-play-panels(frontend/apps/elthoria-play-panels) — the managed iframe UI staged intoelthoria web(-Delthoria.web), supporting:- Tactical Board (
<elthoria-tactical-board-view>from@elthoria/tactical-grid-view): read-only by default, with explicit GM opt-in for revision-bound entity move proposals and a strictly read-only#inline-boardfragment view. - Hex Board tab (
<elthoria-hex-board>from@elthoria/hex-board-view): displays the confirmed persisted campaign hex map whenscope.mapIdis attached, with explicit GM opt-in for revision-checked terrain edits. - World Inspection: read-only narrative candidates and decision workbench views powered by
@elthoria/world-simulation-apiand@elthoria/world-simulation-http.
- Tactical Board (
hex-board-host(frontend/apps/hex-board-host) — standalone local browser host for connecting directly to a trusted local Elthoria server (http://127.0.0.1:8083) to inspect, poll, and GM-edit a persisted campaign hex map.
See Walkthrough 4: Hex Crawls, Dungeons & Persisted Boards for a complete map-to-board play sequence, and Installation, Builds & Spin Packaging for staging the web panels into elthoria web.