Sailing On the Wide Accountancy
Hey Folks! Almost there with the finances stuff, as it's now up and running and I'm testing it with data, and testing general usability.
In today's image, we're looking at the live UI, with random line items assigned to it for testing. After hitting the debug key, our player, one Mackenzie Barnes, is bestowed the whopping purse of $10.98, as seen in the top right. And it's in red, which means we'll be losing money at the end of the month if we don't do something. Clicking that "Cash: $10.98" button opens the screen we see here. The P&L for this month.
The P&L shows some random dealings with Dan Horn generated by my hotkey. This resulted in a few payments from Dan to Mac, totaling $33.34, as well as a few debts to Dan due by month-end, totaling $71.17. Looking down at the bottom right corner, we see that the net profit this month (all income minus all expenses) is -$37.82. We're losing money, overall.
However, we can choose which bills to pay or ignore, to our own peril. So by deselecting the $44.57 expense, we only owe $26.60. Leaving us with $17.73 at the end of the month. (We already had 10.98, we earn 33.34, and we lose 26.60, for a net gain of almost $7.)
So if you can imagine, these line items are piling-up over the course of the month. Some are planned well ahead, like crew salary, and appear here each month. Others come up day-to-day, like docking fees or shopping. And at the end of the month, we are faced with this screen to choose how to proceed. The game pauses, we decide which creditors get our money, and which ones we piss off. We hit the "pay selected payees" button, and assuming we didn't overextend our finances, we go on our merry way!
Now, some details are still in need of testing. For one thing, the consequence of not paying needs to be added. At the very least, they should get moved into the next month. AI should also get some status effect when dealing with you if you've shorted them. Docking fees, which previously were paid at a kiosk, should be integrated with this somehow. Probably by adding a line item here instead of affecting the player directly.
This is all sort of leaning towards your money being a credit account, like a modern day expense card. You run up a balance, and you're expected to pay it at the end of the month. I may have to revisit this with immediate cash transactions (say, in the black market), but this is probably the simplest way to keep everything in one place. Particularly where crew salary is concerned.
Anyway, some more cleaning up to do. And that's not to mention a bigger task: adding ways for the player to earn money! But we're getting there.