RimMind - Memory
A three-layer memory system that grants AI time perception with vivid recollections of past events. It automatically collects in-game events to generate memory entries, condenses them into long-term impressions via AI, and provides contextual support for all other RimMind mods.
What Is RimMind
RimMind is an AI-powered RimWorld mod suite. Integrated with Large Language Models (LLM), it gives colonists personalities, memories, dialogues and autonomous decision-making capabilities.
Sub-mod List & Dependency Relationships
[b>Mod</b></td><td><b>Responsibility</b></td><td><b>Dependencies</b></td><td><b>GitHub</b></td></tr><tr><td>RimMind-Core</td><td>API client, request scheduling, context packaging</td><td>Harmony</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Core</url>Link</td></tr><tr><td>RimMind-Actions</td><td>AI pawn action execution library</td><td>Core</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Actions</url>Link</td></tr><tr><td>RimMind-Advisor</td><td>AI generates work decisions for pawns</td><td>Core, Actions</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Advisor</url>Link</td></tr><tr><td>RimMind-Dialogue</td><td>AI-driven dialogue system</td><td>Core</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Dialogue</url>Link</td></tr><tr><td><b>RimMind-Memory</b></td><td>Memory collection and context injection</td><td>Core</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Memory</url>Link</td></tr><tr><td>RimMind-Personality</td><td>AI-generated personalities and thoughts</td><td>Core</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Personality</url>Link</td></tr><tr><td>RimMind-Storyteller</td><td>AI storyteller for intelligent event selection</td><td>Core</td><td><url>https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-Storyteller</url>Link</td></tr></table>
Core ── Actions ── Advisor
├── Dialogue
├── Memory
├── Personality
└── Storyteller
Core Features
<b>Active Memory</b> - Detailed records of recent important events, fully preserved and readily accessible for AI queries.
<b>Archive Memory</b> - Older events with streamlined details and retained core information, balancing data volume and token consumption.
<b>Deep Memory</b> - Permanent key impressions generated daily by AI. They accumulate over time and never expire. Quantity is controlled by darkCount settings, protected by both code and prompt rules.
<b>Work Session Aggregation</b> - Merges continuous identical tasks (e.g. 3 hours of mining) into single memory entries to avoid information overload. Minimum aggregation count and idle interval thresholds are fully configurable.
<b>Importance Decay</b> - Simulates natural human memory: trivial daily matters fade gradually per in-game day, while major events remain preserved long-term.
<b>Context Injection</b> - Memories are automatically inserted into AI prompts, allowing all RimMind modules to reference pawn history. Injection ratios for pawns and storyteller can be adjusted independently.
Recorded Event Types
- Work sessions (hauling, construction, farming and continuous tasks)
- Kill records (who killed which target)
- Relationship changes (romance, breakup, rivalry)
- Skill upgrade milestones
- Health incidents (injuries, illnesses)
- Mental breakdown events
- Colony-wide events (raids, caravans)
- Custom manual memory entries
Core Functions
<b>Three-Layer Memory Storage</b>
Every pawn and storyteller maintains three separate memory tiers:
- <b>Active Memory</b>: Recent events sorted chronologically with fixed capacity limits
- <b>Archive Memory</b>: Sorted by importance, low-priority entries are discarded when full
- <b>Long-Term Impression (Deep Memory)</b>: Daily AI-generated summaries under 50 words, permanently saved
<b>Automatic Memory Collection</b>
Monitors a wide range of in-game events:
[tr><td><b>Event Type</b></td><td><b>Importance Score</b></td><td><b>Description</b></td></tr><tr><td>Work Sessions</td><td>0.4~0.5</td><td>Continuous tasks merged into single entries</td></tr><tr><td>Critical Tasks</td><td>0.5~0.9</td><td>Rescues, combat actions recorded individually</td></tr><tr><td>Injury & Sickness</td><td>0.5~0.9</td><td>Fatal injuries reach maximum 0.9</td></tr><tr><td>Mental Breaks</td><td>0.7~0.95</td><td>Frenzied episodes up to 0.95</td></tr><tr><td>Death of Loved Ones</td><td>0.85~1.0</td><td>Close relatives reach full 1.0</td></tr><tr><td>Skill Progression</td><td>0.5~0.7</td><td>Higher-level skills carry greater weight</td></tr><tr><td>Relationship Formation</td><td>0.6~0.95</td><td>Spouses/lovers up to 0.95</td></tr><tr><td>Storyteller Events</td><td>0.3~1.0</td><td>Raids = 0.9, Weddings = 0.85</td></tr></table>
Pawn memories with importance ≥ 0.8 automatically sync to storyteller memory.
<b>Work Session Merging</b>
Combines consecutive identical jobs into one memory, such as "Hauled 12 items over 4.8 in-game hours", preventing cluttered fragmented task logs.
<b>Deep Memory Generation</b>
AI condenses daily memories into permanent long-term impressions every in-game day. Deep memories are read-only, used for AI to understand long-term character traits and status changes.
<b>Automatic Context Injection</b>
Via RimMind-Core Provider system, memories are inserted into AI prompts to provide historical background for all sub-modules.
Frequently Asked Questions
<b>Q: Do memories consume large numbers of tokens?</b>
A: Injection ratios are adjustable. By default only 50% of active & archived memories are used, with a fixed limit on deep memories (3 entries). You can tweak settings to match API usage costs.
<b>Q: Are memories saved with game saves?</b>
A: Yes. All memory data is serialized via WorldComponent and fully restored when loading saves.
<b>Q: Can I add manual memories?</b>
A: Yes. Custom memory entries can be created directly in the memory log interface.
<b>Q: Can I edit deep memories?</b>
A: Deep memories are AI-generated and read-only. You can pin active memories to prevent them from being discarded.
<b>Q: How well does it work with other RimMind modules?</b>
A: Memory provides historical context for all AI judgments. Combined with Personality, Advisor and Dialogue, AI decisions become far more logical and consistent.