u/PlasticOk9676

▲ 27 r/Kenshi

VSEM PRIVET! [WIP] Kenshi Minimap Mod – progress update and a technical roadblock.

Hey everyone!

I've been working on a minimap mod for Kenshi – a small movable window that shows a real-time map of the surrounding area with player position, squad members, NPCs, towns, and ruins.

Current features:

- ✅ Real-time minimap with zoom and pan

- ✅ Player arrow with correct rotation

- ✅ Squad member dots (blue)

- ✅ NPC dots with filters (Enemies, Neutrals, Allies, Corpses)

- ✅ Danger rings for characters in combat

- ✅ Bounty indicators (gold rings + text)

- ✅ Town/city markers with relationship colors

- ✅ Town borders (when zoomed in)

- ✅ Custom markers (place, rename, delete)

- ✅ Save/load window position and settings

- ✅ Auto-center option

What's working well: The minimap displays everything that is currently loaded in memory – your squad, nearby NPCs, visited towns, etc.

The problem I'm stuck on:

Ancient ruins (Tech Labs, Spider Factory, Lost Libraries, etc.) do not appear on the minimap until you physically walk up to them and activate the zone.

In Kenshi, ruins exist in the game world but their `TownBase` objects are*not created in memory** until you get within ~4000-8000 units. This means:

- The vanilla map somehow knows about discovered ruins (via map purchases or exploration)

- But KenshiLib (the modding library) does not expose inactive ruins

- I cannot access their coordinates or `discovered` status until after you visit them

What I've tried:

- Scanning all `GameData` of type `TOWN` – no coordinates found

- Accessing `FactionManager::getAllFactions()` to find "Ancient Ruins" faction – not working in current KenshiLib

- Saving visited ruin coordinates to a file (works but requires discovery first)

Current workaround (a temporary solution):

The mod saves every ruin you visit to a local file. Next time you launch the game, those ruins appear on the map (in gray until visited). It works, but you still have to discover each ruin once.

What I need from KenshiLib:

- Access to inactive/unloaded `TownBase` objects (or at least their coordinates and `discovered` flag)

- A way to get all towns belonging to "Ancient Ruins" faction

- Global list of all towns (like `ou->towns`)

I've reached out to BFrizzleFoShizzle (KenshiLib author) about this. Hopefully future versions will expose this data.

If you're a modder or reverse engineer – any tips on accessing ruin data before activation would be hugely appreciated!

Thanks for reading! More updates soon.

u/PlasticOk9676 — 28 days ago
▲ 231 r/Kenshi

Kenshi 1.0.65 minimap plugin

What works (100% stable):

  • Camera position (X/Z) and angle
  • Player arrow (48 frames, 7.5° per frame)
  • GUI_Map.dds with world bounds ±295000
  • Zoom (-/+), pan (LMB), auto-center toggle
  • F11 show/hide, F12 center on player

What is missing:

  • Squad member dots on the minimap
  • Town markers

The problem:
I can't locate the playerCharacters array in memory. Offsets from KenshiLib don't match 1.0.65. GameWorld pointer is fine (kenshi_x64.exe+0x214A928), but PlayerInterface at +0x580 returns garbage.

u/PlasticOk9676 — 2 months ago