YAIM - (Yet Another) Infrastructure Maintenance Patch (V3.1)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 592
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

YAIM - (Yet Another) Infrastructure Maintenance Patch (V3.1)

Post by Michi_cc » 06 Nov 2011 18:27

Hello,

welcome to this thread announcing the YAIM - (Yet Another) Infrastructure Maintenance patch. This patch brings infrastructure maintenance costs (besides the tiny station maintenance) to OpenTTD. This is still somewhat experimental as there are some base costs that have to be tuned and I can't test-play every playing style imaginable.

I admit the thread title is a bit of a stretch as I only know of one other similar patch, but still 8)

Features:
  • Monthly maintenance for company-owned road, tracks, signals, stations, airports and canals.
  • Non-linear costs that increase with each further owned item and will make you think twice if you really need that bit of infrastructure.
  • Extra costs for track junctions, bridges and tunnels.
  • Detailed infrastructure statistics in the company details window.
  • NewGRF support for rail type and airport specific cost factors.
To play, enable it in Advanced Settings | Economy. If the cost level I've chosen doesn't really work for you, try tinkering with last five values in src/tables/pricebase.h and report back here.
infra_maint2.png
Detailed infrastructure overview in a game that ran much too long with inflation enabled.
infra_maint2.png (59.15 KiB) Viewed 13311 times
-- Michael Lutz
Last edited by Michi_cc on 18 Dec 2011 18:37, edited 7 times in total.

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Supercheese » 06 Nov 2011 20:58

Well, looks neat!
Two things though: 1) I'm not sure why the details window says Railroad construction, Monorail construction, and so on while it only says "Road" and "Tramway". Methinks the "construction" part shouldn't be there, and rather just plain "Railways" and such, no? (And for consistency pluralize Road and Tramway as well.)

and 2) Those costs seem absurdly high; it seems misleading to put an example picture of "a game that ran much too long with inflation" rather than a more typical game's infrastructure. If one doesn't read the comment text (which I passed over my first read through) they could be under the impression that the costs are absurdly high by default (which I assume they are not if one has inflation disabled).
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 592
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Michi_cc » 06 Nov 2011 21:11

Supercheese wrote:Two things though: 1) I'm not sure why the details window says Railroad construction, Monorail construction, and so on while it only says "Road" and "Tramway". Methinks the "construction" part shouldn't be there, and rather just plain "Railways" and such, no? (And for consistency pluralize Road and Tramway as well.)
That's an unfortunate result of the fact that somebody™ described the rail type name property with "String ID of the name of the rail type as shown in the toolbar caption", so all rail type NewGRFs put "construction" into the name. It might make sense to add a new property should this one go to trunk, but that still means all rail type GRFs need to be updated. We don't have road types yet so I was free to choose the name there.
Supercheese wrote:and 2) Those costs seem absurdly high; it seems misleading to put an example picture of "a game that ran much too long with inflation" rather than a more typical game's infrastructure. If one doesn't read the comment text (which I passed over my first read through) they could be under the impression that the costs are absurdly high by default (which I assume they are not if one has inflation disabled).
If you compare it to the company value of 48 billion € the infrastructure costs are actually quite reasonable. Inflation simply made all numbers in that game quite big (including the not shown profit). The reason I made a screenshot in from that particular game is that is one I actually play with (which is quite rare, as deving and playing are inversely proportional), and not just some artificial testing environment.

-- Michael Lutz

ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by ic111 » 06 Nov 2011 21:18

Sounds interesting. Some comments without having played it while my compiler does its job ;-)
Michi_cc wrote:
  • Monthly maintenance for company-owned road, tracks, signals and canals.
  • Non-linear costs that increase with each further owned item and will make you think twice if you really need that bit of infrastructure.
You mean, if I own 1000 track tiles, I pay more than twice than if I own 500? Is this feature mandatory?

EDIT: Removed non-senseful comment...

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 592
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Michi_cc » 06 Nov 2011 21:32

ic111 wrote:You mean, if I own 1000 track tiles, I pay more than twice than if I own 500? Is this feature mandatory?
Yes. Otherwise the only thing that this patch would do is reduce the profit margin by a small bit. Where's the sense in (warning: simplification!) double tracks == double profit == double maintenance cost? It's only a challenge if it's double tracks == double profit == more-than-double costs, which means you really have to think about whether you really need to double-track everything or really need those extra five junction tiles. And just to be exact, it's counting track bits and not tiles with track on. And junction tiles with overlapping track bits are penalized extra, don't fill all your map with those XXX station entrances.

-- Michael Lutz

Eddi
Tycoon
Tycoon
Posts: 7400
Joined: 17 Jan 2007 00:14

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Eddi » 06 Nov 2011 21:51

ic111 wrote:You mean, if I own 1000 track tiles, I pay more than twice than if I own 500? Is this feature mandatory?
i think that is a very core feature. there's not much sense in adding "yet another linear cost". what this game needs is a progressive cost, that does not penalize you (much) in the beginning, but gets worse once you expand further (call this the "management overhead"), in order to increase the margin between "my business is profitable" and "i am earning more than i can spend".

if you just want linear costs, you can instead raise some base costs. what this does is make the beginning very hard, but delay the "i am earning more than i can spend" point only by a very small margin. if you don't go bust within the first two years.
You might not exactly be interested in Ferion, but if you are, have fun :)

ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by ic111 » 06 Nov 2011 21:57

Michi_cc wrote:
ic111 wrote:You mean, if I own 1000 track tiles, I pay more than twice than if I own 500? Is this feature mandatory?
Yes. Otherwise the only thing that this patch would do is reduce the profit margin by a small bit.
Given that so far, maintenance costs don´t exist at all, I think it would be more than a bit (of course depending on how big the constants are...). I mean, there is for example one train set, I think it is called American (or similar) that has really high maintenance costs for the engines. Linear costs with respect to the number of engines you have. And my experience is that money is actually a factor in such a game.
Where's the sense in (warning: simplification!) double tracks == double profit == double maintenance cost?
So far, we have double tracks = double profit = no maintenance costs.

And why do in reality (linear costs) railway companies try to remove any junction they don´t actually need? Because their, linear, costs actually count.

I think linear costs would do their job, if the constants are chosen sensefully. This may for example include that junctions are expensive. If although there are such costs, the players earn huge amounts of money, I would rather have a look on the income rates.

Furthermore: My playing style involves building up a big railway network (but e.g. single track lines as long as they suffice) while "stopping" time. E.g. at the end of every year 1934, I go back to the beginning of 1934. Would with non-linear costs be building up a map-wide railway network with the 1934 economic settings work?
It's only a challenge if it's double tracks == double profit == more-than-double costs, which means you really have to think about whether you really need to double-track everything or really need those extra five junction tiles. And just to be exact, it's counting track bits and not tiles with track on. And junction tiles with overlapping track bits are penalized extra, don't fill all your map with those XXX station entrances.
Given that making a railway company profitable seems to be a challenge in reality, I think using realistic economic settings should do their job to make the game challenging. And non-linear costs don´t have any counterpart in reality IMHO.

ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by ic111 » 06 Nov 2011 22:03

Eddi wrote:
ic111 wrote:You mean, if I own 1000 track tiles, I pay more than twice than if I own 500? Is this feature mandatory?
i think that is a very core feature. there's not much sense in adding "yet another linear cost". what this game needs is a progressive cost, that does not penalize you (much) in the beginning, but gets worse once you expand further
I agree that the huge amounts of money you earn in later game are a problem.

But: Why do you earn such huge amounts of money in later game? Because income rates don´t decline while engines become better and better in terms of capacity and speed.

Which function do you mean with "non linear"?

Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Logital82 » 07 Nov 2011 06:20

What about compatibility with nutracks? And is there a binary?

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Kogut » 07 Nov 2011 06:58

I suggest to add this button to money window (as it is supposed to contain information about significant spending).
Attachments
Bez tytułu.png
Bez tytułu.png (12.45 KiB) Viewed 13806 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Eddi
Tycoon
Tycoon
Posts: 7400
Joined: 17 Jan 2007 00:14

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Eddi » 07 Nov 2011 09:29

ic111 wrote:Given that making a railway company profitable seems to be a challenge in reality, I think using realistic economic settings should do their job to make the game challenging.
So i take it you have a degree in economics and can present us with a model of "realistic" settings that are both complex enough to provide the same challenge that real railway companies face, but is also simplified enough to fit into the confined setting of the TTD world?
You might not exactly be interested in Ferion, but if you are, have fun :)

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Kogut » 07 Nov 2011 09:33

Rail count is weird with tunnels (single tile counts as 4 tracks), airports are missing.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by ic111 » 07 Nov 2011 12:00

Eddi wrote:
ic111 wrote:Given that making a railway company profitable seems to be a challenge in reality, I think using realistic economic settings should do their job to make the game challenging.
So i take it you have a degree in economics and can present us with a model of "realistic" settings that are both complex enough to provide the same challenge that real railway companies face, but is also simplified enough to fit into the confined setting of the TTD world?
First of all: A degree in economics is one of the last things I would try to gain :mrgreen:

The problem I see with non-linear costs is that they force the player to play with a certain network size (given some fixed set of engines he plays with). Can there be a set of non-linear costs that

(a) makes it a challenge to play on a network connecting 10 cities
(b) makes it possible to play on a network connecting 50 cities?

A non-linear function will at some point reach values that make further enlarging the network simply impossible. And this would be a restriction that I would not want.

No complete economy model, but at least some aspects (I will have to go in 5 minutes...):
- What about a link between transport rates and the profit of the company? In reality, a company whose profit is too big will come under pressure, either from competing companies or from the government in terms of syndicate control. There might be a economy message "Next year, your transport rates will fall by 5 percent."
- In OpenTTD, you can build a railway track in 1920, use it with speed 50 km/h, keep in until 2000, and use it with speed > 200 km/h then. Maybe some speed classes for tracks, with different building and maintenance costs would be possible. Displaying them would clearly be a problem, maybe the minimap might help.

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Kogut » 07 Nov 2011 12:02

ic111 wrote: - In OpenTTD, you can build a railway track in 1920, use it with speed 50 km/h, keep in until 2000, and use it with speed > 200 km/h then. Maybe some speed classes for tracks, with different building and maintenance costs would be possible. Displaying them would clearly be a problem, maybe the minimap might help.
Possible, it is called railtypes (see nutracks).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 592
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Michi_cc » 07 Nov 2011 17:02

Kogut wrote:Rail count is weird with tunnels (single tile counts as 4 tracks), airports are missing.
Quoting myself:
Extra costs for track junctions, bridges and tunnels.
To avoid runtime overhead and extra complications, the extra costs are modelled as extra tracks.

And yes, airports are missing, but might get added later.

-- Michael Lutz

Eddi
Tycoon
Tycoon
Posts: 7400
Joined: 17 Jan 2007 00:14

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Eddi » 07 Nov 2011 22:45

maybe you should just hide the "track count" from the user? only display the cost?
You might not exactly be interested in Ferion, but if you are, have fun :)

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 592
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Michi_cc » 07 Nov 2011 22:49

Eddi wrote:maybe you should just hide the "track count" from the user? only display the cost?
Maybe. I simply found it interesting to watch in my game.

-- Michael Lutz

ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by ic111 » 08 Nov 2011 20:05

I also regard this kind of statistics as interesting, one vote for keeping it from me ;-)

User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Dimme » 08 Nov 2011 20:46

ic111 is right that the non-linear scaling is not a good idea.

Just think of the difference between inflation of costs and income... it really kicks in after one or two hundred years, and destroys your game.

Linear costs still make a difference to the cost of buying infrastructure, which is on a pay once and earn forever base.

What might help the early game, would be if you pay no maintenance in the first ten (or so) years after building. (A simplified approach could be to base the maintenance costs on what you owned ten years ago.)
Graphs.png
(10.63 KiB) Downloaded 3 times
Try my modular airports minigame!

Image

User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Post by Dimme » 08 Nov 2011 20:52

...or simpler: let it be linear, but not include the first few hudred tiles of road bits.
Try my modular airports minigame!

Image

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests