Page 1 of 6

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

Posted: 06 Nov 2011 18:27
by Michi_cc
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.
Detailed infrastructure overview in a game that ran much too long with inflation enabled.
Detailed infrastructure overview in a game that ran much too long with inflation enabled.
infra_maint2.png (59.15 KiB) Viewed 17721 times
-- Michael Lutz

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 20:58
by Supercheese
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).

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 21:11
by Michi_cc
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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 21:18
by ic111
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...

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 21:32
by Michi_cc
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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 21:51
by Eddi
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.

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 21:57
by ic111
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.

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 06 Nov 2011 22:03
by ic111
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"?

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 06:20
by Logital82
What about compatibility with nutracks? And is there a binary?

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 06:58
by Kogut
I suggest to add this button to money window (as it is supposed to contain information about significant spending).

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 09:29
by Eddi
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?

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 09:33
by Kogut
Rail count is weird with tunnels (single tile counts as 4 tracks), airports are missing.

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 12:00
by ic111
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.

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 12:02
by Kogut
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).

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 17:02
by Michi_cc
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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 22:45
by Eddi
maybe you should just hide the "track count" from the user? only display the cost?

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 07 Nov 2011 22:49
by Michi_cc
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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 08 Nov 2011 20:05
by ic111
I also regard this kind of statistics as interesting, one vote for keeping it from me ;-)

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 08 Nov 2011 20:46
by Dimme
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
Graphs.png (10.63 KiB) Viewed 1585 times

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch

Posted: 08 Nov 2011 20:52
by Dimme
...or simpler: let it be linear, but not include the first few hudred tiles of road bits.