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
Responsibility | Dependencies | GitHub | | RimMind-Core | API client, request scheduling, context packaging | Harmony | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-CoreLink |
| RimMind-Actions | AI pawn action execution library | Core | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-ActionsLink |
| RimMind-Advisor | AI generates work decisions for pawns | Core, Actions | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-AdvisorLink |
| RimMind-Dialogue | AI-driven dialogue system | Core | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-DialogueLink |
| RimMind-Memory | Memory collection and context injection | Core | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-MemoryLink |
| RimMind-Personality | AI-generated personalities and thoughts | Core | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-PersonalityLink |
| RimMind-Storyteller | AI storyteller for intelligent event selection | Core | https://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-StorytellerLink |
Core ── Actions ── Advisor
├── Dialogue
├── Memory
├── Personality
└── Storyteller
Core Features
Active Memory - Detailed records of recent important events, fully preserved and readily accessible for AI queries.
Archive Memory - Older events with streamlined details and retained core information, balancing data volume and token consumption.
Deep Memory - 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.
Work Session Aggregation - 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.
Importance Decay - Simulates natural human memory: trivial daily matters fade gradually per in-game day, while major events remain preserved long-term.
Context Injection - 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
Three-Layer Memory Storage
Every pawn and storyteller maintains three separate memory tiers:
- Active Memory: Recent events sorted chronologically with fixed capacity limits
- Archive Memory: Sorted by importance, low-priority entries are discarded when full
- Long-Term Impression (Deep Memory): Daily AI-generated summaries under 50 words, permanently saved
Automatic Memory Collection
Monitors a wide range of in-game events:
[tr>
Event Type | Importance Score | Description | | Work Sessions | 0.4~0.5 | Continuous tasks merged into single entries |
| Critical Tasks | 0.5~0.9 | Rescues, combat actions recorded individually |
| Injury & Sickness | 0.5~0.9 | Fatal injuries reach maximum 0.9 |
| Mental Breaks | 0.7~0.95 | Frenzied episodes up to 0.95 |
| Death of Loved Ones | 0.85~1.0 | Close relatives reach full 1.0 |
| Skill Progression | 0.5~0.7 | Higher-level skills carry greater weight |
| Relationship Formation | 0.6~0.95 | Spouses/lovers up to 0.95 |
| Storyteller Events | 0.3~1.0 | Raids = 0.9, Weddings = 0.85 |
Pawn memories with importance ≥ 0.8 automatically sync to storyteller memory.
Work Session Merging
Combines consecutive identical jobs into one memory, such as "Hauled 12 items over 4.8 in-game hours", preventing cluttered fragmented task logs.
Deep Memory Generation
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.
Automatic Context Injection
Via RimMind-Core Provider system, memories are inserted into AI prompts to provide historical background for all sub-modules.
Frequently Asked Questions
Q: Do memories consume large numbers of tokens?
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.
Q: Are memories saved with game saves?
A: Yes. All memory data is serialized via WorldComponent and fully restored when loading saves.
Q: Can I add manual memories?
A: Yes. Custom memory entries can be created directly in the memory log interface.
Q: Can I edit deep memories?
A: Deep memories are AI-generated and read-only. You can pin active memories to prevent them from being discarded.
Q: How well does it work with other RimMind modules?
A: Memory provides historical context for all AI judgments. Combined with Personality, Advisor and Dialogue, AI decisions become far more logical and consistent.