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
Number of towns is silently limited if town name generator runs out of names #8088
Comments
|
|
The problem was found in the discussion on the JGRPP version forum, but I found that the problem is not in JGRPP but in OpenTTD. https://www.tt-forums.net/viewtopic.php?f=33&t=73469&start=2720 |
This problem exists with several of the town name generators, especially some NewGRF ones. Back when they were introduced, we had only 256x256 maps, which never had much more than 100 towns. but now we have 4kx4k maps which can easily fit 10k towns, and the town name generators run out of names. unfortunately, we cannot really modify the town name generators, as that might break(*) old savegames. (*) they could still be loaded, but the names will be diffferent, and duplicates may appear. |
(Ignoring the savegame compatibility issue momentarily). The Finnish town name tables and algorithm should support 780 names (which is better than 327 but still quite poor). The use of SeedChance is such that which method to use and the indices into the various tables are linearly related due to use of overlapping or the same parts of the seed bits. |
While it is entertaining to point out how bad the Finnish name generator is, as @Eddi-z pointed out, it was made back in the days when maps were smaller, and running out of unique town names was not an issue. And also it is not likely to be the only generator suffering from the same problem. Additionally, at the time (~15 years ago) there was no specification as to how many unique names should a generator be able to produce. Is there such a specification even today? Moreover, the fact that generators can never ever be modified due to save game compatibility is clearly a design flaw of OpenTTD itself, not of any particular generator. |
Can we somehow keep the original (broken) Finnish generator around while also making an improved/fixed one? The original only gets used during savegame loading, to convert all town names into strings (as if they were renamed by the player) rather than the seed, and the new generator gets used for all new towns in old and new games. |
Relevant: https://www.tt-forums.net/viewtopic.php?f=29&t=88477 The French town name generator is even worse, it's only 70 unique names. Here are some possible solutions that would always work, but they might not be the prettiest:
Example for 2: If you selected Swiss town names, and run out, switch first to Austrian, then to German, then to English. These solutions are not very pretty, but at least they guarantee that every town gets an unique name. At the very least, a warning should be shown if the town name generator ran out of names. Finally, I suggest a rule for official new town name generators. They should at least generate 5,000 unique names, and have been throughly tested before they find their way into the game. 5,000 because that's the current maximum of towns you can generate. |
Actually, you can get way more than 5,000 towns. To verify, use the following map settings: Example output (the final number at the end is the number of towns generated): With this method, you can get somewhere between 11,000 - 13,000 towns in your game, instead of only 5,000, provided that your town name generator has enough names. |
Version of OpenTTD
OpenTTD 1.10.0 (Maybe also older or newer ...)
Expected result
The ability to create thousands of cities or towns , just like other game countries.
Actual result
More than 327 Finnish cities or towns cannot be created.
Steps to reproduce
Create more than 327 Finnish cities or towns.
The text was updated successfully, but these errors were encountered: