Page 1 of 1

New Patch: Transfers fix RC2

Posted: 27 Jan 2007 20:22
by richk67
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.)

Posted: 28 Jan 2007 14:35
by Brianetta
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.

Posted: 28 Jan 2007 15:41
by MagicBuzz
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.

Posted: 28 Jan 2007 16:44
by richk67
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.

Posted: 28 Jan 2007 18:53
by Xenofungus
profit per route + route avg time would extrapolate a better profit rating

still if first year you lose 100k and next year you gain 500k, a +200k every year would not make much sense

Posted: 28 Jan 2007 20:00
by Bot_40
Well the real problem lies in the fact that the goals for the company ratings are simply retarded.

Posted: 28 Jan 2007 23:33
by richk67
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.

Posted: 28 Jan 2007 23:49
by richk67
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.

Posted: 29 Jan 2007 23:55
by CPCNMAN007
Very bizarre :?

Posted: 30 Jan 2007 03:42
by richk67
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.

Posted: 30 Jan 2007 17:49
by Haukinger
Am I the only one who can't download this patch ?

Posted: 02 Feb 2007 00:40
by richk67
New RC2 posted in first post of thread.

Posted: 02 Feb 2007 09:04
by Wolf01
great patch, you did a good work Richk67

Great, thanks!

Posted: 04 Feb 2007 19:38
by Maxx
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.