News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Simutrans-Extended and -64 not working...

Started by emirkir, June 12, 2018, 01:36:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

emirkir

Hi again!
As you've been told in my latest posts I have this issue that I can't use Simutrans-Extended and the -64 version.
As @Ves said, to redownload from the Bridgewater-Brunel server didn't work.. So on this link I provided a screen-share of when I recreate the problem:
https://drive.google.com/file/d/1CLO4jARQNvvyK_zl4UrD7dOf09vBJ2DU/view?usp=sharing (mp4-file)

Please help!

JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

ACarlotti

The problem is that the algorithm (lines 970-983 in simworld.cc) for generating a list of population sizes is taking an inconsistent set of parameters. In particular, it is currently impossible to generate cities with a population smaller than half of median_population, which you set to 7500. However, in pak128.sweden we have max_small_city_size=3000. This means that it gets stuck in an infinite loop once it starts trying to generate 'small' cities, since each number it tries is at least 3750.

To avoid this, you can set median_population to less than 6000. There should probably be some checks in the code to prevent this situation arising; in the long term I think the city generation algorithm is likely to be rewritten without this code for generating population sizes.

emirkir

Okay I understand, but is it impossible then to make bigger cities or am I understanding the mechanics wrong?

EDIT: Why don't make a warning with the maximum set value?

JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

emirkir

IMPORTANT! This problem was found in PAK SWEDEN.

JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

ACarlotti

There are a couple of relevant settings you can change - click settings, and select the Extended tab, and there should be a couple of settings called something like max_city_size and max_small_city_size. You could also increase these to solve the problem (although it looks like the world generation will create fewer cities than specified if there isn't enough room for them all).

DrSuperGood

Please try running Pak128-Britain and with localization set to English. This is to rule out the crash being caused by the pakset and not the x86-64 build.
QuoteThe problem is that the algorithm (lines 970-983 in simworld.cc) for generating a list of population sizes is taking an inconsistent set of parameters. In particular, it is currently impossible to generate cities with a population smaller than half of median_population, which you set to 7500. However, in pak128.sweden we have max_small_city_size=3000. This means that it gets stuck in an infinite loop once it starts trying to generate 'small' cities, since each number it tries is at least 3750.

To avoid this, you can set median_population to less than 6000. There should probably be some checks in the code to prevent this situation arising; in the long term I think the city generation algorithm is likely to be rewritten without this code for generating population sizes.
This sounds like a bug. It really should not allow one to do this if it should never happen. Otherwise it should work with what it is given and just generate stupid results, possibly with a warning.
QuoteEDIT: Why don't make a warning with the maximum set value?
The game should not even be allowing you to set impossible settings. It should warn one if the results will be stupid but if a setting is impossible it should refuse to progress.

ACarlotti

Quote from: DrSuperGood on June 12, 2018, 09:24:24 PMPlease try running Pak128-Britain and with localization set to English. This is to rule out the crash being caused by the pakset and not the x86-64 build.

This has nothing to do with the pakset or which system the game was built for. It's basically a bug that's present in all versions; no further testing is needed to diagnose it. The only reason I haven't offered a fix is because I'm not sure what would be most appropriate in the short term.

One option (a quick botch) would be to increase max_small_city_size to median_population and max_city_size to 2*median_population when these values are too small for the specified median_population. A good solution long-term might involve a more significant redesign of the city building code, so will probably have to wait.

DrSuperGood

Use a conditional test to check the values before trying to build the cities. If one is too small then make it bigger. When this occurs, if Simutrans supported warning dialogs then show one, but since it does not then maybe send a warning to the command console that this occurred. The end user experience might not be what is expected with cities being the wrong size, but it will not freeze in an infinite loop which is a much better result.

Another solution, which should be done on top of the above, is to have the UI clamp the values that can be chosen so a user cannot input impossible values into it however this takes extra development time so might not be worth it for now.

emirkir

Ok, so you mean Shift+P and "Increase City-population by 100"?

Thanks!

JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

Matthew

Quote from: emirkir on June 13, 2018, 11:00:33 AM
Ok, so you mean Shift+P and "Increase City-population by 100"?

Thanks!

If you press 'i', then you'll see a special Settings dialogue. These settings can also be changed in the simuconf.tab files (one in simutrans/config, one in the pakset, and one in your user directory).
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

emirkir


JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

emirkir

#11
I got it to work by not having cities bigger than 6000. It worked smoothly and without further visual/graphics/UI-problems.
But something I noticed was when I entered my values, it didn't spawn what I set in the "create-a-map" start-screen.
I set number of cities to 20 and it only spawned 4.

EDIT: The edit I made before is moved because it don't place in this board...

Thanks!

JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772

jamespetts

Thank you for your report, and apologies for the delay in replying. I think that I have managed to fix this, which fix I have pushed to the master branch. The town generation/growth system will eventually need to be overhauled entirely, but this should at least prevent the infinite loops/freezes.
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.

emirkir


JOIN SIMUTRANS DISCORD-SERVER! https://discord.gg/fpXY772