Docs · Engineering reference
Map emulator
docs/features/map-emulator.mdEdit on GitHub
tools\cli map render — tools/commands/map.mjs, tools/map/
- ✅ Draws the Everon map a given player would see to a PNG in about 0.3 s once the base layer is cached, with no
game boot and no Workbench:
map render [--place saint-philippe|square|island|<catalog place>|--bbox x0,z0,x1,z1] [--zoom N] [--as new|known|police|org:<id>] [--night] [--size WxH] [--html] [--out f] [--fallback]. View width is 12800 m / 2^zoom, the same--place,--bboxand--zoomthe in-gamemap-shotsproof (M0b) takes. - ✅ Base layer: the terrain colour (
worlds/Eden/Eden/.Data/Eden_<n>_supertexture.edds, BC7, 2500 tiles) and heights (Eden_<n>.ttile) read once from the game paks bymap extract(about 4 s, run automatically on first render) into~/.life-framework/map-cache/everon-<build>/, never committed. Contours (20/50/100 m by scale), coast and hillshade come from the heights. Heights:raw * 1000/65535 - 100m, sea level at raw 6500 (derived from the sea colour, not documented by the game). - ✅ Fallback layer (no cache, or
--fallback): a 100 m / 500 m / 1 km grid, a schematic road net (a minimum spanning tree between the named places, not real roads) and the 6,514 catalog buildings. No contours: the heights live only in the cache. - ✅ Overlays read the game's confs:
LF_MapPoiKindrows inConfigs/Map/LF_MapPois*.confandLF_MapAreaRowrows inConfigs/Map/LF_MapAreas*.confof the core and the pack (same Id: the pack row replaces;m_sOp "remove"drops).tools/map/render/fixtures/map-overlay.fixture.confis the stand-in for--fixtureonly. Places and buildings come fromdocs/everon/catalog-buildings.json. - ✅
--aspersonas use a built-in reading of D-M3 to D-M6 (personaVisibility); atools/map/rules/visibility.mjsexportingvisible(poi, persona)replaces it. - ✅
--htmlwrites the PNG with hover tooltips on POIs and areas and a live world coordinate. - ✅ Rule loader:
tools/map/rules/index.mjsimports whichever ofvisibility,cluster,areas,discoveryexist and defines the case table (addons/LifeFramework/Configs/Map/Rules/<rule>.cases.json:{ rule, version, cases: [{ name, input, expect }] }) that a node selftest and an Enforce LOGIC test both run. - ⚠️ No Enforce twin or case table ships here: each belongs to the card that writes the rule (M2, M4, M5, M13).
- Proof:
node tools/map/map-render.selftest.mjs.
Map icon set — tools/map/icons/, tools/map/lib/icons.mjs (card M3, #2231)
- ✅ The icon manifest (
tools/map/lib/icons.mjs) names every quad of the twoLF_MapIconsimagesets: 8 category fallbackscat_<category>, 20 pack pictogramspoi_<Kind>(bank coin, police star, clinic cross in a square, fuel pump, handset, crossed hammer and pick, fish, flag, ...), 5 pencil marks, 4 shared pins (police blue, org, taxi yellow, waypoint) and 4 stamps (town cluster, no-police, restricted, you). A POI row's icon is itsm_sIcon, elsepoi_<Kind>in the pack imageset, elsecat_<category>. - ✅
node tools/map/icons/build-icons.mjsdraws them (ink palette, 1-2 px stamped edge, red plate a pixel off) and writes the.tifsources,.edds.meta,.imagesetand.imageset.metafor the core placeholders (LifeFramework/UI/Imagesets/LF_MapIcons, neutral dark grey), the 1989 set (LF_Everon1989/UI/Imagesets/LF_MapIcons_Everon1989) and the hatch tiles (core white-inkUI/Textures/Map/LF_MapHatch_*, pack inkedLF_MapIcons_Everon1989_Hatch{Lawless,Gated}). It is deterministic, and writes a contact sheet totmp/map/icons-<side>.png. - ✅
validate-ui-kitchecks the set once an imageset is committed: every quad of the manifest, every quad a POI conf row names (coreLF_MapPois.confand a packLF_MapPois*.confoverlay), the quads inside the texture, the texture and hatch files with matching GUIDs. Proof:node tools/validation/map-icons-selftest.mjs. - ✅
tools\cli ui-image --batch <list.txt>rebuilds a list of.tiffiles into.eddsin one Workbench boot (tools/map/icons/icons-batch.txtis the icon set's list); it boots again for any texture still missing (see Rebuilding). - ✅ The textures are built and committed with their imagesets (7
.edds: one core atlas, 3 core hatches, one pack atlas, 2 pack hatches).validate-ui-kitnow checks the committed set. - ⚠️ The hatch tiles use
TextureUI.conf; check they tile unblurred inPolygonDrawCommandwhen M6 draws them. The emulator (map render) still draws 5x7 glyphs, not these icons. - Rebuilding:
node tools/map/icons/build-icons.mjs, then on a Workbench boxtools\cli ui-image --batch tools/map/icons/icons-batch.txt. A headless boot builds only the first texture without an.edds, so--batchboots again for the rest (7 textures took 5 boots, 81 s on lf-testbox). From ssh the box has no desktop session: run it throughtools/remote/desktop/run-interactive.ps1(the box's signed-in session), or Workbench dies at "Couldn't build device list".