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

User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by ChillCore »

TrueBrain wrote: WOW! I JUST PLAYED THIS PATCH WITH 2 OTHER DEVS ON A SERVER! IT WAS f*** EPIC!
I knew this was going to happen. :lol:



In the meantime I found some real feedback. ;)

- Ship depots and buoys do not count towards company assets.
- The locks only count for two tiles, IMHO they should count like bridges (3+) if possible.
- ¿1 airport instead of many airport tiles?
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Eddi »

i may have said this before, or only thought of this: each entry on the finance window should get a "details" window, accessed by something like a [?]-Button next to the value. (for vehicles this will open the vehicle lists, for others some statistic window like the maintenance one)
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

ChillCore wrote: - Ship depots and buoys do not count towards company assets.
Buoys don't count because they don't have an owner and can by used by any company. Ship depots I could add if wanted.
ChillCore wrote: - The locks only count for two tiles, IMHO they should count like bridges (3+) if possible.
Locks right now don't count at all, only the water underneath. And that can be from 1 to 3 owned tiles (the slope is always owned canal). Adding the lock itself separately probably makes sense.
ChillCore wrote:- ¿1 airport instead of many airport tiles?
Counting airports by tile doesn't make sense as for example the city and the metropolitan airport are both 6x6 even if the metropolitan can handle more aircraft. Because of that I opted to assign maintenance costs based on airport type and not number of tiles.

-- Michael Lutz
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by ChillCore »

Michi_cc wrote:
ChillCore wrote: - Ship depots and buoys do not count towards company assets.
Buoys don't count because they don't have an owner and can by used by any company.
I did not know that buoys do not have owners ... now I do.
michi_cc wrote: Ship depots I could add if wanted.
Yes please, they are counted for road and rail too.
Michi_cc wrote:
ChillCore wrote: - The locks only count for two tiles, IMHO they should count like bridges (3+) if possible.
Locks right now don't count at all, only the water underneath. And that can be from 1 to 3 owned tiles (the slope is always owned canal).
Something else I did not know.
Michi_cc wrote: Adding the lock itself separately probably makes sense.
Yes please ... would make sense a lot.
¿Make it count for "watertiles/canal tiles + 7 pieces" (read: three tiles of concrete and four heavy doors to retain the water)? :twisted:
Michi_cc wrote:
ChillCore wrote: - ¿1 airport instead of many airport tiles?
Counting airports by tile doesn't make sense as for example the city and the metropolitan airport are both 6x6 even if the metropolitan can handle more aircraft. Because of that I opted to assign maintenance costs based on airport type and not number of tiles.
Makes sense too, I did not think of it that way ... ¿maybe add a hangar count for airports that have a hanger? Although that might make the code too complicated at this stage ...



Thank you for taking the time to learn me a few new things about OpenTTD. ;)
Regards,
ChillCore.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Eddi »

ChillCore wrote:
Michi_cc wrote:
ChillCore wrote: - ¿1 airport instead of many airport tiles?
Counting airports by tile doesn't make sense as for example the city and the metropolitan airport are both 6x6 even if the metropolitan can handle more aircraft. Because of that I opted to assign maintenance costs based on airport type and not number of tiles.
Makes sense too, I did not think of it that way ... ¿maybe add a hangar count for airports that have a hanger? Although that might make the code too complicated at this stage ...
each Airport should just have one [NewGRF-adjustable] maintenance factor property. no fancy size calculation.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

Eddi wrote: each Airport should just have one [NewGRF-adjustable] maintenance factor property. no fancy size calculation.
Should I feel lucky now that this is exactly what I've already implemented? 8)

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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Logital82 »

So, where is the multiplicator for the maintenance costs?
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by ChillCore »

There are none to tweak unless you change and recompile the source.
All you need to do is enable the patch as described in the first post the rest goes automatic.
You can always use (or make) a basecost NewGRF if you want more control over that. ;)


If you want a better understanding of how exactly it works ... just start a new (test) game and experiment a bit with building stuff.
While doing so ... keep the company overview gui (the one that has your manager picture) open and build some stuff while keeping an eye on the pieces/sections count. eg. Build a rail section on a tile and notice the count being 1, now add a few rail sections on the same tile and notice that when you use all six directions at the same time your rail sections count is 36 instead of 6.
This adds up really quickly and makes for a fun challenge.


ps:
Yes, I know ... mostly copy paste from another thread where I explained this. ;)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

Based on the feedback and play-testing I've updated YAIM to release 3.1. Binaries are again at http://www.openttd.org/en/download-yaim.

Changes:
  • Tuned base costs for rail, stations and airports (read: made it harder). Should still be good according to our multiplayer test, but please do report back.
  • Locks and ship depots now count extra.
  • Infrastructure window now shows cost per year instead of per month.
  • Infrastructure details now also accessible from the finance window.
-- Michael Lutz
Attachments
yaim_v3_1.patch
git patch for r23392
(99.7 KiB) Downloaded 163 times
Last edited by Michi_cc on 03 Dec 2011 12:59, edited 1 time in total.
User avatar
Dwight_K._Schrute
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Sep 2010 11:29

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Dwight_K._Schrute »

What do those numbers in pricebase.h actually mean?

I loaded a longlasting game of mine with v3.0 where I have about 5 Mio € profit/year. And the costs for the rail infrastructure are waaaay too low for me (3.300 € + 14.000 € for stations). If I want to double the costs I just have to double this value in pricebase.h?

EDIT: An what is the concept for railtypes? It is a big difference if you play with swedish rails or with nutracks. The non-linear effect gets totally lost if the total number of track tiles splits up in a lot of railtypes.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

Dwight_K._Schrute wrote:If I want to double the costs I just have to double this value in pricebase.h?
Yes, that's it, basically. The "Running cost" difficulty settings also has an effect.

With a rail cost of only 3.300 € though you can't have that many track pieces. The costs will hit you a lot harder when you have a significant pieces (> 10.000).
Dwight_K._Schrute wrote:EDIT: An what is the concept for railtypes? It is a big difference if you play with swedish rails or with nutracks. The non-linear effect gets totally lost if the total number of track tiles splits up in a lot of railtypes.
Each rail type counts separately as it would otherwise not be possible to allow different cost bases per rail type.

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

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Logital82 »

But why is it progressive? It should be linear or degressive.
WWW
President
President
Posts: 920
Joined: 28 Jan 2005 20:37

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by WWW »

Logital82 wrote:But why is it progressive? It should be linear or degressive.
Because the profit curve in OpenTTD is exponential. The purpose of this patch is to balance that effect out.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

There's a tiny, tiny bug in V3.1 where the value shown for the signal cost in the infrastructure details window is accidentally multiplied by 15 instead of by 12, so it is not "per year" but "per 15 months" :) (Thanks ChillCore)

As this is purely a GUI bug, I won't release an update just for this.

-- Michael Lutz
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by ChillCore »

Michi_cc wrote: There's a tiny, tiny bug in V3.1 where the value shown for the signal cost in the infrastructure details window is accidentally multiplied by 15 instead of by 12, so it is not "per year" but "per 15 months" :) (Thanks ChillCore)
My pleasure.
Looking forward to testing your new version (as soon as RL activities permit).
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

Nobody though YAIM totally stupid, so I've gone ahead and commit that stuff to trunk.

The first beta release of 1.2.0 should not be too far off, so it would be a very good idea to speak up before that if you think any of the maintenance base costs or rail/airport type cost factors should be changed.

-- Michael Lutz
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by fabca2 »

Hi,
nice idea.
And why not add this factor as part of difficulty template :
- normal : 1x
- easy : 0.5x
- hard : 2x
- custom : from 0x (no extra cost, like today) to 4x

Regards.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by michael blunck »

Another idea would be the introduction of a "maintenance cost factor" into the railtypes feature, which already offer a "construction cost factor". In addition, this would be along the lines of vehicles, which allow to set factors for building cost and maintenance by newGRFs.

regards
Michael
Image
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by Michi_cc »

fabca2 wrote: And why not add this factor as part of difficulty template :
Already possible via (a) the "vehicle running cost" difficulty settings and (b) a base cost NewGRF.
michael blunck wrote:Another idea would be the introduction of a "maintenance cost factor" into the railtypes feature, which already offer a "construction cost factor".
Already implemented, I just didn't add it to the specs yet, which I have now rectified.

-- Michael Lutz
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Re: YAIM - (Yet Another) Infrastructure Maintenance Patch (V

Post by fabca2 »

Michi_cc wrote:Already possible via (a) the "vehicle running cost" difficulty settings...
so the "vehicule running cost" setting drive both running cost and infrastructure maintenance, that very nice!

maybe can we rename it to "vehicule running and infra maintenance cost".
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests