Page 1 of 1

New production-technology system - how ?

Posted: 05 Nov 2019 11:31
by Nick2018
Hello!

Can I create new production-technology system in OpenTTD and how (by GRF ?) ?

I want to create "economic" eras in game:

1) Coal (early industrial) - coal train locomotives (need transport`s coal market), horses, coal ships, coal for town`s coal market. May be small power station near town (on coal). No oil at all.

- 1-2 transition period

2) Oil (middle industrial) - oil train locomotives (need transport`s oil market), buses, oil ships, oil for town`s oil market. Middle power station near town (on oil). No coal at all.

- 2-3 transition period

3) Electricity (late industrial) - electricity train locomotives (need special big power station), oil only for buses and ships. Big power station (gas ? nuclear ?) near town. No coal. No oil for train and in towns.

No monorail and maglev (post-industrial) at all.

Re: New production-technology system - how ?

Posted: 05 Nov 2019 12:41
by jfs
Maybe to some extent, but you'll have to depend on players setting certain game options, or combining multiple addons in the correct way.

Industries can be limited in what years they can build, and e.g. the default oil rigs do that, so they never appear before 1960 or there about (don't remember quite exactly).

Industries can also have custom programmed rules (via NewGRF callbacks) that decide how they change their production levels, and whether they stay open or close down. So you could make it such that after a certain date some industry types never raise production and can just continually lower production and eventually close, or even close suddenly for no reason other than "that's the rules".

The problem is that an industry NewGRF can't force new industries to be built on the map, that's controlled by a game setting set by the player. Industries can also be built by Game Script addons, and those can control town growth as well, so a combined package that recommends using one or more NewGRFs together with a specific GS can somewhat make this work.
It'll just be a huge undertaking to implement this, require lots of care in programming both NewGRFs and GS.

Re: New production-technology system - how ?

Posted: 06 Nov 2019 00:53
by Eddi
With a NewGRF you can make industries that never appear before a certain date, or close after a certain date, but you cannot make the use of vehicles (like electric trains) depend on that the player actually services such an industry.

You can have industries (or cargos) affect the way towns grow with a GS (GameScript), but you cannot be sure that the player loads both your GS and NewGRF.

Re: New production-technology system - how ?

Posted: 06 Nov 2019 18:39
by nihues
There are some trains grf (forgot the name) that makes the running costs based on "era" of coal/oil/eletricity, so it raises the running cost of coal after some period (like 1950+) and reduce running cost of oil, same for eletricity around 1980+, that way it induce to use the best train with best fuel avaliable otherwise you get bad income.