Page 1 of 1

[GS] Technology Advancement

Posted: 10 May 2020 15:38
by Firrel
Technology Advancement GS

Technology Advancement (TEAD) is a game script which changes the availability of technology: rail, road, water, air. The script allows to start at a certain technology year, slow down or speed up the technology advancement or unlock all technology. Supports any combination of NewGRF.

How the script works:
The way this script works is that the technology date is separated from the game date, so it can advance at different speed or be paused completely. Based on this date, new vehicles are released or old are

See more in readme:
(4.67 KiB) Downloaded 136 times

  • OpenTTD version 1.10.x or newer
  • SuperLib v. 40
The first release (v0) is available on BaNaNaS. This might contain bugs, which I wait you to report, so you help me to make the script better

The game script is limited at the time of writing by these factors:
  • only vehicles can be enabled/disabled by game script
  • vehicle reliability is not relevant to technology date, using no breakdowns is almost mandatory
  • the game script cannot access model life parameter of vehicles, so a fixed model life has to be selected
  • the technology speed is modified in game script settings; story book buttons are currently worked on, which will allow better control over the speed
  • enabling new vehicles by game script command does not trigger new vehicle news

Version 0 (2020/05/10):
- initial release

Re: [GS] Technology Advancement

Posted: 06 Jun 2020 09:41
by andythenorth
This looks interesting, so I gave it a go.

First thing I did was use cheats to change game date, sorry :twisted:

Cheating date causes newgrf to introduce new vehicles, which the GS does then un-introduce again. :)

Re: [GS] Technology Advancement

Posted: 04 Jul 2020 20:35
by Firrel
andythenorth wrote: 06 Jun 2020 09:41 This looks interesting, so I gave it a go.

First thing I did was use cheats to change game date, sorry :twisted:

Cheating date causes newgrf to introduce new vehicles, which the GS does then un-introduce again. :)
Thank you for your feedback.

As I see it there are still too many issues to make this script work properly. I dont know if I will get to it or it will get shelved... I looked forward for the addition of changing engine availability and tried what can be done with it, but as I see it, there is still a long way for proper tech tree or daylength script.

As you say, the enabling/disabling is not working properly with cheating the year. I can make the techology date to not advance when the game year is cheated, which might solve it.

I finally checked the source code on how the engine enabling/disabling actually works and as it seems there is no way for this script to fully function as it is now (I may have missed something). The enable/disable will just force it to a state for the selected company, which can be then overriden by natural availability.
The engine could be disabled after it is released as the release date that can be acquired. But the natural disabling is dependant on engine reliability and model life, which are not available from game script. It would still be bothersome that a popup shows about new engine and it will just get disabled silently, confusing the player.
Checking engine availability in every loop can make the list always up to technology date. Issue is, disabling engine for a company will still return IsBuildable as true, so in every loop all disabled engines will be again disabled for each company. Disabling 13 engines takes 13 ticks, so 100 engines for 4 companies would take 400 ticks, which is too much.

The engine reliability is a whole other story. It is calculated per engine when it is naturally introduced, so releasing it early makes it almost unusable (50-60%). It would require to have the reliability calculated per engine per company, which would break the competition, because reliability is randomized.

Re: [GS] Technology Advancement

Posted: 04 Jul 2020 20:58
by jfs
You're right, the way the availability is handled by OpenTTD probably needs more tweaks. It probably needs an additional bit for whether the availability has been overridden or not, and a way for the GS to reset the availability to "default".

A way to modify the max reliability curve for an engine could also be useful, but I'm sure if that was made available to GS, several NewGRF authors would cry foul ;)