The International Simutrans Forum

 

Author Topic: Too many tree plantations for single industry chain  (Read 16250 times)

0 Members and 1 Guest are viewing this topic.

omoikane

  • Guest
Too many tree plantations for single industry chain
« on: January 09, 2013, 03:46:55 PM »
I'm using simutrans 112.1 with Pak128 version 2.2.0. but tree plantation's production rate is around 20-40. so even single wood-consuming factory chain creates lots of tree plantations (around 10-20). This makes currently playing region with full of tree plantations.

Is there a good solution for decrease number of tree plantations for future industry chains or I just have to delete existing tree plantations and add new ones with high production by using map editing tool?


Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Too many tree plantations for single industry chain
« Reply #1 on: January 09, 2013, 04:01:30 PM »
On one hand, I also think they have a rather low production, but on the other hand you can fix that by providing enough electricity, passengers and mail to the sawmill. Its production will increase probably over your forests' production rate.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #2 on: January 09, 2013, 06:17:21 PM »
Tree plantations should produce 10x or even more IMHO.
Oil fields and rigs should also produce 5x and coal mines 10-15x.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Too many tree plantations for single industry chain
« Reply #3 on: January 09, 2013, 10:14:35 PM »
That's weird, usually there were about 2 forests per consumer and I can not remember changing the numbers. 10 forests per consumer is a bug.

I'll take a look in foreseeable future.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Too many tree plantations for single industry chain
« Reply #4 on: January 09, 2013, 10:42:36 PM »
Oh, my... I thought it was a feature those forests producing 50 or 60 units/month!!!!  :o

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #5 on: January 10, 2013, 06:00:35 PM »
Even 2 seem a bit too many IMHO.
I would rather see one plantation serving 2-3 consumers, coal mines serving 5-10 consumers and oil fields serving 4-6 consumers.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: Too many tree plantations for single industry chain
« Reply #6 on: January 12, 2013, 10:49:34 AM »
I may be wrong but I think this is the problem of simutrans code.

Code: [Select]
sint32 produktion = fab->get_base_production() * fb->get_produkt(gg)->get_faktor();
// the take care of how much this factorycould supply
verbrauch -= produktion;


Setting of ForestPlantation is...

Code: [Select]
name=ForestPlantation
Productivity=10
Range=10
min_fields=10
production_per_field=1

As this formula, production of new ForestPlantation will be 20-30. But simutrans calculates each one as 10.
As a result, ForestPlantation will be four times more  built.

Am I wrong ?

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Too many tree plantations for single industry chain
« Reply #7 on: January 12, 2013, 12:48:30 PM »
Uhm, then why that doesn't happen with other industries? Or does it happen?  ???

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Too many tree plantations for single industry chain
« Reply #8 on: January 12, 2013, 01:06:52 PM »
Maybe production_per_field=0 could help that?

Offline dennosius

  • *
  • Posts: 63
  • Languages: EN,DE
Re: Too many tree plantations for single industry chain
« Reply #9 on: January 12, 2013, 01:33:30 PM »
That's really a problem. On a 1024² map, I had around 200 lines just for wood delivery (which usually requires to collect wood by road transport and get it to one common train station per chain) and it's not fun if you have to solve the same problem 50 times on a map.

Coal is fine IMHO. Probably in real life one coal mine serves several consumers (and not the other way round), but Simutrans is weak in using overcapacity in existing chains for building new chains (so if there was spare coal from a mine that only served one consumer, Simutrans would still build a new one when establishing a new industry chain that needs coal). Also, getting all load from ore mines (which produce around as much ore as proposed here for coal) is already painful even with modern vehicles.


Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: Too many tree plantations for single industry chain
« Reply #10 on: January 13, 2013, 01:38:48 PM »
The first problem is what I wrote above. It needs to subtract start fields production, too.
The second problem is below.

Code: [Select]
else if(  build_fields  ) {
// make sure not to exceed initial prodbase too much
sint32 org_prodbase = prodbase;
// we will start with a minimum number and try to get closer to start_fields
const uint16 spawn_fields = besch->get_field_group()->get_min_fields() + simrand( besch->get_field_group()->get_start_fields()-besch->get_field_group()->get_min_fields() );
while(  fields.get_count() < spawn_fields  &&  add_random_field(10000u)  ) {
if (fields.get_count() > besch->get_field_group()->get_min_fields()  &&  prodbase >= 2*org_prodbase) {
// too much productivity, no more fields needed
break;
}
}
sint32 field_prod = prodbase - org_prodbase;
// adjust prodbase
set_base_production( max(field_prod, org_prodbase) );
}


This code is completely wrong. This always set only org_prodbase as production.
Base production must be multiplying number of fields by field production plus org_prodbase.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Too many tree plantations for single industry chain
« Reply #11 on: January 13, 2013, 07:00:57 PM »
This code is completely wrong. This always set only org_prodbase as production.
Base production must be multiplying number of fields by field production plus org_prodbase.
Hm, it depends all on what the purpose of this piece of code is. As it is now, it ensures that (1) a prescribed production base is set (it could come from factory editor) and (2) that at least the minimal production from fields is there.

I may be wrong but I think this is the problem of simutrans code.
Code: [Select]
sint32 produktion = fab->get_base_production() * fb->get_produkt(gg)->get_faktor();
// the take care of how much this factorycould supply
verbrauch -= produktion;
prodbase already includes production from fields.

The easiest (and most obvious) solution would be to increase forest base production (Productivity).

Edit: The wrong part of the 'completely wrong' snippet of code is fixed in r6270. Now initial production is increased by initial fields too. For factories placed by map editor functions it is ensured that initial productivity is the same value as the value in the editor window.
« Last Edit: January 13, 2013, 07:17:54 PM by Dwachs »

Offline ronnie89b

  • *
  • Posts: 31
Re: Too many tree plantations for single industry chain
« Reply #12 on: January 19, 2015, 07:11:23 PM »
Hi guys! I rarely create new maps (I've played my single map for 1,5 year).
I can see, this bug still appears in the game. Tree plantations monthly production is only 50-60 unit, (coal mines' productions should be higher, too) so I got dozens of them in a new map.
I tried some maps with same results: 100-120 tree plantations from 300 factory.

The easiest (and most obvious) solution would be to increase forest base production (Productivity).
Why didn't somebody do it, or it's not the good solution?

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #13 on: January 19, 2015, 09:40:56 PM »
Hi.

I will look further at this glitch in the next days and keep you informed if there are news. Right now, this week, I'm having a lot of tests at school so I can't take care of that immediatly.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #14 on: January 19, 2015, 10:28:31 PM »
I personally support larger raw material suppliers, although I never involved myself in balancing.


Sent from my iPhone using Tapatalk

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #15 on: January 20, 2015, 06:05:30 AM »
I thought the small forests and coal mines was a deliberate act such to encourage the use of trucks/short trains and other small transport convoys. It also makes running such chains more tricky as you have lots of small suppliers to manage instead of a single large one.

That said I do feel that the open cast coal mine should have similar production to an open cast iron mine. I can understand the small mine shafts being numerous (as they were in real life) however big open cast mines produce on a much larger scale.

Also do be aware that plantations do grow over time. As long as you use them (they produce something) they will slowly add more fields until a maximum field number (defined by the pakset) is reached. As such a timber plantation with passenger supply and being allowed to grow can reach 200 units per standard month and possibly more.

Maybe a solution could be to make fewer base timber plantations but allow them to grow more fields? Having them with a sizable forest around and 400 or more per month production after some growing sounds like a reasonable compromise.

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #16 on: January 20, 2015, 04:34:26 PM »
Quote
Also do be aware that plantations do grow over time. As long as you use them (they produce something) they will slowly add more fields until a maximum field number (defined by the pakset) is reached. As such a timber plantation with passenger supply and being allowed to grow can reach 200 units per standard month and possibly more.

Maybe a solution could be to make fewer base timber plantations but allow them to grow more fields? Having them with a sizable forest around and 400 or more per month production after some growing sounds like a reasonable compromise.
This is exactly what we need, but I don't know if it is feasible by pak balancing or if a patch is needed to fix this.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #17 on: January 20, 2015, 06:18:04 PM »
Quote
This is exactly what we need, but I don't know if it is feasible by pak balancing or if a patch is needed to fix this.
All that you quoted is pakset related and already supported by the game. For example take a look at the pak64+food farms, they have large number of fields when fully developed, farm more than the forests end up with.

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #18 on: January 20, 2015, 06:58:14 PM »
Nice. This will be done as soon as possible.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #19 on: January 20, 2015, 11:53:23 PM »
I thought the pak128 farms also used field mechanics for most of their production with huge areas of fields? Again I wonder if the forests were purposely designed to produce so little.

In any case I would recommend something like an increase in field numbers of 50-100% (with appropriate reduction in numbers created). I imagine it would look quite pretty having a largish forest instead of small ones everywhere.

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #20 on: January 21, 2015, 04:27:01 PM »
I disagree. Fields from forest plantations don't work the same as real forest, so having large fields of tree plantation would look weird with normal woods. In addition to that, forest plantation fields = same graphics on all tiles = ugly and boring.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2715
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Too many tree plantations for single industry chain
« Reply #21 on: January 21, 2015, 05:34:17 PM »
Is there an option to have more types of fields for single industry? That way a forest plantation could get more variety

Sent using recycled electrons.


Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #22 on: January 21, 2015, 08:38:45 PM »
Yes, it should be possible indeed.
I was planning to look into it at a certain point.... Maybe Sarlock would be the man for it...


Sent from my iPhone using Tapatalk

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #23 on: January 21, 2015, 10:15:40 PM »
Well, it would be easy to make such graphics from existing trees.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #24 on: January 22, 2015, 12:16:51 AM »
Absolutely... it's on my target list.  I have some pretty cool things under development, I am hoping to get some things assembled to meet the current SMSC (given the forest theme) deadline of Jan 27th and put them on display.  What I was thinking for plantation trees is to have 2-3 full grown images and then one half-grown tree image and one of freshly cut stumps.  This would give some nice variety to tree plantations - then we can consider increasing the number of fields.

Give me a week or two to present something.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #25 on: January 22, 2015, 01:41:24 PM »
:thumbsup: Thank you!


Sent from my iPhone using Tapatalk

Offline tonu

  • *
  • Posts: 74
Re: Too many tree plantations for single industry chain
« Reply #26 on: January 22, 2015, 03:16:51 PM »
Now fields grow at the same level the main "factory" is located, is it also possible that the fields grow in other levels? So the plantations spread about two levels over and two levels under the main.
Also, in cold climates pines are planted (mostly in northern hemisphere) but in tropical climates (as my province Entre Ríos, Uruguay and Southern Brazil) it is more common to plant eucaliptus (and it grows nine times faster because of the climate). Maybe in the future can be considered havind different plantations for different climates.

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #27 on: January 22, 2015, 04:46:54 PM »
production of tree plantations increased (roughly doubled), now there are, on average, three plantations per sawmill.

commited r1560 (wait for it to be compiled on nightlies, probably tonight).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #28 on: January 23, 2015, 12:46:21 AM »
Quote
Now fields grow at the same level the main "factory" is located, is it also possible that the fields grow in other levels? So the plantations spread about two levels over and two levels under the main.
It is an issue with the field code. It also never makes terraces (artificial wall) preferring a far away remote field instead of a slope tile outside the backdoor. The result can be quite ugly if placement dictates the main building is placed in a non-flat area. An alternative would be sloped field support (e.g. sheep do not need flat land!) which would be used instead of terraces to get rid of ugly slopes resulting in open space inside fields.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Too many tree plantations for single industry chain
« Reply #29 on: January 23, 2015, 10:25:29 AM »
An alternative would be sloped field support (e.g. sheep do not need flat land!) which would be used instead of terraces to get rid of ugly slopes resulting in open space inside fields.

Do you propose sloped fields for "straight slopes" (those you can build ways on) only, or any slope? Since I don't think it makes any difference regarding the difficulty of programming, I'd really wish for the possibility to build every slope, but optionally so, similar to hard-slope-ways.

As a side-effect, one could give different slopes different kinds of productivity, so sloped fields are a bit inferior to flat fields. Or maybe sloped fields give more productivity if it's a vineyard ;)

As a very minor thing: Currently, fields are not buildings. I already proposed seasons for buildings, which seemed to be not too hard to do - but if buildings have seasons, fields could just be buildings, allowing them to get all the cool building features like animation and rotation. So, it might be feasable to think of these slope-located fields as something to integrate in the building features as well, since that was something wished long ago anyway.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Too many tree plantations for single industry chain
« Reply #30 on: January 23, 2015, 04:35:36 PM »
Quote
Do you propose sloped fields for "straight slopes" (those you can build ways on) only, or any slope? Since I don't think it makes any difference regarding the difficulty of programming, I'd really wish for the possibility to build every slope, but optionally so, similar to hard-slope-ways.
Would have to be any slope otherwise you will get ugly gaps in fields. Also if the field cannot be sloped (wheat farm not supporting double slope for example) then it should consider making a terrace instead using an artificial wall.

Offline tonu

  • *
  • Posts: 74
Re: Too many tree plantations for single industry chain
« Reply #31 on: January 24, 2015, 01:01:29 PM »
The problem of having fields in slopes is that it increases the number of graphics needed. (If we don't consider slopes corners, we have four half slope views and maybe four full slope ones for each state of the fields for every factory that have fields), anyways, if someone paint that, the farms on slopes can be done with small terraces, like this:
http://guias-viajar.com/china/wp-content/uploads/2009/11/fotos-terrazas-arroz-longji-003.jpg
or this:
http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Bancales_en_Bali.JPG/300px-Bancales_en_Bali.JPG

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Too many tree plantations for single industry chain
« Reply #32 on: January 24, 2015, 01:07:11 PM »
Untainted slopes shouldn't of course be built, as a backward compatibility. But if an artist starts painting a new/upgraded industry with fields, he should be given full freedom to add slopes, rotations and the like.


Sent from my iPhone using Tapatalk

Offline ronnie89b

  • *
  • Posts: 31
Re: Too many tree plantations for single industry chain
« Reply #33 on: February 05, 2015, 02:01:18 PM »
Thanks guys, the changes you did works fine. Tree plantations number reduced to normal.
Maybe the coal mines need a small increase, too?


Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #34 on: February 05, 2015, 06:36:01 PM »
Coal mines look good to me, by how much would you like them to be increased ?

Offline ronnie89b

  • *
  • Posts: 31
Re: Too many tree plantations for single industry chain
« Reply #35 on: February 05, 2015, 09:24:32 PM »
Coal mines look good to me, by how much would you like them to be increased ?

I think, I was a bit ambiguous.
Their number is ok, I thought their monthly production, it's a bit low.

Offline gauthier

  • Moderator
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Too many tree plantations for single industry chain
« Reply #36 on: February 06, 2015, 06:49:39 PM »
Both values are bounded, if their production is increased, their number will decrease, since the game spawns enough of them to supply their clients.

ABJ

  • Guest
Re: Too many tree plantations for single industry chain
« Reply #37 on: February 16, 2015, 04:56:01 PM »
That's weird, usually there were about 2 forests per consumer and I can not remember changing the numbers. 10 forests per consumer is a bug.

I'll take a look in foreseeable future.
I also sometimes get this problem. And in my case, (I don't know if it happens elsewhere also but I think it might; plz tell :D :) ) there are less of other industries. MUCH less. Forest, forest, forest everywhere with few other industry. And also (like this, ) only 1/2 sawmill (maybe because I play on very small maps :D but the effect is basically same.) Very woody.