// Management · RimWorld Mod

RimMind - Core

RimMind - Core mod preview for RimWorld

Acknowledgements & References Special thanks to the following mods for providing valuable references and technical inspiration during development: RimTalk - Dialogue system reference RimTalk-ExpandActions - Action extension reference RimTalk-ExpandMemory - Memory expansion refere

Acknowledgements & References

Special thanks to the following mods for providing valuable references and technical inspiration during development: RimTalk - Dialogue system reference RimTalk-ExpandActions - Action extension reference RimTalk-ExpandMemory - Memory expansion reference RimChat - Dialogue system reference NewRatkin - Race mod architecture reference VanillaExpandedFramework - Framework design reference

RimMind - Core

The core infrastructure of the RimMind suite. It provides LLM client, asynchronous request queue and game context builder, serving as the mandatory prerequisite dependency for all RimMind sub-modules.

What Is RimMind

RimMind is an AI-powered RimWorld mod suite. Integrated with Large Language Models (LLM), it endows colonists with unique personalities, memories, dialogues and autonomous decision-making capabilities.

Sub-mod List & Dependency Relationships

[td>ModResponsibilityDependenciesGitHubRimMind-CoreAPI client, request scheduling, context packagingHarmonyhttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-CoreLinkRimMind-ActionsAI pawn action execution libraryCorehttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-ActionsLinkRimMind-AdvisorAI generates work decisions for pawnsCore, Actionshttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-AdvisorLinkRimMind-DialogueAI-driven dialogue systemCorehttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-DialogueLinkRimMind-MemoryMemory collection and context injectionCorehttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-MemoryLinkRimMind-PersonalityAI-generated personalities and inner thoughtsCorehttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-PersonalityLinkRimMind-StorytellerAI storyteller for intelligent event selectionCorehttps://github.com/RimWorld-RimMind-Mod/RimWorld-RimMind-Mod-StorytellerLink Core ── Actions ── Advisor ├── Dialogue ├── Memory ├── Personality └── Storyteller

Core Features

Intelligent Context Construction - Automatically collects game status data: pawn mood, health, skills, equipment, colony wealth, threat level, seasons and weather, providing complete information for AI decision-making. Asynchronous Request Queue - Efficiently manages LLM requests without blocking the main game thread, supporting request priority, cooldown control, automatic retries, pause and cancellation. Modular API Architecture - All RimMind components call APIs through unified interfaces, independent of underlying implementation logic. Multi-Provider Support - Compatible with OpenAI Chat Completion format APIs including OpenAI, DeepSeek and Ollama, as well as Player2 services (local application + remote API). Context Filter - Over 28 configurable options to precisely control prompt content and reduce token usage. SkipCheck Mutual Exclusion Mechanism - Sub-modules can register skip rules for dialogues, floating menus, actions and story events, achieving cross-mod mutual exclusion control. Debug Toolkit - Built-in AI request log window to view full input and output of each AI call in real time for troubleshooting.

Technical Highlights

  • Compatible with multiple AI services: OpenAI, DeepSeek, Ollama, Player2
  • Configurable context filters with Minimal / Standard / Full three presets
  • Native JSON mode support to ensure structured AI responses
  • Request status floating window for real-time AI task monitoring
  • Automatic retry for transient errors: timeout, 429, 502, 503
  • Serial processing for local models to avoid resource contention
  • Prompt token budget management with automatic compression and truncation

Supported API Endpoints

[td>ServiceEndpointDescriptionOpenAIhttps://api.openai.com/v1Models such as GPT-4o-miniDeepSeekhttps://api.deepseek.com/v1Models such as deepseek-chatOllama (Local)http://localhost:11434/v1Self-hosted local language modelsPlayer2Auto-detected / Manually configuredPlayer2 local client or remote APIOthersCustom Base URLAny OpenAI-compatible API interface

Core Functions

LLM Client Fully compatible with all OpenAI Chat Completions format APIs: OpenAI, DeepSeek, local Ollama. Also supports Player2 services with automatic local app detection and remote API access. Forced JSON mode (response_format: json_object) is available and can be disabled for local models. Asynchronous Request Queue All AI requests run on background threads and never block the main game thread. Each request has independent cooldown, and expired requests are discarded automatically. Supports automatic retry for transient errors. Local model requests are processed serially to prevent resource conflicts. Context Generation Automatically collects game status and packages text data for all modules:
  • World Context: Time, pawn list, food supply, threats, seasons, weather
  • Pawn Context: Age, backstory, mood, health, skills, gear, job assignments, relationships
Context Filtering Precisely control which game information is inserted into prompts via context filter settings to save tokens. Three presets (Minimal / Standard / Full) are provided, plus over 28 customizable toggle options. Debug Tools
  • AI Debug Log: Floating panel showing full Prompt and Response of every AI interaction
  • Request Floating Window: Real-time AI request status displayed at bottom-right corner
  • Developer Menu: Test connections, view context data, reset cooldowns, pause/resume request queues

Frequently Asked Questions

Q: Which large language models are supported? A: Any model compliant with OpenAI Chat Completions API standard, including OpenAI GPT series, DeepSeek, local Ollama models. Player2 local and remote services are also fully supported. Q: Will it affect game frame rate? A: No. All AI requests run in background threads, and only callback results are processed by the main thread. Q: Is my API Key secure? A: API Keys are stored locally in RimWorld configuration files. Data is only sent to your configured API endpoint, and never uploaded to official RimMind servers. Q: What happens if no API Key is filled in? A: Core will not throw errors itself, but all AI-dependent features of other sub-modules will be unavailable. Q: What models are recommended? A: gpt-4o-mini and deepseek-chat are highly recommended for excellent cost performance and fast response speed. Local Ollama users can use models such as qwen2.5:7b.