kaomoneus / OpenTTD

OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
https://www.openttd.org/
Other
4 stars 1 forks source link

[Feature]: Make money scaling implicit #10

Closed kaomoneus closed 2 years ago

kaomoneus commented 2 years ago

Version of OpenTTD this feature is to be implemented.

12.1.slowpace-1.2

Description

Currently we multiply max loan amount, vehicle costs and some other costs on pace factor. Main motivation is to keep payback periods unchanged comparing to legacy modes.

  1. Introduce virtual currency on top of chosen currency with rate 1/.
  2. Add support of prices with fractional numbers.

All together it will allow to keep max loan, and costs unchanged comparing to legacy. At same time fares per single trip will be reduced and for big pace factor will become less than 1. E.g. bus might earn $0.54.

This approach supposed to be more intuitive for user experience.

Implementation description

It seems that all stuff should be done in FormatGenericCurrency.

In fact we don't even need a virtual currency. Just add support for decimal point and divide on pace factor

kaomoneus commented 2 years ago

Just pushed implementation. Still wait before merge for may be some feedback.

Here's a screenshot (year pace = 1 hour): Screen Shot 2022-01-06 at 7 45 32 PM

James103 commented 2 years ago

Would it be possible to

  1. Make sure that currency amounts show only 0, 2, or 3 digits (after the decimal). It is unusual for there to only be one digit after the decimal in a monetary amount.
  2. Take into account the exchange rate of the current currency with respect to the GBP when deciding how many digits after the decimal to show. In other words, even if the game pace factor is 100:1, if you use JPY, no decimals should be shown because the exchange rate (220:1) exceeds the game pace factor (100:1).
kaomoneus commented 2 years ago

Ok, that makes sense

Ufiby commented 2 years ago

How did you calculate finances with a growth factor? If 1 annual pace is equal to 1 hour. 1 hour means that the coefficient is multiplied by 4. There is a possibility that 1 annual pace will be 2.5 hours. Thus, the coefficient is multiplied by 10. To receive payments from the profit, the price is divided by 10. Is this an opportunity ?

kaomoneus commented 2 years ago

Implemented in 8fb25e1f601