Mod «SentientSands» for Kenshi
This mod overhauls the dialogue system by connecting the game to a Large Language Model. It enables real-time, context-aware interactions for every NPC. Players can type directly to characters, who respond based on their identity, faction, health, and current world events. NPCs also converse with each other without player input.
Core Features:
- Meaningful Interactions: Talk to anyone about anything. Conversations are generated in real time using game lore, NPC data, and world state. The AI can act on dialogue by recruiting, attacking, trading, changing political relations, or imprisoning the player.
- Voice Modes:
- Talk: Normal volume. Nearby characters overhear and update their memory.
- Whisper: Private one-on-one conversation.
- Yell: Addresses a crowd. Multiple NPCs may respond individually.
- Persistent Memory: The first time you speak to an NPC, the server generates a unique name, backstory, and personality saved to your campaign folder. NPCs remember past interactions if you meet them again.
- Dynamic Naming: Generic NPCs like Dust Bandits or Shop Guards receive unique, lore-appropriate names from a pool of over 5,000 options.
- Sensory Awareness: NPCs observe the health, hunger, and equipment of nearby characters and react accordingly.
- Ambient Banter: Nearby NPCs hold conversations about hunger, fights, biome, weather, or passing squads when the player is not talking.
- World Rumors: The mod tracks major events such as battles, raids, and town conquests. These become rumors that spread among NPCs.
- Multiple Campaigns: Run separate AI campaigns with isolated memories, history, and rumor logs. Switch between them via the in-game hub.
- Verbal Bartering and Recruitment: Negotiate trades or convince NPCs to join your squad through dialogue. Major faction members require high reputation or compelling arguments to join.
In-Game Hub (F8 Menu): Press F8 to access the hub. You can change AI providers or models, browse the full dialogue library, read live world rumors, manage campaigns, and configure settings.
Technical Details: The mod uses a C++ plugin to communicate with a background Python server. The server launches automatically when the game starts and shuts down when the game closes. It comes pre-configured for the Player2 AI backend but supports any OpenAI-compatible provider. Configuration is handled via JSON files in the mod's server folder.
Installation Requirements: This mod requires RE_Kenshi and KenshiLib. You must launch the game using RE_Kenshi.exe for the mod and AI server to function correctly. Standard launchers will not work. Configure your API keys and models in the server config folder before playing.
- Comments


