ekem-Ledger icon

Ledger

A bank app for your cruncher: a statement of every Crow you earn and spend, accounts for your bills, and a little banking flavour.

Last updated 2 weeks ago
Total downloads 207
Total rating 1 
Categories Mods Libraries
Dependency string ekem-Ledger-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_IL2CPP-6.0.755 icon
BepInEx-BepInExPack_IL2CPP

BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.

Preferred version: 6.0.755
Venomaus-SODCommon-2.1.5 icon
Venomaus-SODCommon

A common library for SOD mods.

Preferred version: 2.1.5
ekem-CruncherListFix-1.1.0 icon
ekem-CruncherListFix

Fixes lists on your own cruncher being cut down to one entry (every vmail, every resident at login), and gives you an account on the cruncher in a hotel room you rent.

Preferred version: 1.1.0

README

Ledger

A bank for Shadows of Doubt. Every Crow you earn or spend goes into a statement, with a category and a short note, and the Ledger app on your cruncher shows where your money went.

Requires

  • SOD.Common by Venomaus.
  • Cruncher List Fix: it gives you an account on the cruncher in a hotel room you rent, so the bank is there too.

Recommended: DialogUIRework by Piepieonline. The City Hall line goes into its Transaction tab.

The Ledger app

The app is on every cruncher where you're logged in under your own name: at home, in a hotel room you rent, and on your desk at the Enforcer office if you play with Detective Routine. Other people's accounts don't have it.

  • Account: your balance, what's due soon, your bill accounts and the latest transactions.
  • Statement: every transaction by day, with the balance after it. Show all of them, only income or only spending.
  • Statistics: spending by category this week, your balance over the last 14 days, and how long your money lasts at this pace.
  • Bills: what you owe, with Pay now. Loan shark debts show up here too.
  • Accounts: bill accounts that other mods open for you (rent, mortgage, utilities). Deposit money into them, and withdraw it if the account allows that.

The app comes in three looks, set with Display.Look in the config:

  • Retro (default): its own green window in the style of the game's apps.
  • System: inside the game's own window, like Vacuum Mail.
  • Modern: a big banking screen with a side menu and cards.

Printed statements

Ask a clerk at the front desk in the City Hall lobby: "I'd like a printed bank statement." It costs a small fee (Bank.StatementFee, 5 by default), and the fee shows up on the statement itself. The statement opens in the game's bank statement window and lists your last 13 transactions: the window has room for no more. The full history is in the app.

Your data

Ledger keeps its data in ledger.json next to your save game. If that file is lost, the statement history is gone and so is any money held in mod accounts. When you load a save that has no Ledger data yet, the statement starts with your current balance.

Older transactions are folded into one line per day and category after Bank.KeepDays (14) in-game days.

Config

  • Bank.StatementFee: what a City Hall clerk charges for a printed statement.
  • Bank.KeepDays: how many in-game days the statement keeps every transaction.
  • Bank.TransferStep: how much one press of Deposit or Withdraw moves.
  • Display.Look: Retro, System or Modern.
  • Debug.DebugLogging: log every recorded transaction.

For mod authors

Ledger has a public API in the static class Ledger.Bank. It is new and may still change.

  • Bank.Post(amount, category, memo): charge or pay the player with your own label.
  • using (Bank.Context(category, memo)) { ... }: label the game's own money calls inside the block.
  • Bank.OpenAccount(id, title, kind): open a bill account. Prepaid accounts only take deposits and your mod draws from them; Withdrawable accounts let the player take money out.
  • Bank.Draw, Bank.Credit, Bank.Deposit, Bank.Withdraw, Bank.CloseAccount(id, refund, memo).
  • Bank.RegisterBill(IBill): show a bill in the app, with Pay now. Bills aren't saved: register them again after a save is loaded.
  • Bank.Posted: an event for every recorded transaction.

Without a hard dependency, pass "ledger:Category|Memo" as the reason to GameplayController.AddMoney, and Ledger files it under that category and note.