New Patch: Transfers fix RC2
Moderator: OpenTTD Developers
New Patch: Transfers fix RC2
Transfer Fix: RC2
This patch fixes the transfer system, but needs thorough testing. The value earned by each stage of each journey makes sense - a truck moving it 10 tiles earns 10 tiles worth. When the journey is complete, the accumulated credits for all transfers along the way is paid in real money. Only the last vehicle earns real money, and is paid for the journey time of the goods across the distance from original source to destination. All transfer vehicles show profit in their accounts, but the company accounts are unchanged.
This transfer system does not charge the vehicle on pickup, and so randomly make profitable routes be annually unprofitable just due to where the year starts. If you earn £15000 in the year, you earn it.
You cannot cheat the system by transferring a cargo far away, and returning it to a local destination. The last vehicle in the chain will likely make a big loss if you try this (see the piccy).
Generally it handles combined production and transfer locations well if there are vehicles waiting to load. However, until cargo packets appears, there is no real way to remember the destination when local production overrides it. However, the transfer credit will remain at the station and be picked up with any loaded cargo, so some vehicle will pay the transfer cost.
This may create the most realistic transfer system: transfer to a non-producing collector station, and deliver long distance from there.
You will find final transfers are rather more colourful, showing the vehicles profit as red or green, and the transfer credits as yellow or red. Also, in the vehicle guis is a new item to show what transfer credit the vehicle is carrying. (Found on the Cargo panel for trains.)
So please test, and feed back comments.
For screens, see the rest of the thread!
Incidentally, the worst possible thing to happen at a transfer location is for the rating to drop to "Appalling". At this point, the cargo starts disappearing, but it leaves its transfer fees cost to be passed on. So it is possible to then load 1 tonne, and be charged tens of thousands to do so!! Ouch!! (This may be a bug - if the cargo disappears, maybe the transfer fee should too.)
This patch fixes the transfer system, but needs thorough testing. The value earned by each stage of each journey makes sense - a truck moving it 10 tiles earns 10 tiles worth. When the journey is complete, the accumulated credits for all transfers along the way is paid in real money. Only the last vehicle earns real money, and is paid for the journey time of the goods across the distance from original source to destination. All transfer vehicles show profit in their accounts, but the company accounts are unchanged.
This transfer system does not charge the vehicle on pickup, and so randomly make profitable routes be annually unprofitable just due to where the year starts. If you earn £15000 in the year, you earn it.
You cannot cheat the system by transferring a cargo far away, and returning it to a local destination. The last vehicle in the chain will likely make a big loss if you try this (see the piccy).
Generally it handles combined production and transfer locations well if there are vehicles waiting to load. However, until cargo packets appears, there is no real way to remember the destination when local production overrides it. However, the transfer credit will remain at the station and be picked up with any loaded cargo, so some vehicle will pay the transfer cost.
This may create the most realistic transfer system: transfer to a non-producing collector station, and deliver long distance from there.
You will find final transfers are rather more colourful, showing the vehicles profit as red or green, and the transfer credits as yellow or red. Also, in the vehicle guis is a new item to show what transfer credit the vehicle is carrying. (Found on the Cargo panel for trains.)
So please test, and feed back comments.
For screens, see the rest of the thread!
Incidentally, the worst possible thing to happen at a transfer location is for the rating to drop to "Appalling". At this point, the cargo starts disappearing, but it leaves its transfer fees cost to be passed on. So it is possible to then load 1 tonne, and be charged tens of thousands to do so!! Ouch!! (This may be a bug - if the cargo disappears, maybe the transfer fee should too.)
- Attachments
-
- transfers_fix_rc2.patch
- Built against r8523.
- (19.15 KiB) Downloaded 221 times
Last edited by richk67 on 02 Feb 2007 00:39, edited 2 times in total.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
buying and selling cargo... well, it'd work in Elite. You'd have to hide this from the player in TTD, though, since they're only transporting cargo that belongs to some other entity.
A far simpler solution might be to simply take the maximum of last year's profit and the year before's profit. THen, unless every delivery happened to be just after new year, you're very likely to show profit for profitable services.
A far simpler solution might be to simply take the maximum of last year's profit and the year before's profit. THen, unless every delivery happened to be just after new year, you're very likely to show profit for profitable services.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
This problem can be generalized to any transport route when the route is very long.
By exemple, I have train lines where the trains need more than one year to deliver goods and come back.
Because of this, I have like -100 000$ for a train and the next year, +500 000$ then -100 000$ the folloing year, etc.
Because of this, I always have 0 to this score rating.
By exemple, I have train lines where the trains need more than one year to deliver goods and come back.
Because of this, I have like -100 000$ for a train and the next year, +500 000$ then -100 000$ the folloing year, etc.
Because of this, I always have 0 to this score rating.
Thats just designing routes that are too long. I dont think of this as a way around bad route planning, but correcting a transfer-specific failing.
If your round trip takes too long (ie. > 1 year) the system should not forgive you. That would then be a different target: "average profit of xxxxx in 2 years", rather than "minimum profit of yyyyy in 1 year". I have no problem with the target, but I do have a problem that transfer guarantee to make a profitable service (inside 12 months), be occasionally unprofitable just due to the transfer mechanics.
@Brianetta: With transfers the system already assigns a -ve charge on pickup (watch that profit tumble sometime!!
), so in a sense it already "buys" the cargo anyway. The way I propose just hides this from being accounted for until the revenue is earned.
If your round trip takes too long (ie. > 1 year) the system should not forgive you. That would then be a different target: "average profit of xxxxx in 2 years", rather than "minimum profit of yyyyy in 1 year". I have no problem with the target, but I do have a problem that transfer guarantee to make a profitable service (inside 12 months), be occasionally unprofitable just due to the transfer mechanics.
@Brianetta: With transfers the system already assigns a -ve charge on pickup (watch that profit tumble sometime!!

OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
-
- Engineer
- Posts: 6
- Joined: 10 Oct 2006 20:26
And here is the fix:
This patch pays each vehicle for their contribution to the journey. If the journey does not reach the final destination, the it is paid "virtual" yellow money, and that credit note is passed to the transfer station.
The next vehicle picks up the cargo, and its proportion of the credit notes. These are passed on down the chain, and eventually, the last vehicle reaches its destination.
Here, that vehicle is paid for its contribution for the journey, and all the credit notes are cashed in, into the general pot for that vehicle type. So, in the screenie below, the oil tanker was carrying £33,758 of credit notes, but its own profit only received its own contribution: £18,922. All the other vehicles in the chain have their pseudo-money.
Net result: overall your company bank balance has increased by the correct grand total. Each individual vehicle shows the profit it made from its contribution to the total journey.
[edit] I noticed when I switched a delivery from normal to transfer, that the value of the transfer jumped 50%!!! I discovered that a rogue * 3/2 was in the code. The new patch corrects this bug as well. Transfers now reflect their correct value.
This patch pays each vehicle for their contribution to the journey. If the journey does not reach the final destination, the it is paid "virtual" yellow money, and that credit note is passed to the transfer station.
The next vehicle picks up the cargo, and its proportion of the credit notes. These are passed on down the chain, and eventually, the last vehicle reaches its destination.
Here, that vehicle is paid for its contribution for the journey, and all the credit notes are cashed in, into the general pot for that vehicle type. So, in the screenie below, the oil tanker was carrying £33,758 of credit notes, but its own profit only received its own contribution: £18,922. All the other vehicles in the chain have their pseudo-money.
Net result: overall your company bank balance has increased by the correct grand total. Each individual vehicle shows the profit it made from its contribution to the total journey.
[edit] I noticed when I switched a delivery from normal to transfer, that the value of the transfer jumped 50%!!! I discovered that a rogue * 3/2 was in the code. The new patch corrects this bug as well. Transfers now reflect their correct value.
- Attachments
-
- Extended Example: Vehicle 1 delivers its coal directly from Drenway Mines for £247.
- Drenway Transport, 11th Mar 1951.png (80.83 KiB) Viewed 4547 times
-
- Oil tanker (a single stage transfer) delivers its cargo for £18922 credited to its profit, and a further £33758 credited to the main account for earlier uncredited transfers.
- RichK Transport, 21st Oct 2019.png (71.08 KiB) Viewed 4548 times
-
- transfers_fix_2.patch
- This patch includes a bump to the savegame, so games saved with this patch cannot be reloaded into trunk. Includes correction to transfer calculation bug (* 3/2).
- (6.5 KiB) Downloaded 206 times
Last edited by richk67 on 29 Jan 2007 02:42, edited 1 time in total.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Follow up post to add extra screens to extended example:
[edit] Due to the bug described above (the *3/2) the values in my original screenies were wrong. Here are the new ones - and good grief - they make sense!
Vehicle 1 drops off its transfer, and earns £101. This is passed to the station, where vehicle 2 picks it up.
Vehicle 2 arrives at the third station, and is paid £57 for its cargo. This credit is passed to the station, where Vehicle 3 picks it up.
Vehicle 3 arrives at the power station. It is paid for the source->destination fee (£240 - slightly slower than direct truck above) minus the accumulated intermediate steps (£158).
To demonstrate that these are good numbers:
Veh 1: travels 7 tiles for £101. £14.4 per tile
Veh 2: travels 4 tiles for £57. £14.25 per tile
Veh 3: travels 6 tiles for £82. £13.66 per tile
Each gets what they should for their journey, although the money for Veh 1 and 2 doesnt reach the bank until Veh 3 cashes in.
[edit] Due to the bug described above (the *3/2) the values in my original screenies were wrong. Here are the new ones - and good grief - they make sense!
Vehicle 1 drops off its transfer, and earns £101. This is passed to the station, where vehicle 2 picks it up.
Vehicle 2 arrives at the third station, and is paid £57 for its cargo. This credit is passed to the station, where Vehicle 3 picks it up.
Vehicle 3 arrives at the power station. It is paid for the source->destination fee (£240 - slightly slower than direct truck above) minus the accumulated intermediate steps (£158).
To demonstrate that these are good numbers:
Veh 1: travels 7 tiles for £101. £14.4 per tile
Veh 2: travels 4 tiles for £57. £14.25 per tile
Veh 3: travels 6 tiles for £82. £13.66 per tile
Each gets what they should for their journey, although the money for Veh 1 and 2 doesnt reach the bank until Veh 3 cashes in.
- Attachments
-
- Vehicle 3 arrives at the power station. It is paid for the source->destination fee (£245) minus the accumulated intermediate steps (£158).
- Drenway Transport, 16th Sep 1950.png (86.03 KiB) Viewed 4515 times
-
- Vehicle 2 arrives at the third station, and is paid £57 for its cargo. This credit is passed to the station, where Vehicle 3 picks it up.
- Drenway Transport, 6th Sep 1950.png (88.15 KiB) Viewed 4516 times
-
- Vehicle 1 drops off its transfer, and earns £101. This is passed to the station, where vehicle 2 picks it up.
- Drenway Transport, 25th May 1950.png (84.62 KiB) Viewed 4516 times
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
-
- Transport Coordinator
- Posts: 307
- Joined: 20 Jul 2005 16:27
- Location: Montreal
Transfer Fix: RC1
This patch fixes the transfer system, but needs thorough testing. The value earned by each stage of each journey makes sense - a truck moving it 10 tiles earns 10 tiles worth. When the journey is complete, the accumulated credits for all transfers along the way is paid in real money. Only the last vehicle earns real money, and is paid for the journey time of the goods across the distance from original source to destination. All transfer vehicles show profit in their accounts, but the company accounts are unchanged.
This transfer system does not charge the vehicle on pickup, and so randomly make profitable routes be annually unprofitable just due to where the year starts. If you earn £15000 in the year, you earn it.
You cannot cheat the system by transferring a cargo far away, and returning it to a local destination. The last vehicle in the chain will likely make a big loss if you try this (see the piccy).
Generally it handles combined production and transfer locations well if there are vehicles waiting to load. However, until cargo packets appears, there is no real way to remember the destination when local production overrides it. However, the transfer credit will remain at the station and be picked up with any loaded cargo, so some vehicle will pay the transfer cost.
This may create the most realistic transfer system: transfer to a non-producing collector station, and deliver long distance from there.
You will find final transfers are rather more colourful, showing the vehicles profit as red or green, and the transfer credits as yellow or red. Also, in the vehicle guis is a new item to show what transfer credit the vehicle is carrying. (Found on the Cargo panel for trains.)
So please test, and feed back comments.
This patch fixes the transfer system, but needs thorough testing. The value earned by each stage of each journey makes sense - a truck moving it 10 tiles earns 10 tiles worth. When the journey is complete, the accumulated credits for all transfers along the way is paid in real money. Only the last vehicle earns real money, and is paid for the journey time of the goods across the distance from original source to destination. All transfer vehicles show profit in their accounts, but the company accounts are unchanged.
This transfer system does not charge the vehicle on pickup, and so randomly make profitable routes be annually unprofitable just due to where the year starts. If you earn £15000 in the year, you earn it.
You cannot cheat the system by transferring a cargo far away, and returning it to a local destination. The last vehicle in the chain will likely make a big loss if you try this (see the piccy).
Generally it handles combined production and transfer locations well if there are vehicles waiting to load. However, until cargo packets appears, there is no real way to remember the destination when local production overrides it. However, the transfer credit will remain at the station and be picked up with any loaded cargo, so some vehicle will pay the transfer cost.
This may create the most realistic transfer system: transfer to a non-producing collector station, and deliver long distance from there.
You will find final transfers are rather more colourful, showing the vehicles profit as red or green, and the transfer credits as yellow or red. Also, in the vehicle guis is a new item to show what transfer credit the vehicle is carrying. (Found on the Cargo panel for trains.)
So please test, and feed back comments.
- Attachments
-
- Train 1 has been naughty and collected a long distance transfer (which had been well paid), and returned it to near its start point. However, even so, the *route* A-C is profitable at £1688, even if B-C made a big loss.
- Wuntfingfield Transport, 10th Jan 1951.png (47.03 KiB) Viewed 4339 times
-
- transfers_fix_rc1.patch
- Patch built against trunk r8441.
- (19.17 KiB) Downloaded 208 times
Last edited by richk67 on 30 Jan 2007 20:16, edited 1 time in total.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
New RC2 posted in first post of thread.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Great, thanks!
Richk67, thank you for your work! It looks like you have fixed a long-standing issue with transfers. Now realistic transfer schemes are finally possible and that was the only missing bit of real action for me.
Dear developers, is there any chance we can have this included in 5.0 final?
If there's anything I can do to help to move this forward, please let me know.
Dear developers, is there any chance we can have this included in 5.0 final?
If there's anything I can do to help to move this forward, please let me know.
Who is online
Users browsing this forum: No registered users and 7 guests