News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

[Bug] Insane city building valuation

Started by Ranran(retired), August 05, 2020, 12:48:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

Compare the cost of buying a house with the amount of money you destroy house.
Buying a house seems to cost about 100 times more than destroying it. (´・ω・`)
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Mariculous


Ranran(retired)

It seems that we can certainly buy land for 1/100 of the land price displayed in the building information window.
But I wonder if it's really that expensive.
Because when you draw a railroad track, you pay the removal cost and the price of the land as shown there. This means that it will cost more than 100 times the current cost.

Even when destroying a building, it can be destroyed at a price of 1/100 of the building price. They are kind-hearted people who evict for just that amount of money.

Also very strange is that the land price and the building price are separate, but you don't have to buy the land when you buy the building.

For example, the coordinates (493,27) in demo.sve show that the building price is 2640¢ and the land price is 8800¢.
It costs just 24¢ to destroy it.
Buying the house costs 2640¢. I paid 2640¢ to get 8800¢ in land. Then I destroyed the building that became mine. It cost 112¢. Why??? Why does it cost 5 times more than destroying it directly?
24 + 88 = 112?
It's my house, can you buy land when it's destroyed? Certainly I didn't pay for the land when I bought the house.
I installed a marker there. It cost just 88¢. Of course, if remove the marker then 88¢ will return.

I'm not sure about the price of land. At least when building the way, no such high cost is paid. At least these units seem to have a strange discrepancy.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ranran(retired)

I have researched this bug, and the extended citybulding valuation calculation is insane, and inconsistent in its behavior.

First of all, here's the gist:
- This is not a simple bug of incorrect display.
- As far as I can see from the code, the numbers are converted from internal values to simucent. Therefore, the calculation is abnormal.
- Inconsistent price calculations for buying / building / removing a city building
- The removal cost of citybuilding is based on cost_multiply_station, not cost_multiply_remove_haus.


When buying tiles, I think "land value + building valuation" is reasonable.
The formula for showing the purchase cost of the building and the actual purchase is the same, as follows.
(welt->get_land_value(get_pos))*(tile->get_desc()->get_level()) / 100) * 5
i.e., land value x level(building height) x 5
This means that the cost of buying city building tiles is many times the price of the land.
And in the comments it is explained like this
// Developed land is more valuable than undeveloped land.
I have no objection to this, but I think that multiplying it based on the price of land makes the price very high. Land prices in the center of the city are high. And there will be a building with a high "level". Imagine how expensive it becomes or check the prices of buildings in the center of the city. However, note that it is used only for display and purchase, and a completely different formula is used for removal and construction. Therefore, purchases are paid at exorbitant prices based on this formula, but removal and construction are much cheaper than this due to another calculation.


I notice that the removal cost of citybuilding is somehow based on cost_multiply_station, not cost_multiply_remove_haus. see gebaeude_t::cleanup().
This is because cost = welt->get_settings().cst_multiply_remove_haus * (desc->get_level()); is placed in an if statement that never meets the condition for citybuildings.
I suspect that the differences (and bug) with standard on this have existed for more than 12 years. It looks like the cst_multiply_station and cost_multiply_remove_haus are swapped unintentionally.
Since cost_multiply_station is not a factor for removal, it will be further halved when calculating for removal.
And the default values for these are like this

cst_multiply_station=-60000;
cst_multiply_remove_haus=-100000;

That is, currently only 30% of the estimated cost of removing the citybuildings has been collected. It should also be noted that cost_multiply_remove_haus is still used for the purchase and construction of city building. Therefore, the removal cost is unreasonably cheap compared to them.

// Developed land is more valuable than undeveloped land.
In view of the fact that cst_multiply_station is halved upon removal, it seems correct that the removal of the houses is based on cst_multiply_remove_haus, and that it is doubled upon purchase.
Pull request #498 is a fix for these. please confirm.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you for this. Before integrating this, can I check the reasoning behind using cst_multiply_station at line 1497?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

#5
Quote from: jamespetts on February 17, 2022, 11:26:29 AMThank you for this. Before integrating this, can I check the reasoning behind using cst_multiply_station at line 1497?
Note that line 1527 has been changed from cst_multiply_station to cst_multiply_remove_haus too.
As far as I can confirm, these should have been reversed originally. That is, until now, station removals used the house removal cost, and house removals were calculated using the station removal cost.
However, I am not sure whether signalbox is correct for hause or station.

EDIT:
Is it correct to use the house removal cost for both extension building and signalbox? If so, line 1497( & 1493 & 1499,1500) is the wrong fix.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

I suspect that there has been an inconsistent approach to this so far. I have not investigated this thoroughly pending the town code rework. What should in principle happen is that land with city buildings on it should cost a lot more than the equivalent land without buildings on it. Demolishing a building does not by itself purchase the land (although I wonder whether this should change in future so that players automatically buy land being demolished - but that may need to wait for a more sophisticated land ownership system), so what we need is a system in which players pay (1) the cost of the land including the building plus (2) the cost of actually demolishing the building, minus (3) the value of the empty plot of land, which is currently assumed to be sold back to private ownership after bulldozing.

For player owned buildings, such as signalboxes, station extension buildings, etc., currently, demolishing the building implies selling the land, so the player should be charged the cost of physically demolishing the building, but credited with the value of the land. Again, this latter step is likely to be unnecessary in the future on the implementation of a more sophisticated land ownership system.

Does this clarify matters?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

Land value potentially gets us embroiled in modern political questions: Should the value of an asset be the purchased book value (an acre at Hampstead Heath purchased in 1780 might have been purchased for £100...) or annually mark-to-market (your skyscraper purchased in 2005 for £100 million is now, after a downturn, worth ⅒ that, but you used it as collateral for loans so you now owe the bank five million)? Trying to ignore actual asset accounting as the game does now leads to unrealistic, and un-fun, game play. Similarly, why can't we build factories and shops, and gain the benefits from serving them with good transport?  Or in cut-throat multiplayer, withhold transport offensively?

What's fun to me in a game is more than just running trains and things, it's understanding and mastering the whole economic side of things.  However the game works is necessarily a compromise that affects how it "feels."

These are not easy issues to solve.

jamespetts

These issues can be very complex indeed! Ultimately, we do want to have a more realistic land value system - that will need to be paired with the planned city growth system. As to players building factories and shops - we must be careful not to end up having not so much Simutrans but Simushop or Simumill - trying actually to simulate the internal workings of shops or factories will be a whole game in and of itself and would take years of intensive work focussed on that alone to get right. However, a simple workaround is to allow the player to play, not as a shopkeeper, but a landlord: that way, players can own the shops/houses/etc., but nothing other than a rental value simulation would be necessary, as the tenants would do the actual running of the factory, shop or house.

This would also allow the simulation of the economics of Metroland (which I understand is also in Japanese railway economics), in which railway companies bought land in the middle of nowhere, then built a railway between it and London, developed the land, and sold or rented it for a profit.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

Quote from: jamespetts on February 17, 2022, 01:34:32 PMDoes this clarify matters?
Thank you for the clarification. The upper statement should not have been changed. Therefore, I have reverted the part.
The problem in that function was that the lower statement was missing the processing for citybuilding, not that cst_multiply_station and cst_multiply_remove_haus had been swapped.
I pushed the fix.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Excellent, thank you: now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.