Page 1 of 1

Millenium Conversion set

Posted: 16 Jul 2009 09:40
by Terkhen
I have always wanted to play really long games with OpenTTD. There have been a few tries to achieve this goal with extensive modifications to OpenTTD source, but I decided to take another approach for achieving this goal using already existing features. OpenTTD supports *really* long introduction dates for almost everything in GRFs. Using this feature, I am creating a set of GRFs that allow games from year 950 onwards, substituting all vehicles with different versions that have longer model life periods and are introduced way earlier. The set does not aspire to be realistic (trucks in the dark ages?) or complex: it includes vehicles as simple as the standard ones, and uses only the standard sprites. Since the Millenium Conversion set aspires to modify every kind of date related entities editable by GRF, I decided to take a modular approach in the releases of this set. This way, anyone is able to use only the parts of the Millenium set that (s)he needs. Description and download of these individual GRFs can be found below. The rar file with all GRFs in a single package is at the end of this post.

Note that this is my first work in the field of GRFs. Feedback and advice will be greatly appretiated, as there may be some serious design or code errors.

NOTE: The Millenium Conversion set is released under the GNU General Public License (GPL v3).

Bridges

Version: 1
GRFID: A4 F0 (Version)
Status: Complete
GRF download
Source code download

This GRF scales standard bridge introduction dates.

Code: Select all

Bridge                      Original Date      Millenium Date
Wooden                          Always             Always
Concrete                        Always             Always
Girder, Steel                    1930               850
Suspension, Concrete            Always             Always
Suspension, Steel (Bronze)       1930               850
Suspension, Steel (Golden)       1930               850
Cantilever, Steel (Bronze)       1930               850
Cantilever, Steel (Brown)        1930               850
Cantilever, Steel (Red)          1930               850
Girder, Steel (2)                1930               850
Tubular, Steel (Bronze)          1995               1500
Tubular, Steel (Golden)          2005               1600
Tubular, Silicon                 2010               1650
Houses

Version: 1
GRFID: A4 F1 (Version)
Status: Work in progress
Done: Everything?
Missing: Check some defects in the GRF (see below)
GRF download
Source code download

This GRF scales standard house introduction and end dates. In theory it should scale all standard houses (including Toyland) but some houses are not changed by this GRF at all (The NewGRF field is missing from their land area information window).

Road Vehicles

Version: 1
GRFID: A4 F2 (Version)
Status: Work in progress
Done: Temperate road vehicles, Subarctic road vehicles, Tropical road vehicles.
Missing: Manual with a comparison of all vehicles. Toyland vehicles, better vehicle names than "Bus F-IX", refittable vehicles.
GRF download
Source code download

This GRF substitutes standard road vehicles, introducing two families of vehicles for each kind of cargo in each climate: "Fast" and "Heavy" vehicles. As expected, "Fast" vehicles are faster, but they carry less cargo and have less power (even if right now power OpenTTD ignores power) than their "Heavy" counterparts. Each family has 10 different vehicles that are released every 120 years, and that follow a slow progression in their capabilities. I will make a list of all included road vehicles in a "nice" format as soon as I can.

Ships

Version: --
GRFID: A4 F3 (Version)
Status: Not started

Airplanes

Version: --
GRFID: A4 F4 (Version)
Status: Not started

Trains

Version: --
GRFID: A4 F5 (Version)
Status: Not started

Re: Millenium Conversion set

Posted: 16 Jul 2009 09:40
by Terkhen
RESERVED

Re: Millenium Conversion set

Posted: 16 Jul 2009 09:41
by Terkhen
RESERVED

Re: Millenium Conversion set

Posted: 16 Jul 2009 09:42
by Terkhen
Version 1 of the Bridges GRF.

Re: Millenium Conversion set

Posted: 16 Jul 2009 09:43
by Terkhen
Version 1 of the houses GRF.

Re: Millenium Conversion set

Posted: 16 Jul 2009 09:43
by Terkhen
Version 1 of the road vehicles GRF.

Re: Millenium Conversion set

Posted: 16 Jul 2009 18:11
by DJ Nekkid
if you would like the 2cc set to support this, feel free to drop make a feature req at the devzone (see sig), and make a proposal on the years on the different introdates, and we might add it to the next version

Re: Millenium Conversion set

Posted: 17 Jul 2009 11:11
by Terkhen
Having other GRF sets support the conversion would be great!. But they would face the same problem that I did with standard vehicles. Initially, my idea was just to scale the date of introduction and model life properties of already existing standard vehicles.

Date of introduction = 2050 - (2050 - Original_date) * Factor
Model life = Original_model_life * Factor

With Factor being the "number of years per year" desired. The problem is that the model life property is limited to a maximum of 254 years. Because of this problem, the factor is limited by the highest model life of the set. In my case (standard vehicles), some standard road vehicles and ships have a model life of 85-90 years. Since I did not want to limit the time factor to 2-3x, I only had the options of "duplicating" existing vehicles, limiting the set to vehicles that never expire or creating a different progression of vehicles that resembles the ones I wanted to emulate.

Regarding 2cc and other existing sets, the only way of supporting the current implementation of the Millenium conversion set is changing dates with this formula: 2050 - (2050 - Original_date) * 10 and setting the Model life property to 0xFF, or duplicating existing vehicles.

This post made me think that, to completely support long format dates in vehicles, there should be similar additional long format properties for model life and vehicle life. Before posting that feature req, I am going to dig into OpenTTD code to see how this could be done.

Re: Millenium Conversion set

Posted: 17 Jul 2009 12:47
by planetmaker
Terkhen wrote:Having other GRF sets support the conversion would be great!. But they would face the same problem that I did with standard vehicles. Initially, my idea was just to scale the date of introduction and model life properties of already existing standard vehicles.

Date of introduction = 2050 - (2050 - Original_date) * Factor
Model life = Original_model_life * Factor

Regarding 2cc and other existing sets, the only way of supporting the current implementation of the Millenium conversion set is changing dates with this formula: 2050 - (2050 - Original_date) * 10 and setting the Model life property to 0xFF, or duplicating existing vehicles.
That doesn't sould like a terribly difficult change. Guarded by a grf parameter this should probably be a moderate amount of work. If some trains are overlooked - well, doesn't matter ,they just appear at their usual time...

Re: Millenium Conversion set

Posted: 20 Jul 2009 14:30
by Terkhen
I have been working in a patch that adds a new long format model life property to all vehicles. If this property is accepted, then converting existing sets to use a date factor by parameter both for introduction date and model life will be possible.

The flyspray entry is here.

I will get back to work with the Millenium conversion set after I see what reception this feature has, to design and change it accordingly.