RimMT - 边缘多核优化
Note: This mod was written by me using AI as a multithreaded mod.
Note: This mod was written by me using AI as a multithreaded mod. Please use AI-written mods as appropriate, and they have not been professionally tested
RimMT — Enable RimWorld to leverage multi-core CPUs, significantly enhancing TPS for large-scale colonies.
═══════════════════════════════════════
Core Features
═══════════════════════════════════════
【Parallel Pawn Tick — Multi-Core Execution】
Distribute 23 Pawn subsystems across multiple CPU cores for concurrent execution.
The multi-core advantage becomes more pronounced as colony population grows beyond 50.
Executed Every Frame (10 subsystems):
Weapon cooldown · Rope traction · Flight state · Native verbs · Combat stance
Vital signs · Equipment updates · Ability cooldowns · Backpack items · Gene system
Executed Intermittently (13 subsystems):
Health updates · Mental states · Lifting status · Need changes · Clothing wear
Call tracking · Skill experience · Recruitment control · Belief updates · Gene intervals
Age progression · Statistics · Crime records
※ Work AI decisions remain serial — Involves non-thread-safe List access via ReservationManager
※ Pathfinding remains serial — Game engine already includes built-in multithreading
【Aggressive Optimization — 6 Independent Features】
Attack Target Caching — Cache combat target search results to avoid redundant searches per frame
Off-Screen Particle Throttling — Reduce execution frequency of particle effects on non-active maps
Cluster AI Throttling — Skip Tick for idle clusters to minimize unnecessary computations
Temperature Heat Transfer Throttling — Reduce refresh frequency of temperature overlay; maintain original frequency for thermal equilibrium
Wind Calculation Throttling — Skip wind calculations for non-active maps; saves ~0.02ms per map
Particle Count Limit — Restrict the number of new particle effects spawned per frame per map
═══════════════════════════════════════
Safety Guarantees
═══════════════════════════════════════
· Global Switch Disabled → All subsystems automatically revert to serial execution, behaving identically to vanilla
· Individual Pawn Anomalies → Do not affect other Pawns; automatically isolated
· Game Version Updates → Transpiler automatically detects compatibility; safely degrades when incompatible
· Serial Work AI Decisions → ReservationManager executes on main thread via original path
· Random Number Isolation → Each thread maintains independent random number generators, preserving game randomness
· Small Colony Protection → Parallel execution does not activate when Pawn count is below threshold
· Unity API Safety → FilthMaker/Effecter/Fleck operations in parallel threads automatically redirect to main thread
· Attack Target Caching → Automatically bypasses cache during forced attacks, ensuring uninterrupted responsiveness
═══════════════════════════════════════
Settings Interface
═══════════════════════════════════════
All settings take effect immediately without requiring a game restart.
I. Global Switch — One-click enable/disable of multithreaded optimizations
II. Parallelization Parameters — Worker thread count, minimum Pawn threshold, batch size per Tick
III. 23 Subsystem Switches — Individually disable to troubleshoot compatibility issues
IV. Aggressive Mode — 6 independent features + one-click toggle for all
V. Debug — Debug logs + reset to default settings
═══════════════════════════════════════
Compatibility
═══════════════════════════════════════
✔ Full Compatibility:
RimWorld Performance Engine — Automatically detected; cache modules on worker threads automatically skip to ensure thread safety
Performance Esmofast · BuildingTickOptimizer · HealthTabOptimizer
Ideo Tick Optimization · Better GC · Performance Optimizer
Loading Progress · Faster Game Loading · Prepatcher
⚠ Potential Incompatibility:
Mods with deep modifications to Hediff/Gene/Need systems — Troubleshoot by individually disabling subsystems
═══════════════════════════════════════
Recommended Combinations
═══════════════════════════════════════
· RimSmooth - 边缘流畅优化 — Rendering/pathfinding/data structure optimizations; automatically compatible with this Mod
· Dubs Performance Analyzer — Real-time TPS monitoring for performance bottleneck identification
· BuildingTickOptimizer — Building Tick throttling
· Better GC — Long-term archive garbage collection optimization
═══════════════════════════════════════
Usage Recommendations
═══════════════════════════════════════
· Optimal performance with 50+ Pawns; greater multi-core CPU benefits
· When encountering anomalies, search logs for ; troubleshoot by individually disabling subsystems
· When coexisting with other performance Mods, avoid redundant optimization of the same functionality