PATCH: Lost Cargo Cost
Moderator: OpenTTD Developers
PATCH: Lost Cargo Cost
Hello all!
This is my first patch for OpenTTD. I decided to play a game where all passengers are satisfied. I always kept on my eyes on rating of stations and tried to keep the rating above 50% for not to loose the cargo. Now the lost cargo can cost money for the company who owns the station. So you have to keep all your stations ratings on good or else it will cost some money for you.
One screenshot explains everything: The cost is calculated by ( lost_cargo * cs->current_payment ) equation. Any idea how to be better?
This is my first patch for OpenTTD. I decided to play a game where all passengers are satisfied. I always kept on my eyes on rating of stations and tried to keep the rating above 50% for not to loose the cargo. Now the lost cargo can cost money for the company who owns the station. So you have to keep all your stations ratings on good or else it will cost some money for you.
One screenshot explains everything: The cost is calculated by ( lost_cargo * cs->current_payment ) equation. Any idea how to be better?
- Attachments
-
- lostcargo-1.3.2.diff.gz
- Lost Cargo Cost diff against the stable 1.3.2
- (2.91 KiB) Downloaded 280 times
Re: PATCH: Lost Cargo Cost
Good idea to gain some insight on how much cargo a company is missing out.
However, lost cargo is not actually an expense is it? So to me it seems is a bit out of place as an expense in the finance window.
cheers
However, lost cargo is not actually an expense is it? So to me it seems is a bit out of place as an expense in the finance window.
cheers
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: PATCH: Lost Cargo Cost
As if it were an argument: it's realisticzooks wrote:Good idea to gain some insight on how much cargo a company is missing out.
However, lost cargo is not actually an expense is it? So to me it seems is a bit out of place as an expense in the finance window.
cheers

You made a transportation contract and simply dump the cargo into a waste bin to let it rot (or drop people in the middle of no-where). That usually results in fines or contract penalties

OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: PATCH: Lost Cargo Cost
I like the idea, but wonder how effective it is.
Did you try it with a few savegames from others?
In my experience, only new users are not very careful about cargo delivery. Experienced players tend to make sure they move everything they get.
That means that the new users get hit by this patch, rather than the more experienced players.
Did you try it with a few savegames from others?
In my experience, only new users are not very careful about cargo delivery. Experienced players tend to make sure they move everything they get.
That means that the new users get hit by this patch, rather than the more experienced players.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: PATCH: Lost Cargo Cost
Actually, one of the problems with cargo rating is that it doesn't take into account turnover at all nor the time cargo is waiting at a station. Thus if you have a station with very high throughput, you easily have an abysmal rating, as there on average might be waiting a few hundret units of cargo. But you pick it up within a game day. Only to have that many delivered again the next one. This probably would need addressing somewhat as well or this would penalize high-frequency transfer terminals quite a lot where service de-facto is quite excellent.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: PATCH: Lost Cargo Cost
IMO, such a feature shouldn´t be addressed locally and on a narrow timeframe, but rather globally and by accounting on a yearly basis ("penalty"), if at all.
regards
Michael
regards
Michael
Re: PATCH: Lost Cargo Cost
You can see the cargo leak realtime on the map, and of course it is shown on the finance window with yearly summary of all. Watch attached screenshot.michael blunck wrote:IMO, such a feature shouldn´t be addressed locally and on a narrow timeframe, but rather globally and by accounting on a yearly basis ("penalty"), if at all.
You're right; i've developed this patch last night, so there was no too much testing. And because of the new option in settings, it is not compatible with previous savegames. :-/Alberth wrote:I like the idea, but wonder how effective it is.
Did you try it with a few savegames from others?
In my experience, only new users are not very careful about cargo delivery. Experienced players tend to make sure they move everything they get.
That means that the new users get hit by this patch, rather than the more experienced players.
I think the most of the patches make the game harder, so you're right again: unexperienced user can turn it off, like infrastructure maintenance, noise levels, recessions, etc.
Phh... I don't wanna change the original station rating algorithm (yet ;->). If OpenTTD says it's bad, then this patch make it worse.planetmaker wrote:Actually, one of the problems with cargo rating is that it doesn't take into account turnover at all nor the time cargo is waiting at a station. Thus if you have a station with very high throughput, you easily have an abysmal rating, as there on average might be waiting a few hundret units of cargo. But you pick it up within a game day. Only to have that many delivered again the next one. This probably would need addressing somewhat as well or this would penalize high-frequency transfer terminals quite a lot where service de-facto is quite excellent.
I'm still planning how the cost should be generated, now it's not too expensive for an average company. I think is enough fair. So if you have a big station with thousands of cargo then the cost of lost cargo will be a minimum amount compare to the profit (like running costs).
Re: PATCH: Lost Cargo Cost
i have a minor suggestion: could the cost animation also show accumulated transfer income that is lost?
(that would be useful even when the cost is set to 0)
(that would be useful even when the cost is set to 0)
Re: PATCH: Lost Cargo Cost
Perhaps show the amount in yellow with a negative sign. Just as transfer income is differed using yellow.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PATCH: Lost Cargo Cost
Sorry folks, i have no idea how to detect transferred cargo. :-/ The original algorithm just throw out some random packets of cargo without any checking. I'm interested in anyone's help.
Re: PATCH: Lost Cargo Cost
@planetmaker and follow-ups: Since r25362 cargo waiting at other stations is considered for the rating at the origin station.
The guy on the picture is not me, it's Alonso.
Re: PATCH: Lost Cargo Cost
The accumulated transfer payment is stored in the cargopacket, so in StationCargoList::Truncate you'd have to gather this information for the dropped packets.
something else i noticed: you use st->rect to display the cost animation, but you probably should use st->xy (location of the station sign) instead.
something else i noticed: you use st->rect to display the cost animation, but you probably should use st->xy (location of the station sign) instead.
Who is online
Users browsing this forum: Bing [Bot] and 3 guests