The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: killwater on March 14, 2013, 08:44:56 PM

Title: RC 11.9000 A lot of churches
Post by: killwater on March 14, 2013, 08:44:56 PM
Hello
Well I know that people were a little more religious 1n 19th century but this is a little to much:
http://postimage.org/image/z614tmoyv/

Title: Re: RC 11.9000 A lot of churches
Post by: dustNbone on March 14, 2013, 10:23:31 PM
Looks like Pak128.Utah
Title: Re: RC 11.9000 A lot of churches
Post by: prissi on March 14, 2013, 10:27:52 PM
This happens when buildings have too early build levels (like level 5 while a townhall still have level 100 or so). As a result no suitable place is found in the town and the church is build far away on a free stretch of road. The level of the church should be increased to at least 200 or so.
Title: Re: RC 11.9000 A lot of churches
Post by: jamespetts on March 15, 2013, 01:05:28 AM
Hmm - having trouble reproducing your churches issue. Which pakset and pakset version are you using?
Title: Re: RC 11.9000 A lot of churches
Post by: killwater on March 15, 2013, 05:53:10 PM
Hello
Pak128.Bitain-ex-0.8.4

As prissi suggested that it can be a problem with city buildings, I have a median citizens per city set on 200. It seems as with a setting of 1200 it is indeed ok.

Some more feedback:
There seem to be a problem when building this churches: game freezes for two-three seconds. after few of them were build it crashed. No save game available. I did not build anything this time.
Title: Re: RC 11.9000 A lot of churches
Post by: jamespetts on March 15, 2013, 08:50:54 PM
Hmm - that's odd. Can you describe the precise steps required to reproduce this crash?
Title: Re: RC 11.9000 A lot of churches
Post by: killwater on March 15, 2013, 08:55:06 PM
Start new game with setting for median citizens per city to 0 or 50. Push fast forward and wait a month or so.
It does not crash every time. About 3/6 tries so far.
Title: Re: RC 11.9000 A lot of churches
Post by: jamespetts on March 15, 2013, 10:24:50 PM
Thank you for the report - I have managed to find and fix the crash. As to the churches issue, this seems only to occur when the median city population is set to be extremely low on map generation. Setting the median population to 1,500 at map generation eliminates this issue.
Title: Re: RC 11.9000 A lot of churches
Post by: neroden on April 05, 2013, 03:42:48 AM
There are strong reasons to set median city size low in games which start really early in the timeline (like 1750).  (First, it's more realistic, and second, the populations get waaaay too **** big by 2000 if you start with a median pop of 1500 in 1750.)

The algorithm for generating new attractions should be tweaked to not generate so many attractions at low city population counts.  I found that with a median of 200 I get an unreasonable number of attractions, though no crash.
Title: Re: RC 11.9000 A lot of churches
Post by: prissi on April 05, 2013, 08:59:50 PM
One needs rather to increase the building level of churches a little, to 400 or so.
Title: Re: RC 11.9000 A lot of churches
Post by: neroden on April 15, 2013, 07:35:34 PM
Quote from: prissi on April 05, 2013, 08:59:50 PM
One needs rather to increase the building level of churches a little, to 400 or so.

Aha.  Um... I'm not clear on where that's set.  I can't find where the attraction construction is triggered.  Are the function names in German?  (This really needs to be fixed.)

For reference, here's a typical section from one of the .dat files for churches:

Obj=building
Name=StoneChurch
Type=cur
Passengers=3
intro_year=1500
intro_month=1
retire_year=1980
retire_month=12
Build_Time=5
chance=90
dims=2,2,4


I don't see any "building level" entry at all.  Should a "level=...." be added?

Then, if we add "level" entries to every attraction, what happens when the code decides it's supposed to build an attraction and none at all are available?  I need to find the relevant section of code where it decides to build an attraction, in order to see under what conditions it does so, and what it does if there are no attractions available.
Title: Re: RC 11.9000 A lot of churches
Post by: Combuijs on April 15, 2013, 08:24:12 PM
I think Prissi means "build_time", this is the number of inhabitants the city must have for the attraction to be built. 5 is extremely low.
Title: Re: RC 11.9000 A lot of churches
Post by: jamespetts on April 15, 2013, 09:54:35 PM
Hmm - I wonder whether we need to reconsider a little more fundamentally how the building of attractions is to work?
Title: Re: RC 11.9000 A lot of churches
Post by: neroden on April 29, 2013, 08:43:57 AM
Quote from: jamespetts on April 15, 2013, 09:54:35 PM
Hmm - I wonder whether we need to reconsider a little more fundamentally how the building of attractions is to work?

We really should.  For one thing, countryside attractions never get built after initial startup.  For another, I honestly can't tell what the algorithm for triggering new attraction construction is -- where is it?
Title: Re: RC 11.9000 A lot of churches
Post by: jamespetts on April 29, 2013, 11:15:07 AM
This hasn't changed from Standard, so I don't know, as I've never looked into it. Perhaps a Standard developer could help?