The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: jamespetts on July 04, 2009, 10:22:04 PM

Title: Large farms
Post by: jamespetts on July 04, 2009, 10:22:04 PM
I am in the process of balancing the industries for Pak128.Britain, but farms are proving something of a problem. I had intended to produce a realistic countryside, dominated by agriculture, by greatly increasing the number of fields that each farm has, greatly increasing its chance to appear, and reducing its production, so that, to link to the shops, a large number of farms would be required. The intention is for most of the countryside to be occupied by farmland, rather than for there to be one or two tiny farms in a mass of empty land.

However, when I set up the industries in that way, no farms were generated automatically. Farms could be added manually with the individual industry building tool, but "increase industry density" had no effect. Is there some issue of which I ought be aware that might cause these results?
Title: Re: Large farms
Post by: whoami on July 05, 2009, 08:40:29 AM
Please post the .dat files for the "factories" in question.
What size do the farms and their fields (if any) have? (This may matter to the building site searcher.)
Title: Re: Large farms
Post by: jamespetts on July 05, 2009, 09:34:21 AM
Here is the farm in question:


#
# File created with TileCutter version 0.3d.1
# For more information see http://simutrans.entropy.me.uk/tilecutter/
#
Obj=factory
name=ArableFarm1750
intro_year=1750
intro_month=1
retire_year=1840
retire_month=10
copyright=James
pax_level=4
level=1
needs_ground=1
climates=rocky,tundra,temperate,mediterran,desert,tropic
Location=Land
chance=25
Productivity=10 
Range=5   
MapColor=136
OutputGood[0]=vegetables
OutputCapacity[0]=35
OutputFactor[0]=100 
Dims=1,2,4
BackImage[0][0][0][0][0]=arable-farm-house.0.0
BackImage[0][1][0][0][0]=arable-farm-house.1.0
BackImage[3][0][0][0][0]=arable-farm-house.0.1
BackImage[3][0][1][0][0]=arable-farm-house.0.2
BackImage[2][0][0][0][0]=arable-farm-house.0.3
BackImage[2][1][0][0][0]=arable-farm-house.1.3
BackImage[1][0][0][0][0]=arable-farm-house.0.4
BackImage[1][0][1][0][0]=arable-farm-house.0.5
fields=VegetableField
probability_to_spawn=5
production_per_field=1
max_fields=100
min_fields=80
has_snow=0
--------------------
Obj=field
name=VegetableField
Image[0]=vegetable-field-winter.0
Image[1]=vegetable-field-spring.0
Image[2]=vegetable-field-summer.0
Image[3]=vegetable-field-autumn.0
Image[4]=vegetable-field-winter.0
needs_ground=1
----------------------------------------
Obj=factory
name=ArableFarm1840
intro_year=1840
intro_month=12
retire_year=1910
retire_month=10
copyright=James
pax_level=4
level=1
needs_ground=1
climates=rocky,tundra,temperate,mediterran,desert,tropic
Location=Land
chance=16
Productivity=20 
Range=7   
MapColor=136
OutputGood[0]=vegetables
OutputCapacity[0]=50
OutputFactor[0]=100 
Dims=1,2,4
BackImage[0][0][0][0][0]=arable-farm-house.0.0
BackImage[0][1][0][0][0]=arable-farm-house.1.0
BackImage[3][0][0][0][0]=arable-farm-house.0.1
BackImage[3][0][1][0][0]=arable-farm-house.0.2
BackImage[2][0][0][0][0]=arable-farm-house.0.3
BackImage[2][1][0][0][0]=arable-farm-house.1.3
BackImage[1][0][0][0][0]=arable-farm-house.0.4
BackImage[1][0][1][0][0]=arable-farm-house.0.5
fields=VegetableField
probability_to_spawn=5
production_per_field=1
max_fields=150
min_fields=120
has_snow=0
--------------------
Obj=field
name=VegetableField
Image[0]=vegetable-field-winter.0
Image[1]=vegetable-field-spring.0
Image[2]=vegetable-field-summer.0
Image[3]=vegetable-field-autumn.0
Image[4]=vegetable-field-winter.0
needs_ground=1
----------------------------------------
Obj=factory
name=ArableFarm1910
intro_year=1910
intro_month=12
retire_year=1945
retire_month=10
copyright=James
pax_level=3
level=1
needs_ground=1
climates=rocky,tundra,temperate,mediterran,desert,tropic
Location=Land
chance=12
Productivity=40 
Range=15   
MapColor=136
OutputGood[0]=vegetables
OutputCapacity[0]=100
OutputFactor[0]=100 
Dims=1,2,4
BackImage[0][0][0][0][0]=arable-farm-house.0.0
BackImage[0][1][0][0][0]=arable-farm-house.1.0
BackImage[3][0][0][0][0]=arable-farm-house.0.1
BackImage[3][0][1][0][0]=arable-farm-house.0.2
BackImage[2][0][0][0][0]=arable-farm-house.0.3
BackImage[2][1][0][0][0]=arable-farm-house.1.3
BackImage[1][0][0][0][0]=arable-farm-house.0.4
BackImage[1][0][1][0][0]=arable-farm-house.0.5
fields=VegetableField
probability_to_spawn=5
production_per_field=2
max_fields=200
min_fields=160
has_snow=0
--------------------
Obj=field
name=VegetableField
Image[0]=vegetable-field-winter.0
Image[1]=vegetable-field-spring.0
Image[2]=vegetable-field-summer.0
Image[3]=vegetable-field-autumn.0
Image[4]=vegetable-field-winter.0
needs_ground=1
----------------------------------------
Obj=factory
name=ArableFarm1945
intro_year=1945
intro_month=12
retire_year=1975
retire_month=10
copyright=James
pax_level=3
level=1
needs_ground=1
climates=rocky,tundra,temperate,mediterran,desert,tropic
Location=Land
chance=10
Productivity=60 
Range=20   
MapColor=136
OutputGood[0]=vegetables
OutputCapacity[0]=125
OutputFactor[0]=100 
Dims=1,2,4
BackImage[0][0][0][0][0]=arable-farm-house.0.0
BackImage[0][1][0][0][0]=arable-farm-house.1.0
BackImage[3][0][0][0][0]=arable-farm-house.0.1
BackImage[3][0][1][0][0]=arable-farm-house.0.2
BackImage[2][0][0][0][0]=arable-farm-house.0.3
BackImage[2][1][0][0][0]=arable-farm-house.1.3
BackImage[1][0][0][0][0]=arable-farm-house.0.4
BackImage[1][0][1][0][0]=arable-farm-house.0.5
fields=VegetableField
probability_to_spawn=5
production_per_field=2
max_fields=275
min_fields=160
has_snow=0
--------------------
Obj=field
name=VegetableField
Image[0]=vegetable-field-winter.0
Image[1]=vegetable-field-spring.0
Image[2]=vegetable-field-summer.0
Image[3]=vegetable-field-autumn.0
Image[4]=vegetable-field-winter.0
needs_ground=1
----------------------------------------
Obj=factory
name=ArableFarm1975
intro_year=1975
intro_month=12
copyright=James
pax_level=2
level=1
needs_ground=1
climates=rocky,tundra,temperate,mediterran,desert,tropic
Location=Land
chance=8
Productivity=80 
Range=25   
MapColor=136
OutputGood[0]=vegetables
OutputCapacity[0]=200
OutputFactor[0]=100 
Dims=1,2,4
BackImage[0][0][0][0][0]=arable-farm-house.0.0
BackImage[0][1][0][0][0]=arable-farm-house.1.0
BackImage[3][0][0][0][0]=arable-farm-house.0.1
BackImage[3][0][1][0][0]=arable-farm-house.0.2
BackImage[2][0][0][0][0]=arable-farm-house.0.3
BackImage[2][1][0][0][0]=arable-farm-house.1.3
BackImage[1][0][0][0][0]=arable-farm-house.0.4
BackImage[1][0][1][0][0]=arable-farm-house.0.5
fields=VegetableField
probability_to_spawn=5
production_per_field=3
max_fields=195
min_fields=120
has_snow=0
--------------------
Obj=field
name=VegetableField
Image[0]=vegetable-field-winter.0
Image[1]=vegetable-field-spring.0
Image[2]=vegetable-field-summer.0
Image[3]=vegetable-field-autumn.0
Image[4]=vegetable-field-winter.0
needs_ground=1
----------------------------------------


The individual fields are 1x1, and the farm itself is, I think, 2x1, or possibly 2x2. I did once see the arable farm in the game having spawned by itself, but once is not much given the high chance that I have set. Most of the time, it does not appear at all.
Title: Re: Large farms
Post by: whoami on July 05, 2009, 10:12:33 AM
(I don't know most of the factory parameters, but I can't see the problem yet.)

To see the connections, also the .dat files for the recipient(s) of the farms' goods may be necessary here. Are the recipients built properly with only the farms missing? Faulty connections can be the cause, but you know that.

Have you tried with ST-standard, or (only) with ST-experimental? If the problems happens only with the latter, I would forward you to the developer of ST-exp. Oh wait, isn't that you? ;D

You could check simu.log for problems with loading the files or with building, using a high debug-level. Does makeobj (again: your own?) show an error at assembly?

To narrow down the whole problem, using a single farm at a time (only one in the pak file) may help, too.
Title: Re: Large farms
Post by: The Hood on July 05, 2009, 10:32:00 AM
I never quite understood how "chance" came into industry generation anyway - it seems fairly arbitrary.  I'm also not sure how this links in with the need to ensure all industries in the chain are getting the correct amount of goods from suppliers (i.e. a shop of productivity 100 should be fed by 2 factories of productivity 50, but by 5 of productivity 20, as far as I understand it).

Large farms also cause a problem, because you cannot always get close enough to the actual farm building with a station (you cannot delete fields if the farm only has the minimum number, and the farm building must be covered by the station catchment).  I would like to see farms created with more than the "minimum" fields, so large farms can  be created by the map generator, but also allowing the player to delete fields for transport access purposes.
Title: Re: Large farms
Post by: Frank on July 05, 2009, 10:35:48 AM
@jamespetts


you define 5x the VegetableField, this is wrong

1x define is positiv


Quotemin_fields=120

this is to many

120 fields is a areal from 11x11 in one high to map


Quotechance=25

this is by factory wrong

the parameter is DistributionWeight
Title: Re: Large farms
Post by: The Hood on July 05, 2009, 10:51:44 AM
I've done a bit of experimenting, and as far as I can see:

1) chance= affects the chance of an end-chain factory being produced.  It doesn't seem to affect suppliers.
2) suppliers are determined by the ratio of their productivity to the destination productivity (as I thought above).

I'm still not sure how that affects distributionweight as Frank says above - more experimenting needed...
Title: Re: Large farms
Post by: VS on July 05, 2009, 10:52:39 AM
Also, fields are built within a 10x10 area... I think. And they have to be on the same height. Thus getting agricultural landscape is very difficult unless the area in question is very flat.
Title: Re: Large farms
Post by: The Hood on July 05, 2009, 11:06:15 AM
Fruits of more digging around and experimenting:

1) For suppliers, distributionweight affects the proportions of different suppliers in the chain, subject to constraints of supplying enough total capacity.  So if you have two types of farm that could be built, one with distributionweight=1 and the other with distributionweight=2, the second type of farm will be created twice as often as a supplier in the greengrocer chain.  How many greengrocers there are (and therefore how many farms in total) is set by distributionweight for the greengrocer (this has the same effect as chance)

2) InputSupplier[0]= has some effect on the number of suppliers, although I can't understand this totally.  Is it a maximum, or minimum, or average number of suppliers that factory should have of a particular good?  Removing it seems to result in behaviour controlled entirely by the demand for goods (productivity) at the destination factory, but with some multiple connections.