Modified transfer payment

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
combuster
Engineer
Engineer
Posts: 9
Joined: 03 Mar 2005 19:29
Location: Utrecht, The Netherlands
Contact:

Modified transfer payment

Post by combuster »

I was recently playing cargodest, and I noticed that the last part of the route generally had negative income.

What happens is that people come off a plane and enter the local transport. They are taken a bit further and then dropped off in town. However, when they drop off, they get negative income, for cargo aging and being transferred closer to its source.
the problem I'm trying to fix here...
the problem I'm trying to fix here...
neg-income.png (106.33 KiB) Viewed 2152 times
I recalled the method original TT used, which would only pay the last vehicle in the chain. It would fix part of the problem as in cargodest trains would reach a final destination for part of its passengers, and not give negative income anywhere. It would however cause the other trains in the chain to make little or no profit, making them look unprofitable, but fixing the slow last step in the chain.

So I thought of the idea of using an approach somewhere in the middle - i.e. when cargo is transferred, only give out a percentage of the transfer income to that vehicle and save the rest for the last in the chain.

I went for a 50% share and added

Code: Select all

profit /= 2;
at a strategic location in economy.cpp (in the transfer code before front_v->profit_this_year += profit << 8 ) and verified that it indeed resulted in positive income for all vehicles, even though the second (and last) step went directly back towards its original location.

It might be an interesting (and probably relatively straightforward) idea to make this a patch setting so one can customize this payment ratio. The net effect on gameplay is that for a hierarchical realistic network layout it should allow all vehicles to have positive profits, rather than having all planes get the profit and being unable to figure to what extent other parts of the network are disfunctional or easily sustained by the providing planes.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Modified transfer payment

Post by planetmaker »

While currently it's not a big deal, it's IMO an interesting approach. Can you make your patch available?
combuster
Engineer
Engineer
Posts: 9
Joined: 03 Mar 2005 19:29
Location: Utrecht, The Netherlands
Contact:

Re: Modified transfer payment

Post by combuster »

Changing the behaviour is easier than adding a patch entry to the menu - will poke the devs on how to do the patch proper.

If you're in a hurry, the new line and the place to insert it are given if you want a quick getaway. :)
leaderfrontier
Traffic Manager
Traffic Manager
Posts: 132
Joined: 01 Aug 2008 03:58

Re: Modified transfer payment

Post by leaderfrontier »

The transfer!

The transfer look like got bug,i have post before and they told me that was bug.
A smile everyday,keep fortune around.
Smile your life before sadness come. :D
combuster
Engineer
Engineer
Posts: 9
Joined: 03 Mar 2005 19:29
Location: Utrecht, The Netherlands
Contact:

Re: Modified transfer payment

Post by combuster »

Hereby the patch and the corresponding entry in the advanced settings dialog (found under economy). Enjoy
Attachments
transfershares.patch
Transfershares patch against r15194
(4.59 KiB) Downloaded 125 times
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 12 guests