I am hoping this helps, after I wrote it I am not sure if it will answer
@Boltgreywing directly, but I feel someone will find it useful.
This is strictly how I would build this system. Note, this is less programming and more of game design. This is where you have to sit down and decide how it should work before you dive into the actuals. It's high level.
User Story (This is how I frame my features, those who have worked in Agile teams will understand the verbiage of the next sentence and get it, those who have not: A user story is a basic sentence that describes what someone wants to be able to do. It frames a goal in simple language without complexity.)
"As a player, I want to run a bank that allows me to offer loans to NPC's and make money on interest."
Okay, simple and easy, lets now define what rules we should have.
- Since we are running a bank, the bank should have a different "account" of currency then the current player. In other words, players should deposit money into their banks. The deposited money is used to give out loans, and loan payments come back into this "account." This means the player can only loan out money that has been purposefully deposited for being loaned out.
- NPC's in this case are random unique names that are generated, the amounts they want are random (between a low and high amount based on repayment term) based on a scale on repayment. Interest rate is also randomized.
Short-Term Loan: Paid back over 3 weeks, amount varies between 100-3000 currency. Interest is usually 1-3%.
- Medium-Term Loan: Paid back over 5 weeks, amount varies between 3000-40000 currency. Interest is usually 2-5%.
- Long-Term Loan: Paid back over 8 weeks, amount varies between 40000-500000 currency. Interest is usually 4-8%.
[*]A player has a 5% chance an NPC will appear asking for a loan every hour. This means that every user will have different NPC's asking for different loans at different times.
[*]If a bank owner does not grant a loan within 72 hours, the NPC leaves.
[*]When a loan is granted, the asked for amount is paid out the bank's "account".
[*]The loan amount paid weekly will be calculated at (loan amount + (loan amount * (interest / 100)) / repayment term). It is deposited into the banks "account"
(Do not fact check my interest rates or math, this is used as a high level off the top of my head example to break down how I would do it)
See, not too terrible for a simple system. It is also a system that is beneficial for a player, since they actually make a return. Note, my current design above ignores any chance of non-repayment or a negative transaction. I will leave that to others to add in.
---
So basically a NPC in this case is a Name, an amount in a loan they want, the amount of weeks they want to repay the loan back, and an interest rate. Because in this case, NPC's are randomized, values are different, which makes them feel unique, but they really aren't.
NPC's are data, much like anything else. They are just given the appearance of something to be interacted with for the player. It is possible to add in logic to make them appear more interactive, perhaps a chance to not pay for a week, or other events. At the end of the day though, they are just stored data like everything else.