Feature: Configurable subsidy duration #9081
Motivation / Problem
Subsidies are hard-coded to last only one year, with a maximum distance of 70 tiles (Manhattan distance). While this incentivizes local, short-distance routes which ordinarily don't pay much, even with the subsidy multiplier the short duration of the subsidy often isn't worth the player's time and effort.
This PR adds a
Slightly longer subsidies would be more powerful and beneficial to players. Additionally, allowing much longer subsidies would allow new gameplay modes, such as making unsubsidized NewGRF cargos unprofitable and forcing players to compete for long-term subsidies created by the game or a GS.
The setting defaults to 1, the current hard-coded duration. The minimum value is 0, which disables subsidies, and the maximum is 5000; a nice round number which doesn't overflow the uint16 storing the subsidy duration in months. The longest games I've seen in screenshots are between 500 and 1000 years, so this should be plenty of space for an effectively indefinite subsidy. (Note: the maximum was originally 256 when I created the PR, but I realized this wasn't long enough.)
I know that adding settings needs strong justification, so I considered several alternatives, none of which felt right:
So I added a setting.
Note that while subsidies are randomly calculated each month without regard to how many subsidies currently exist, new subsidy offers will not accumulate forever since towns and industries with more than 42% of cargo transported are ineligible for new subsidies.
I also plan to look at increasing the maximum distance of the subsidy based on town and industry density to fix subsidies not being possible on low-density maps, but that is a separate project entirely.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
In theory, combining this with GS should allow a Game Script to create any number of subsidies, each with arbitrary multipliers and durations. For example, a GS could do the following to create a 4x subsidy for 5 years and a 1.5x subsidy for 20 years while keeping subsidies disabled otherwise:
The maximum subsidy duration should remain at 255 unless it needs to be lowered for technical reasons.