Calculating error in 0.5-RC2
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 4
- Joined: 09 Jan 2007 17:40
- Location: Infront of my Computer with my lovely girlfriend in mind
Calculating error in 0.5-RC2
When holding "SHIFT" and removing something I get a notice that tells me what the cost/earn will be but when I then remove or build the money earned/spent isn't the same as in the calc box! It can change with tens of millions! Please solve this problem!
/><0n3
I think that the wiki says that it might not be accurate, so it isn't suppose to as there is a disclaimer. I do think that it should be accurate though
.

Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







I think you'll have to produce a savegame, Xon3, and tell us what operation you performed.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Seconded. Your post was about as useful as a random bunny with a pancake on its head.. Eg 0.0
Please do as DaleStan said or at least be specific.
Please do as DaleStan said or at least be specific.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
He is talking about the cost estimation feature that comes with pressing the shift key, if you build a rail and press the shift key while doing it you will get the red popup that says "Cost estimation: x". The cost estimation can be off from time to time, as said on the wiki (I'm repeating myself)Darkvater wrote:Seconded. Your post was about as useful as a random bunny with a pancake on its head.. Eg 0.0
Please do as DaleStan said or at least be specific.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







Um... Duh? We all know that. Give us at least a little credit.
If every single one was off by tens of millions, don't you think we'd have noticed?
Since we haven't noticed, that must mean that it works most of the time, so we need to know exactly how to make it break.
If every single one was off by tens of millions, don't you think we'd have noticed?
Since we haven't noticed, that must mean that it works most of the time, so we need to know exactly how to make it break.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 4
- Joined: 09 Jan 2007 17:40
- Location: Infront of my Computer with my lovely girlfriend in mind
Well, I don't think that there is something special to make it break but when I i.e. hold shiftkey down and try to even the land where there is lakes and hills it says like sums up to 60 million swedish kronor and when I do the real thing it will cost about only 16 million swedish kronor.
I'll attach a savegame and picture when I come home so after 1500 GMT!
I'll attach a savegame and picture when I come home so after 1500 GMT!
/><0n3
Ah, that.
That is logical. What your estimation does is give you the cummulative cost of clearing ALL water-tiles. That costs 60 million.
But when you actually start doing that you clear 1 tile, pay the full price and for the second one (next to the already terrformed, raised tile) you pay less because a part is already raised and is land.
Shift is an estimation and cannot take into effect any side-effects other parts of the command will actually cause.
That is logical. What your estimation does is give you the cummulative cost of clearing ALL water-tiles. That costs 60 million.
But when you actually start doing that you clear 1 tile, pay the full price and for the second one (next to the already terrformed, raised tile) you pay less because a part is already raised and is land.
Shift is an estimation and cannot take into effect any side-effects other parts of the command will actually cause.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
I still can't reproduce this, so I, at least, would still like to see a savegame.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
The topic poster probably means something like the attachment.
- Attachments
-
- estimation_vs_actual.png (29.89 KiB) Viewed 2870 times
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Xon3: what happens here is that for the estimation no actual modifications are done, what basically happens is that cost to raise every tile edge within that rectangle is going to be calculated. However, as you are building on water, clearing a tile costs a lot of money; for every tile's edge that is going to be raised, it says has to clear 4 tiles. In reality you have to clear much less tiles, as the tiles that need to be cleared overlap.
This explains the about factor 4 difference in the estimated and real cost.
It is, however, not feasible to do the check with modifications, as one needs to store the whole state of the game, perform the modifications to determine the actual cost and restore the game to the state before the modifications were done.
As the same (code-)path is used to determine whether you are performing a valid command (especially in the game server), it will mean that for every action a user does, the state has to be stored and restored.
This can cost so much time on a heavily loaded multiplayer server, that OpenTTD would become unplayable. Therefore the decision has been made to make the estimate without actually performing the modifications, which can cause a difference in estimation when the costs of modification are influenced by modifications done in the same command on neighbouring tiles.
I hope it clears up Darkvater's comment that it is not a bug.
This explains the about factor 4 difference in the estimated and real cost.
It is, however, not feasible to do the check with modifications, as one needs to store the whole state of the game, perform the modifications to determine the actual cost and restore the game to the state before the modifications were done.
As the same (code-)path is used to determine whether you are performing a valid command (especially in the game server), it will mean that for every action a user does, the state has to be stored and restored.
This can cost so much time on a heavily loaded multiplayer server, that OpenTTD would become unplayable. Therefore the decision has been made to make the estimate without actually performing the modifications, which can cause a difference in estimation when the costs of modification are influenced by modifications done in the same command on neighbouring tiles.
I hope it clears up Darkvater's comment that it is not a bug.
Didn't I just say that a few days ago?Darkvater wrote:Ah, that.
That is logical. What your estimation does is give you the cummulative cost of clearing ALL water-tiles. That costs 60 million.
But when you actually start doing that you clear 1 tile, pay the full price and for the second one (next to the already terrformed, raised tile) you pay less because a part is already raised and is land.
Shift is an estimation and cannot take into effect any side-effects other parts of the command will actually cause.

TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Who is online
Users browsing this forum: No registered users and 6 guests