The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended future development discussion => Topic started by: Vladki on December 29, 2020, 09:38:44 PM

Title: Cheaper road type for industry/attraction connection
Post by: Vladki on December 29, 2020, 09:38:44 PM
Just a small idea that may add to reality.  Goverment built roads connecting cities are usually of higher quality, than roads connecting random farms in countryside. So it would look more realistic to have a separate type of road defined to connect countryside industries and attractions. (As was implemented in https://forum.simutrans.com/index.php/topic,19539.0.html).

Example for modern times: intercity road would be asphalt, but farm road would be tarmac. For most farms and attractions this would be enough, but to serve something bigger (e.g. mine), the player might want to upgrade the road to make use of bigger and heavier trucks (or faster buses to some big attraction).  In older times, when tarmac was the best road available, a farm could be connected just by dirt or gravel road.

I'm not sure how hard would it be to implement this, and it is definitely low priority. I just wanted to share the idea.

EDIT: sorry for posting in the wrong forum - should have gone here: https://forum.simutrans.com/index.php/board,158.0.html
Title: Re: Cheaper road type for industry/attraction connection
Post by: jamespetts on December 29, 2020, 09:58:05 PM
Not a bad idea in principle, but not a priority for my work at present. The implementation would not be too complex: one would simply define a further default road type in addition to the city and inter-city road, something like "secondary_road" in simuconf.tab and use this for industry/attraction connexions.
Title: Re: Cheaper road type for industry/attraction connection
Post by: wlindley on December 30, 2020, 01:20:06 PM
A slightly alternate approach would be to define a function accepting as input a goods type, and returning a road way type.  The function (or, more likely, a helper function) would choose the lightest road vehicle (or combination of motive power + carriage) at the present time for that good, and select the cheapest road way which can accommodate (using the constraints) that hypothetical convoy.  The factory builder would select road waytype via that function. This would need no pakset changes and no new data structures.