Gene Ledger
Gene Ledger is a technical utility for RimWorld (Biotech DLC) that provides a centralized database for tracking and locating genetic material currently present on the map. It aggregates data from living pawns and corpses to provide a searchable, real-time overview of your colony's genetic pool.
Technical Overview
Data Collection & Scope
The mod scans all spawned actors on the current map to index genetic data:
- Living Carriers: Indexes genes from all player-controlled colonists, prisoners, and slaves.
- Corpses: Scans all corpses on the map to identify genes held within biological remains.
- Genepacks: Scans all genepacks on the map floor and inside connected gene banks.
- Enemy Pawns: Optionally indexes genes from hostile humanlike pawns (disabled by default via Legend toggle).
- State Detection: Automatically identifies the environmental state of genetic material, specifically marking carriers that are Frozen or Rotting.
Advanced Search Syntax
The ledger features a custom recursive-descent parser for complex gene filtering. Supported search parameters include:
- Plain Text: Matches against gene labels or category names.
- category:[name] - Filters by specific gene category.
- mod:[name] - Filters by the source mod providing the gene.
- xeno:[name] - Filters for genes that are members of a specific XenotypeDef.
Quantitative Biostat Metrics:
- c:[op][value] - Complexity (e.g., c:<=3).
- m:[op][value] - Metabolism (e.g., m:>2).
- a:[value] - Archite cost (e.g., a:1).
Logical Operators: Supports boolean logic using & (AND), | (OR), ! (NOT), and parentheses () for nested queries.
Interface & Interaction
- Dynamic Grouping: Toggle between grouping genes by functional category or by the origin of their carriers (Colonists, Slaves, Prisoners, Corpses, Genepacks, and Enemies).
- Sorting Modes: Sort entries alphabetically, by Complexity (High), Metabolism (High/Low), or Archite Cost.
Navigation:
- Left-click: Opens the standard gene information card.
- Right-click Gene: Opens a context menu to Apply Ability (cast available abilities from your pawns) or Go To (jump to carrier).
- Right-click Search: Instantly clears all active search text.
- Click Legend: Toggles the visibility of specific gene sources (Colonists, Slaves, Prisoners, Corpses, Genepacks, or Enemies).
Visual Indicators: UI uses color-coded borders to identify carrier types — Cyan (Colonists), Amber (Prisoners/Slaves), Gray (Corpses), Purple (Genepacks), Red (Enemies). Status badges (❄/~) indicate frozen or rotting tissue.
Implementation & Performance
- Zero Passive Impact: The mod does not utilize a background tick system; as long as the Gene Ledger menu is closed, the mod has zero performance impact on the game.
- Efficient UI: While the menu is open, the data is cached and only refreshes every 900 ticks (15 seconds at normal speed) to ensure smooth performance even with large numbers of carriers.
- Clean Integration: Injected via MainButtonDef XML; the mod requires no Harmony patches and maintains high compatibility with other mods.
Change Log
2026-03-01
- Added: Genepack indexing — genes inside genepacks on the map floor and stored in gene banks now appear in the ledger with a purple border. Toggle via the Genepack legend chip.
- Added: Enemy pawn indexing — genes of hostile humanlike pawns are now tracked with a red border. Disabled by default to prevent clutter; enable via the Enemy legend chip.
- Improved: "Group: Origin" mode now shows separate sections for Colonists, Slaves, Prisoners, Corpses, Genepacks, and Enemies.
2026-02-26
- Refactored Context Menu: Unified the gene carrier menu to include an "Apply Ability…" sub-menu. You can now cast relevant abilities directly from the ledger. For example, you can use "Incorporate" ability from the Big and Small - Genes & More mod directly on a corpse with a gene you want to incorporate, and a pawn to incorporate with.
2026-05-24 - Translation keys were added.
Video example:
- Smart Ability Targeting: The menu filters targets based on ability requirements (e.g., resurrection abilities only list corpses, while social abilities only list living pawns).
- Granular Source Toggles: The Legend is now interactive. Click Colonist, Slave, Prisoner, or Corpse to toggle their visibility in the grid.
- UI Polish: Added a detailed tooltip for the Refresh button, a persistent right-click hint on gene cards.
Compatibility
- No known incompatibilities found.
Credits
- Author: Waggish Pluto
Source