A RimWorld 1.4/1.5/1.6 mod that adds "The Ledger" faction, a group of ruthless financiers who offer loans to colonies in need. Borrow silver, pay interest on time, or face brutal collections raids.
- New Faction: "The Ledger" spawns near your starting location
- Loan System: Request loans of 500, 1000, 2000, or 5000 silver via Comms Console
- Interest Payments: Pay periodic interest or face escalating consequences
- Collections System: Miss too many payments and face a hostile raid
- Tribute System: After forced collection, pay tribute to restore borrowing privileges
- Ensure you have the Harmony mod installed
- Copy this mod folder to your RimWorld Mods directory
- Build the C# project (see Building section)
- Enable the mod in RimWorld's mod menu
- .NET Framework 4.8 SDK
- RimWorld game files for assembly references
-
Set the
RIMWORLD_DIRenvironment variable to your RimWorld installation path, OR edit the.csprojfile to point to your RimWorld managed assemblies -
Build using dotnet CLI:
cd Source/DebtCollector
dotnet build -c Release- The compiled DLL will be placed in the
Assembliesfolder
The project is configured to use Krafs.Rimworld.Ref NuGet package as a fallback for RimWorld assembly references.
-
Enable Dev Mode in RimWorld options
-
Start a New Game
- Verify in the log:
[DebtCollector] Mod initialized. Harmony patches applied. - Verify in the log:
[DebtCollector] Created Ledger settlement...or...already exists...
- Verify in the log:
-
Check Faction Exists
- Open the Factions tab
- Look for "The Ledger" faction
-
Build a Comms Console
- Use dev mode to spawn:
CommsConsole - Ensure it has power
- Use dev mode to spawn:
-
Test Loan Request
- Select the Comms Console
- Click "Request Loan" gizmo
- Select a loan amount
- Verify silver spawns at trade drop spot
- Verify letter received
-
Test View Ledger
- Click "View Debt Ledger" gizmo
- Verify dialog shows correct principal and status
-
Test Interest Payment (use dev mode to speed up)
- Dev Mode → Debug Actions → Debt Collector → "Force Interest Due Now"
- Wait one tick for the interest letter
- Click "Pay Interest" gizmo
- Verify success message
-
Test Missed Payments
- Dev Mode → Debug Actions → Debt Collector → "Force Interest Due Now"
- Dev Mode → Debug Actions → Debt Collector → "Skip to Payment Deadline"
- Observe missed payment letter
- Repeat to trigger collections
-
Test Collections Raid
- Dev Mode → Debug Actions → Debt Collector → "Force Collections Raid Now"
- Wait for raid to spawn
- Defeat or wait for raiders to leave
- Verify "Debt Settled By Force" letter
- Verify status is now "Locked Out"
-
Test Tribute
- With locked out status, click "Send Tribute" gizmo
- Verify tribute accepted letter
- Verify you can request loans again
All debug actions are under: Dev Mode → Debug Actions → Debt Collector
Force Interest Due Now- Sets next interest tick to current tickForce Collections State- Puts active contract into collectionsForce Collections Raid Now- Triggers immediate raidGrant 5000 Silver- Spawns silver for testing paymentsReset Debt Contract- Clears all debt stateSet Locked Out- Sets locked out stateLog Debt Status- Logs detailed contract state to consoleForce Place Settlement- Re-attempts settlement placementSkip to Payment Deadline- Sets payment deadline to now
View detailed status in the debug log:
- Dev Mode → Debug Actions → Debt Collector → "Log Debt Status"
- No Comms Console: Verify mod works but loan buttons unavailable
- Unpowered Console: Verify gizmos don't appear
- No Silver: Verify payment fails with appropriate message
- Multiple Loans: Verify cannot take second loan while one active
- Save/Load: Take a loan, save, reload, verify state preserved
Access via Options → Mod Settings → Debt Collector Settings
| Setting | Default | Description |
|---|---|---|
| Interest Rate | 10% | Percentage of principal charged as interest |
| Interest Interval | 3 days | Days between interest payments |
| Payment Window | 24 hours | Time to pay after interest demand |
| Grace Missed Payments | 2 | Missed payments before collections |
| Collections Deadline | 18 hours | Time to pay after collections notice |
| Min Settlement Distance | 3 tiles | Minimum distance for Ledger settlement |
| Max Settlement Distance | 4 tiles | Maximum distance for Ledger settlement |
| Tribute Multiplier | 1.5x | Multiplier for tribute amount |
| Raid Strength Multiplier | 1.5x | Multiplier for raid points |
DebtCollector/
├── About/
│ └── About.xml
├── Assemblies/
│ └── DebtCollector.dll (compiled)
├── Defs/
│ ├── FactionDef/
│ │ └── DebtCollector_FactionDef.xml
│ ├── IncidentDef/
│ │ └── DebtCollector_Incidents.xml
│ └── WorldGenStepDef/
│ └── DebtCollector_WorldGenStep.xml
├── Languages/
│ └── English/
│ └── Keyed/
│ └── DebtCollector_Keyed.xml
├── Patches/
│ └── DebtCollector_Patches.xml
└── Source/
└── DebtCollector/
├── DebtCollector.csproj
├── Core/
├── Comms/
├── DefOf/
├── Harmony/
├── Incidents/
├── Tests/
└── World/
If you see:
Exception loading def from file DebtCollector_WorldGenStep.xml: ... MissingMethodException: Default constructor not found for type Verse.WorldGenStep
Fix: Rebuild the mod (dotnet build -c Release in Source/DebtCollector) and ensure RimWorld loads the updated Assemblies/DebtCollector.dll. The def requires WorldGenStep_LedgerSettlement with a parameterless constructor; that is included in the current build. If you run from Mods/Depth_Collector, copy the built DLL (and optional .pdb) from Assemblies/ into that mod’s Assemblies/ folder.
- Check log for warnings about tile finding
- Use "Force Place Settlement" debug action
- Increase max settlement distance in settings
- Ensure FactionDef XML is valid
- Check mod load order (should be after Core)
- Verify CommsConsole is powered
- Check that patch XML is applying (no XML errors in log)
- Verify the faction exists
MIT License - Feel free to use, modify, and distribute.
- Ludeon Studios for RimWorld
- Pardeike for Harmony