New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Change speed of calendar progress (with optional real-time display) #10605
Conversation
This makes a month last about 60 seconds, allowing the use of real-time units in game.
Note: Getting and setting the calendar progress speed is already possible using GSGameSettings
Time to use words in this PR too, as keeping this on IRC/Discord only is not fair! :P In general, I think this is a really good improvement on the last PR. As you know, I didn't really like that economy and calendar ran on different speeds; but with this PR that is nicely solved. People can still play the game as they currently can, and optional people can go to realtime dates, and speed up calendar, etc. That said, I think this PR is too big to merge like this. A few concerns there:
But, I fully understand that if this is not the direction that we want to go to, splitting the PR up might be "a waste of time". So, we need some consensus that this is the direction we want to go. From my perspective, this is by far the best approach I have seen thus far for any form of daylength, in almost 20 years. It is light, it is optional, it doesn't come with tons of settings, and it is understandable. Additionally, it allows for further growth in the next 20 years, no matter what. So I personally really like it. My suggestion is to do the following:
I know, you came up with this list yourself on Discord; I am just writing it down for history :) Curious if other devs / users have an opinion about the direction this is going, but I like non-intrusive additions to the game that actually don't hurt the code complexity all that much :) Code-wise, I have a few things, but I rather highlight them in the smaller PRs. Small things, like missing spaces etc can be dealt with in those PRs :) The bit bigger things, like the 75+ instances of the All-in-all: excellent work :)) |
@@ -1226,17 +1243,17 @@ STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER :Subsidy multipl | |||
STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER_HELPTEXT :Set how much is paid for subsidised connections | |||
|
|||
STR_CONFIG_SETTING_SUBSIDY_DURATION :Subsidy duration: {STRING2} | |||
STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of years for which a subsidy is awarded | |||
STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of {RTS years "12-minute periods}" for which a subsidy is awarded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of {RTS years "12-minute periods}" for which a subsidy is awarded | |
STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT :Set the number of {RTS years "12-minute periods"} for which a subsidy is awarded |
I'm very happy to see my idea from back then has manifested into a real patch, and that it's working out too. Unfortunately I haven't had the time to actually sit with the game for a long time, so I don't know how it is to play with, but it sounds like pretty much every potential issue has been resolved. I think the presentation of the Calendar progress speed setting needs to be carefully considered. It's easy to make it confusing, and I think it is right now. |
Bug: When entering delay in a timetable, the input window takes a number in days, but is initialized with a number of seconds. So if the current delay for a timetable line is given as 8 seconds, I click "Change time", then the editing window shows the number 8, but after clicking OK the timetable is then changed to a delay of 16 seconds. |
I don't like the idea of real time because, with a whole host of changes, it brings chaos to the game. But if it's meant to be an option, it's not so horribly bad anymore. I have two questions:
|
It doesn't bring chaos to the game. The player will not notice any changes unless they choose to use them. This implementation is very different from that of JGRPP, so instead of slowing down the entire economy and calendar as one, it changes only the calendar. This means the calendar and economy are not in sync, so there's no way to accurately show the economy in calendar units. That's why we have to show the economy in real-time units, decoupled from the calendar. I will have to test changing calendar speed during a game. It worked fine last I tried it. |
Motivation / Problem
Note: This supersedes #10322, with the real-time mode now optional. Players can continue to play the game using the current calendar date displayed, so long as they're using default calendar speed.
In the daylength discussion, @andythenorth gives motivations for players to configure how fast technology progresses in OpenTTD:
Additional usecases might be:
Description
This implements @nielsmh's approach which uses real-time units.
Date/time handling is separated into two systems:
Calendar time for technology and world appearance
Economy time
Calendar time is kept in a common Gregorian calendar, with 365 days in a year, leap years, variable length months, and so on.
Real-time mode
By default, we continue to present economic information in calendar dates. This is done by keeping the economy date synced with the calendar date.
In order to change the speed of calendar progress, players will need to start a new game and enable the new real-time setting. This breaks the synchronization between economy and calendar dates: economy months have 30 days, so a "day" is 1.998 seconds, a "month" is a minute, and a "year" (now called a period) is 12 minutes. There are no leap periods.
Savegames cannot be converted to real-time mode. You must start a new game. Once in real-time mode, the speed of calendar progression can be freely changed during games, including by Game Scripts.
In the user interface, all elements that run on economy time are presented in real time units:
Seconds (multiples of 2), for things which were originally daily
Minutes, for things which were originally monthly:
Economic periods (sometimes described as simply 12 minutes) for things which were originally yearly:
Internally most events will still be referenced as daily/monthly/yearly.
Limitations
While every effort was made to make this change optional, a few changes were impossible to avoid:
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.