Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad refit cost implementation #6597

Closed
DorpsGek opened this issue Aug 3, 2017 · 5 comments
Closed

bad refit cost implementation #6597

DorpsGek opened this issue Aug 3, 2017 · 5 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Aug 3, 2017

mb opened the ticket and wrote:

"refitcost" (e.g., prop 1C for trains) is incorrectly implemented. The specs says "Refit cost, using 50% of the purchase price cost base", giving the impression that 50% of the purchase cost base (£1000 for wagons, using table 4B94) corresponds to the range 0 .. 255. But in fact, it is implemented as a factor, i.e. "1C 01" results into a refit cost of £1000, and "1C FF" results into £255,000, which is absurd, since it would exceed the purchase price of the usual freight wagon by numbers!

In addition, the calculated refit cost value is not handled properly with regards to the actual currency, but is displayed as it is, i.e. £1000 == 1000 DM.

As a result, it is impossible to achieve proper low refitting costs (e.g. 1% of the purchase price), e.g. in combination with CB 15E. E.g., the lowest refit cost achievable for a small and old freight car with a purchase price of 4000 DM would be "1C 01 .. FF" -> 1000 DM. But o/c, the current implementation could also offer 255,000 DM for refitting, but who´d need that!

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6597
@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 4, 2017

adf88 wrote:

Everything is OK here. Spec clearly says that this is a factor which will be multiplied by the base.

Also ranges are all OK. You are just reading the base costs table wrong. These numbers are not in pounds. 1 base cost = 1/1024 pounds. So the base cost for wagon refitting is about £1.95.

"In addition, the calculated refit cost value is not handled properly with regards to the actual currency, but is displayed as it is, i.e. £1000 == 1000 DM." Are you sure? What did you expect and what did you see exactly? It seems to be OK, when I'm changing currencies, the refit cost is displayed correctly.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6597#comment14490

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 4, 2017

mb wrote:

I am talking about a "bad implementation".

Since wagon refit costs should definitely be smaller than wagon purchase prices, it makes no sense to link them to prices in the wagon price table in a static way (i.e. 50%).

The underlying problem is that table 4B94 is "fixed", i.e. it will be used for wagon purchase in any case, there´s no choice. And when using a factor for this table to get higher purchase prices, refit costs are affected as well.

In my case, I´m using a factor of 64 to get a price range up to 128,000, and therefore refit costs are absurdly high.

This problem is related to http://bugs.openttd.org/task/6581, see there.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6597#comment14491

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 4, 2017

adf88 wrote:

"Since wagon refit costs should definitely be smaller than wagon purchase prices" That's questionable. You have a (relatively) wide factors range for wagons (0..255) and for refits (0, 2, 4, ..., 126) with common base. It's up to GRF creator to decide. Perhaps you would like the ranges to be wider?

"it makes no sense to link them to prices in the wagon price table in a static way (i.e. 50%)." Yes, it make sense. It makes implementation simpler (i.e. less price categories) and it's like "realistic" to have refit costs and wagon costs similar since producing a wagon should cost something around modifying it, right? More expensive wagon - more expensive refit, totally with sense. If you would like to be able to set base cost mod separately, then it's another feature request.

I'm not saying that we have "good implementation" but I see no bug here. Or maybe I'm still missing something.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6597#comment14492

@DorpsGek
Copy link
Member Author

mb wrote:

I'm not saying that we have "good implementation" but I see no bug here.
Or maybe I'm still missing something.

Yes, definitely.

I was trying to explain that for "wagon purchase", there´s only one base price. Right? So to get somewhat reasonable purchase prices for "wagons" (and coaches!) in a set for a time frame from 1900 to 2020, and a "wagon" range from the first tiny open freight wagon to the most modern bi-level express coach, you need to use a base cost factor for that wagon purchase base price.

In DBXL I´m using a base cost factor of 64 to get purchase prices up to DM 255,000. Meaning that the smallest refitting cost (factor 1) would be DM 500. Which would be way to expensive for a small freight wagon in 1910, which cost only DM 3000.

It makes implementation simpler (i.e. less price categories)

Well, this is just the typical original TTD heritage. But it makes no longer sense for a game which already got scaled with regards to game time, map size and vehicle number to keep the vehicle set developer restricted in the availability of adequate prices and costs, and thus prevent him from taking advantage of possibilities beyond original TTD.

In addition, the calculated refit cost value is not handled properly with regards to the actual currency, but is displayed as it is, i.e. £1000 == 1000 DM.

Sorry about that, I forgot that "language" and "currency units" are not linked but can be set individually.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6597#comment14521

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 7, 2018
@TrueBrain
Copy link
Member

As far as I understand, everything is as it should be specs. Sorry, going to pass on this. Tnx though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants