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
Buildings "wander" north away from roads #7604
Comments
Would it be convenient to have a house and industry check 'at least one tile of a house/industry layout is adjacent to road'? This could be used by the house placement algorithm, and exposed as a newgrf house/industry var. It is possible for newgrf industry to check for adjacent road currently, but it's fiddly to do. |
The code to replace houses is lovely naive:
So yeah, there is a good chance this happens :D It also means it doesn't really wander off, as in, it doesn't continue to happen, I think. At most, with non-grid layouts, a house can be 2 tiles away from a road :) |
…hen rebuilding When a multi-tile house is rebuild, it always used the most northern tile to build the new house. This can very easily lead to houses wandering off in the north-ish direction (either NW or NE). To prevent this, pick the tile closest to town center when rebuilding on a multi-tile house. This still means a house can be build away from a road, but it is no longer wandering around finding another town to call home.
Buildings "wander" away from roads in the negative x and negative y directions. As suggested by Eddi|zuHause on irc, this seems to happen when a lot larger than 1x1 is replace by a 1x1 lot, then that in turn is replaced by a larger lot again. When the 1x1 lot replaces a larger lot, it always goes in the top corner (-x, -y dir), which means buildings can slowly move north over time. This process seems to take maybe 6-10 in-game years. See attached pictures.
I have observed this happening with the Total Town Replacement Set new GRF, so it may be related to that GRF, or the GRF may have some changes that exacerbate this problem. I'll test in vanilla soonhappens in vanilla as well
Version of OpenTTD
1.9.1
Expected result
Buildings should be built adjacent to roads.
Actual result
Buildings are able to move away from roads when they are replaced
Steps to reproduce
Build a city. Make some busses so it'll grow. Make sure "towns are allowed to build roads" is off. Fast forward, over time this will begin to happen.
The text was updated successfully, but these errors were encountered: