Fellow93/RealisticBattleProjectGitHubLast refreshed Oct 3, 2026
This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works
The weapon-type factors (RBMCombatConfigWeaponType) were already in RBMConfig.
RBMCombatConfigWeaponType is in RBMConfig
Holds
Read Oct 3
RBM does this once in RBMCampaign/Settlements/SettlementWealthTooltip.cs (Install(), from OnSessionLaunched) — **add new settlement rows to its Append**, don't install a second wrapper.
SettlementWealthTooltip has Append
Holds
Read Oct 3
**ExplainedNumber-driven tooltips** (garrison/militia change, finance lines) drop any line whose value is ~0, so a purely informational figure must ride in the **label** of a non-zero line (e.g. GarrisonRecruitCost.GetGarrisonChangeExplained embeds the recruit pool in its recruitment line).
GarrisonRecruitCost has GetGarrisonChangeExplained
Holds
Read Oct 3
A MissionView added from SubModule.OnMissionBehaviorInitialize is registered by the MissionScreen in OnMissionAfterStarting (sets MissionScreen, drives OnMissionScreenTick, IsViewSuspended);
SubModule has OnMissionBehaviorInitialize
Holds
Read Oct 3
Two patches, installed at OnSubModuleLoad (Gauntlet caches a prefab after first parse):
SubModule has OnSubModuleLoad
Holds
Read Oct 3
SpoilsBarPrefabPatch, MaintenanceLabelPrefabPatch, UpgradeLimitPrefabPatch (all under RBMCampaign/UI/).
SpoilsBarPrefabPatch is in RBMCampaign
Holds
Read Oct 3
SpoilsBarPrefabPatch, MaintenanceLabelPrefabPatch, UpgradeLimitPrefabPatch (all under RBMCampaign/UI/).
MaintenanceLabelPrefabPatch is in RBMCampaign
Holds
Read Oct 3
SpoilsBarPrefabPatch, MaintenanceLabelPrefabPatch, UpgradeLimitPrefabPatch (all under RBMCampaign/UI/).
UpgradeLimitPrefabPatch is in RBMCampaign
Holds
Read Oct 3
SettlementWealth.Reset() runs from RBMSettlementWealthCampaignBehavior's **constructor**, the only hook that runs before the save is read.
RBMSettlementWealthCampaignBehavior depends on SettlementWealth
Holds
Read Oct 3
**Food reserve** (Production/TownFoodReserve.cs) — ReserveFraction = **0.5** of a town's food is held back from *outside* buyers: AI parties, armies, caravans.
TownFoodReserve has ReserveFraction
Holds
Read Oct 3
**Hidden stock** (Economy/HiddenMarketStock.cs) — HiddenFraction = **0.5** of every stack in a town's or village's market is hidden from the *player's trade screen only*, so a fief never shows everything it holds at once.
HiddenMarketStock has HiddenFraction
Holds
Read Oct 3
Implementation is one predicate, RBMWorkshopCycle.SettlesInGold: vanilla's own effectCapital ("this recipe settles in gold") **and** not the hidden shop.
RBMWorkshopCycle has SettlesInGold
Holds
Read Oct 3
A flat AdministrativeUpkeep.TownDailyFood = **3** and the prisoners' ration are added after, so a town with no prosperity and no garrison still feeds its staff.
AdministrativeUpkeep has TownDailyFood
Holds
Read Oct 3
> - **RBMWorkshopCycle.Decide** replaces both production gates: storage glut first > (workshopHeadroomGateEnabled, default on), then the payout net of salary must reach > **1.15 × inputs** (hidden bench: bare payout > inputs), then shop capital ≥ inputs, then town gold ≥ > the payout actually paid.
RBMWorkshopCycle has Decide
Holds
Read Oct 3
> Both are credited to the town's **citizen wealth** (Source.WorkshopWages) instead of destroyed.
Source has WorkshopWages
Holds
Read Oct 3
> - **RBMWorkshopCycle.SettlesInGold** keeps the hidden artisans bench out of gold on every path: it > settles in kind and moves only the market fee on its inputs (TradeTariff.Levy, citizens → > treasury).
RBMWorkshopCycle has SettlesInGold
Holds
Read Oct 3
it > settles in kind and moves only the market fee on its inputs (TradeTariff.Levy, citizens → > treasury).
TradeTariff has Levy
Holds
Read Oct 3
**RBM's ×10 PriceScale > ([CaravanCapital.cs:40-52](../RBMCampaign/Economy/CaravanCapital.cs)) amplifies this to > 15,000/day**, and ClanCaravanPayoutFloatPatch reproduces the same eliteCaravan: false for the > clan path.
CaravanCapital has PriceScale
Holds
Read Oct 3
Under RBM, > [NotableWealth.cs](../RBMCampaign/Settlements/NotableWealth.cs) now credits the surplus to the > town's citizen wealth (Source.NotableWealth) and pays the refill leg out of it, clamped to what the > market can find.
Source has NotableWealth
Holds
Read Oct 3
The surplus is **credited to the notable's settlement** instead of being > destroyed (a town's citizen wealth; a village, which has no citizen pot, its own purse via > SettlementWealth.Credit), and the < 4500 refill leg is paid out of that same pocket rather than > minted (in whole 500-gold lots; it buys back only what the pocket can fund).
SettlementWealth has Credit
Holds
Read Oct 3
> ⚠️ **RBM replaces the price wholesale** (RecruitSupply.RecruitPrice, a postfix on this method, > skipped for withoutItemCost quotes).
RecruitSupply has a RecruitPrice method
Holds
Read Oct 3
> Gated by RecruitSupply.IsEnabled.
RecruitSupply has IsEnabled
Holds
Read Oct 3
It lives in a side dictionary (SpoilsPool._spoils) because Bannerlord's TroopRosterElement struct has no spare field to hang it on.
SpoilsPool has a _spoils field
Holds
Read Oct 3
Companion heroes claim shares like a stack but hold no purse: their share is paid straight to the party payee's gold (IsCompanionStack, EventGoldKind.CompanionSpoils), with no leader's cut.
EventGoldKind has CompanionSpoils
Holds
Read Oct 3
The sack and the siege drain share the SpoilsPool.SackActive gate.
SpoilsPool has SackActive
Holds
Read Oct 3
Militia stacks go to MilitiaUpkeep.PayMilitiaUpkeep instead: the settlement's funding pot pays a reduced wage into the purse — town 0.25, castle 0.10, village 0 of a soldier's wage (MilitiaWageFactor*) — and their kit maintenance is met from that purse first.
MilitiaUpkeep has PayMilitiaUpkeep
Holds
Read Oct 3
only the **gold** leg reaches a town — the supply town's citizen wealth via TroopMarketFeedback.RegisterPurchase, market fee included, falling back to the nearest friendly town, then any town.
TroopMarketFeedback has RegisterPurchase
Holds
Read Oct 3
The coin is credited to the settlement's purse (TroopMarketFeedback.RegisterServiceSpend);
TroopMarketFeedback has RegisterServiceSpend
Holds
Read Oct 3
Garrisons are billed their kit maintenance by GarrisonUpkeep.ChargeMaintenance (paid by the fief, not the purse) and militia inside MilitiaUpkeep.
GarrisonUpkeep has ChargeMaintenance
Holds
Read Oct 3
A party with no non-hero stack takes its cut of the whole pot minted instead (ApplyLeaderCutSolo).
SpoilsPool has ApplyLeaderCutSolo
Holds
Read Oct 3
Setting TroopUpgradeCostMultiplier, Default 1, Effect Scales upgrade gold and spoils cost 0 disables the whole system ( SpoilsPool.IsEnabled )
Building Barracks, New RBM effect garrison + militia spawn price −5/10/15%, Seam GarrisonRecruitCost.SpawnCost , MilitiaUpkeep.SpawnCostPerMan / ArmOneMilitiaman, ✅
GarrisonRecruitCost has SpawnCost
Holds
Read Oct 3
Building Barracks, New RBM effect garrison + militia spawn price −5/10/15%, Seam GarrisonRecruitCost.SpawnCost , MilitiaUpkeep.SpawnCostPerMan / ArmOneMilitiaman, ✅
MilitiaUpkeep has SpawnCostPerMan
Holds
Read Oct 3
Building Barracks, New RBM effect garrison + militia spawn price −5/10/15%, Seam GarrisonRecruitCost.SpawnCost , MilitiaUpkeep.SpawnCostPerMan / ArmOneMilitiaman, ✅
MilitiaUpkeep has ArmOneMilitiaman
Holds
Read Oct 3
New RBM effect growth +1/2/3 per day when funded, Seam GarrisonRecruitCost.Compute ( GarrisonSpawnDailyMax term + tooltip line), MilitiaUpkeep.ComputeMilitiaChange intake, ✅
GarrisonRecruitCost has Compute
Holds
Read Oct 3
New RBM effect growth +1/2/3 per day when funded, Seam GarrisonRecruitCost.Compute ( GarrisonSpawnDailyMax term + tooltip line), MilitiaUpkeep.ComputeMilitiaChange intake, ✅
MilitiaUpkeep has ComputeMilitiaChange
Holds
Read Oct 3
New RBM effect tariff +0.3/0.6/1.0% on caravan + player trades, Seam TradeTariff.Levy(.., guardedTrade) only RouteNativeWrite + DoneLogic pass true, ✅
Building Tax Office, New RBM effect +5/10/15% on wealth tax (owner + fief) and the minting cuts, Seam WealthTax.OnDailyTick rates × TaxFactor same factor in Minting, ✅
WealthTax has OnDailyTick
HoldsPR #20 · Oct 2
Read Oct 3
Building Warehouse / Granary, New RBM effect food cap = days × daily consumption tier 0/1/2/3 = 30/40/50/60 days towns also refuse food intake past the cap, Seam RBMTownFoodSupply.FoodStocksUpperLimitPatch rewritten off GetFoodConsumption(town).Total (300 floor), castles included TownStorage.Headroom granary bound, ✅
TownStorage has Headroom
Holds
Read Oct 3
Building Mason, New RBM effect replace ConstructionPerDay efficiency ×1.05/1.1/1.15, cap ×1.1/1.2/1.3, Seam Construction.MasonTier , §1.2/§1.4, ✅
Construction has MasonTier
HoldsPR #20 · Oct 2
Read Oct 3
Building Waterworks, New RBM effect infrastructure bonus ×1.1/1.2/1.3, Seam RBMProsperityEquilibrium.InfrastructureMultiplier 1 + score×0.02×(1+0.1×tier), ✅
RBMProsperityEquilibrium has InfrastructureMultiplier
HoldsPR #20 · Oct 2
Read Oct 3
Building Roads, New RBM effect VillageProduction factor did NOT reach RBM production, Seam RBMVillageProduction.RoadsFactor , applied in the tick and in CalculateDailyProductionAmount VillageHeartsPerDay still flows via vanilla hearth model, ✅
RBMVillageProduction has RoadsFactor
HoldsPR #20 · Oct 2
Read Oct 3
BuildingEffects.CastellanTier/CraftsmanTier/FarmlandsTier (castle type only, null town type) plus the derived rates named below.
BuildingEffects has CastellanTier
Holds
Read Oct 3
BuildingEffects.CastellanTier/CraftsmanTier/FarmlandsTier (castle type only, null town type) plus the derived rates named below.
BuildingEffects has CraftsmanTier
Holds
Read Oct 3
BuildingEffects.CastellanTier/CraftsmanTier/FarmlandsTier (castle type only, null town type) plus the derived rates named below.
BuildingEffects has FarmlandsTier
Holds
Read Oct 3
Building Craftsman Quarters, New RBM effect castle income ×1.1/1.2/1.3, Seam CastleEconomy.OnDailyTick — prosperity × IncomePerProsperityPerDay × CraftsmanIncomeFactor Vanilla's DenarByBoundVillageHeartPerDay left alone, ✅
CastleEconomy has OnDailyTick
HoldsPR #20 · Oct 2
Read Oct 3
Leg Income, Seam PrisonLabour.OnDailyTick , called from RBMSettlementWealthCampaignBehavior.OnDailyTickSettlement as a third income step (after Minting, before upkeep) → SettlementWealth.Credit(.., Source.PrisonLabour) EconomyLog tag "PRISON"
RBMSettlementWealthCampaignBehavior has OnDailyTickSettlement
Holds
Read Oct 3
Leg Food — town, Seam RBMTownFoodSupply.FeedPopulation prisonerUnits added to wanted and to provisionedUnits , so the food leaves the market and nobody is charged (a gaoler does not shop)
RBMTownFoodSupply has FeedPopulation
Holds
Read Oct 3
Leg Food — castle, Seam the same TownFoodStocksChangePatch.Postfix as Farmlands, as an explained line "Prisoners"
TownFoodStocksChangePatch has Postfix
Holds
Read Oct 3
Leg Readout, Seam FoodConsumptionBreakdown gains a Prisoners field, folded into Total (so the granary cap in FoodStocksUpperLimitPatch sizes for them) the ledger's live Food tooltip shows the line when non-zero History rows carry no prisoner column
FoodConsumptionBreakdown has a Prisoners field
HoldsPR #20 · Oct 2
Read Oct 3
Kit maintenance stays a direct fief debit (GarrisonUpkeep.ChargeMaintenance);
GarrisonUpkeep has ChargeMaintenance
Holds
Read Oct 3
**Config:** OutsiderRecruitSurcharge 0.10 (const, in RecruitSupply);
RecruitSupply has OutsiderRecruitSurcharge
Holds
Read Oct 3
Replace WallUpkeepPerLevel = 75 × wallLevel (castle-only today) and **add the town branch** in AdministrativeUpkeep.OnDailyTick (towns currently pay only the admin wage).
AdministrativeUpkeep has OnDailyTick
Holds
Read Oct 3
Master gate stays RBMConfig.rbmCampaignEnabled + SpoilsPool.IsEnabled where money moves.
RBMConfig has rbmCampaignEnabled
Holds
Read Oct 3
Master gate stays RBMConfig.rbmCampaignEnabled + SpoilsPool.IsEnabled where money moves.
The zone armour is read by SimulationEquipmentPower.GetArmorZones, the same reader the auto-resolve model uses;
SimulationEquipmentPower has GetArmorZones
Holds
Read Oct 3
HealthFactorOf (1591-1599) = CommandedHealth / 100, multiplied into each man's power.
StrategicTroopPower has HealthFactorOf
Holds
Read Oct 3
CommandedHealth comes from SimulationTroopHitPoints.BuildCommandedHealth (274-334), which transcribes GetEffectiveMaxHealth — the man's own MaxHitPoints() plus the party leader's HP-raising perks (ThickHides, HardyFrontline, WellBuilt, HardKnock, UnwaveringDefense, PickedShots, MinisterOfHealth).
SimulationTroopHitPoints has BuildCommandedHealth
Holds
Read Oct 3
BuildCommandedHealth adds them only while SimulationPerks.Enabled (simulationPerkSystem && simulationEquipmentEnabled && simulationEquipmentPowerWeight > 0).
SimulationPerks has Enabled
Holds
Read Oct 3
rbmCombatEnabled, OneHandedThrustDamageBonus, armorMultiplier and armorEffectivenessMultiplier — move the offense or armour model and trigger a cache rebuild (EnsureCacheFresh, 391-412).
StrategicTroopPower has EnsureCacheFresh
Holds
Read Oct 3
**The strength-bar tooltip** (StrategicPowerTooltip.cs, StrategicPowerTooltipVM.cs) — the encounter overlay's hover, rewritten as two columns of per-troop rows taken from the real pricing via TryExplainParty.
StrategicTroopPower has TryExplainParty
Holds
Read Oct 3
WorkshopPurse is now a pure ledger and keeps only the log state (_cyclesLogged, _wageDay), fed by RecordCycles/RecordWage calls from the expense step.
WorkshopPurse has _cyclesLogged
Holds
Read Oct 3
WorkshopPurse is now a pure ledger and keeps only the log state (_cyclesLogged, _wageDay), fed by RecordCycles/RecordWage calls from the expense step.
WorkshopPurse has _wageDay
Holds
Read Oct 3
WorkshopPurse is now a pure ledger and keeps only the log state (_cyclesLogged, _wageDay), fed by RecordCycles/RecordWage calls from the expense step.
WorkshopPurse has RecordCycles
Holds
Read Oct 3
WorkshopPurse is now a pure ledger and keeps only the log state (_cyclesLogged, _wageDay), fed by RecordCycles/RecordWage calls from the expense step.
WorkshopPurse has RecordWage
Holds
Read Oct 3
phase 5's diagnostics change was pulled forward into phase 2 — WorkshopDiagnostics.RecordEconomicBlock and its two postfixes are kept, but they now READ RBMWorkshopCycle.TryGetLastVerdict instead of recomputing a second copy of the rule (keeping the recomputation would have meant maintaining the new proportional-margin rule twice, which is the coupling this plan exists to remove).
WorkshopDiagnostics depends on RBMWorkshopCycle
Holds
Read Oct 3
CountCapped was always public on WorkshopDiagnostics, so nothing needed to stay behind.
WorkshopDiagnostics has CountCapped
Holds
Read Oct 3
RBM/SubModule.cs:189-203, in the existing rbmCampaignEnabled && game.GameType is Campaign block, alongside the AddBehavior calls: ((CampaignGameStarter)gameStarterObject).AddModel(new RBMWorkshopModel());
SubModule depends on RBMWorkshopModel
Holds
Read Oct 3
**ArtisanOutput.Scale (ArtisanOutput.cs:65-93) belongs here as a *caller*, not as a body.** Keep the prosperity/bench math and its cache in ArtisanOutput.cs — it has its own session reset (:60-63) and its own ARTISAN log line (:182-226).
ArtisanOutput has Scale
Holds
Read Oct 3
Decide returns a struct:
RBMWorkshopCycle has Decide
Holds
Read Oct 3
ValueOfOutputs(town, items) — **one** valuation, used by the gate and by the payment: Σ town.GetItemPrice(item, null, isSelling: true) (the sell side, i.e. what the town would pay a seller), times WholesaleShare, then clamped by PayoutCeiling(town).
RBMWorkshopSettlement has a ValueOfOutputs method
Holds
Read Oct 3
no gold moves, and TradeTariff.Levy(settlement, c) charges the counter fee exactly as WorkshopPurse.cs:197 does today.
RBMWorkshopSettlement depends on TradeTariff
Holds
Read Oct 3
RBMWorkshopCycle.Decide calls WorkshopDiagnostics.CountVerdict( settlement, verdict) directly, mapping Reason → the existing SHOPBLOCK strings, so WorkshopProductionMargin.MarginPerSpeed stops being read from a diagnostics file (WorkshopDiagnostics.cs:347).
RBMWorkshopCycle depends on WorkshopDiagnostics
Holds
Read Oct 3
**Phase 3 — the settlement step.** Add Workshops/RBMWorkshopSettlement.cs; point RBMWorkshopCycle at its ValueOfOutputs.
RBMWorkshopCycle depends on RBMWorkshopSettlement
Holds
95 rules from 11 docs
See these where the change is. The browser extension puts a pull request's doc findings, and a diagram of what it changed, on the GitHub page itself, so the code and what your docs say about it are side by side.