Page 1 of 1

Can Gamescripts change the game year?

Posted: 28 Apr 2018 17:03
by Simons Mith
This post asks about repeating game years, and it does seems to be doable with a slight bodge - just use the game cheat menu to change the year back at regular intervals. If game scripts could change the game year, that could be automated. Would such a feature be reasonably easy to add?

viewtopic.php?f=33&t=82407&p=1200639

Re: Can Gamescripts change the game year?

Posted: 28 Apr 2018 20:13
by agentw4b
Simons Mith wrote:This post asks about repeating game years, and it does seems to be doable with a slight bodge - just use the game cheat menu to change the year back at regular intervals. If game scripts could change the game year, that could be automated. Would such a feature be reasonably easy to add?

viewtopic.php?f=33&t=82407&p=1200639
https://nogo.openttd.org/api/1.8.0/clas ... 2130bd7022




I did not test it, but maybe for year 2200 ..



GSGameSettings.SetValue ( "restart_game_year" , 2200);

Re: Can Gamescripts change the game year?

Posted: 28 Apr 2018 20:18
by agentw4b
agentw4b wrote:
Simons Mith wrote:This post asks about repeating game years, and it does seems to be doable with a slight bodge - just use the game cheat menu to change the year back at regular intervals. If game scripts could change the game year, that could be automated. Would such a feature be reasonably easy to add?

viewtopic.php?f=33&t=82407&p=1200639
https://nogo.openttd.org/api/1.8.0/clas ... 2130bd7022




I did not test it, but maybe for year 2200 ..



GSGameSettings.SetValue ( "restart_game_year" , 2200);
I already understand. You do not want to change the year of the end of game but the current game year. So I do not know how to do it.