Friday, January 8, 2016

Ze bank and game time

As anticipated in the previous post I needed a bank in order to make simplier to buy the home.

The bank is now a new location where you can take a mortgage.

You can get a lot of money that you will have pay in a very long period with monthly payments.
The long period as I write is 20 year.
So, since I doubt someone is going to play for a so long period it's more like an infinite time.

Anyway for this I enanched the AddPeriodicMoneyMovement event step.
Adding an optional duration field.

<AddPeriodicMoneyMovement>
                  <Id>bank_loan</Id>
                  <Reason>Bank loan</Reason>
                  <Amount>-Round(55000 / 200, 0)</Amount>
                  <Period>Month</Period>
                  <Duration>200</Duration>
</AddPeriodicMoneyMovement>

Did you catch the mistake?
The duration is 200 months while 20 years should be 240.
Well, it's not a mistake.
The game time is different from the real world one a year is made of 10 months and a months is made of exactly 4 weeks.

Weeks will remain as is for simplicity reason, but maybe I'll change the month number to 12. I have still to see whether it's an advantage to have 10 month years.

No comments:

Post a Comment