Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Custom City Buildings not Appearing

Started by Eusebio Ptolomeu, April 22, 2022, 10:23:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Eusebio Ptolomeu

Building.dat  I've been trying to add custom city buildings for PAK128-Britain, just a personal choice to have more variety in cities. For this, I am using the sprites from an OpenTTD project called "Generic Skyscrapers", as seem here.
  The buildings themselves (in this example, a type=com building) seems to be working fine, as they can be built by the Public Player like other city buildings, and parameters like visitors demanded also working as described in the DAT file. Everything about the custom PAK file of the building seems to be working fine; however, despite all of this, the custom building is never built automatically by the game.
  I've tried to increase to increase the pop of a city several times: new homes are being built as expected, but the game never chooses my custom buildings, only the original ones. I'm attaching the DAT, PNG and PAK files in this message so others can see what I've written and test the files themselves, maybe I did something wrong here that I'm not spotting.

Eusebio Ptolomeu

Ok, so, only now I had the brilliant idea of decreasing the level of the buiding from 50 to 5. In doing so, the building started to appear in the game, but one thing I've noticed is that the game prefers much more to spread the city (build new houses) than to renovate an already built building (replacing it with a higher-level building). In the, I changed the "renovation_percentage" value from 20 to 1, and I saw the game choosing to renovate much more (thought not nearly as much as I would expect with such a decrease). This seems to suggest that the default value of 20 makes the game favours spreading the city way more than increasing the density of buildings.


Quote from: Eusebio Ptolomeu on April 22, 2022, 10:23:25 PMthe custom building is never built automatically by the game.
It should be noted that as I previously reported in a thread somewhere, the current extended city generation system has the problem of producing very few COM buildings.
Second, the center of the city always produces RES. Because the city needs population first.
Third, poor RES and IND buildings are automatically built outside the city. The growth of the city expands outwards. In other words, the placed attributes(RES/IND/COM) are eternal, so new COMs are rarely spawn.
Fourth, renovation always creates buildings with the same attributes. Therefore, the center of the city is always RES, and the proportion of COM is very small.
Lowering the level of a skyscraper can upset the game balance, as levels represent the height of the building and the cost of the land. So players will be able to cheaply destroy the skyscrapers in the center of the city. It is also possible to straddle high-rise buildings with elevated ways.
Therefore it is recommended to set the skyscraper to IND. However, it will not be built in the center of the city, but since the level is higher in the center, IND near the center may be replaced.

Eusebio Ptolomeu

I think I identified another problem: the current city growth algorithm just seems to love building clusters, I guess. According to this code, there's a "cluster_factor" = 100. This could explain why the game keeps building always the same type of houses. I tried to edit this value in, but could not find it. Is this factor only editable trough the source code, or is there a way to edit trough some tab file?