[patch] trees growth reduced

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

[patch] trees growth reduced

Post by Gedemon » 15 Oct 2009 02:23

just a small patch to reduce the trees growing rate with 4 settings (normal, slow, very slow, extremly slow)

I've made it because I doesn't like how the map became a huge forest in long games, but on the other way I didn't want to totally stop tree growth...
Attachments
r17765_reduced_tree_growth.patch
(4.53 KiB) Downloaded 361 times

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: [patch] trees growth reduced

Post by HackaLittleBit » 15 Oct 2009 10:22

nIce Gedemon

The tree growth also bothers me with openttd.
If you don't mind I would like to make some suggestions to include in your patch.
1. Option to limit tree growth to lets say 80% ( 0 - 100% )of the map heigth.
2. Function to seed randomly trees. (just called once a while but when new game is created looped a couple of times)
3 Option to allow new tree growth only next to exsisting trees ( grow forrest )
4 Option to define which kind of tree grows on what hight level.

All this for getting a more "REALISTIC" (Sorry Belugas) :wink: sort of forrest growth :)

Hope I don't ask for too much :wink:

HackaLittleBit

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 674
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: [patch] trees growth reduced

Post by JacobD88 » 16 Oct 2009 16:57

Gedemon wrote:...I didn't want to totally stop tree growth...
Truly wonderful patch, wanted this for sometime, however it would be nice if there was an option to disable tree growth totally as well as the options you have already implemented, that way users get a choice depending on the game they want to play

For example, sometimes i want to play a game that changes slowly, your patch and slow town growth allow this

Other times however i want to create a "static" game, stuck in one time zone, and the disabling of tree growth as well as the selectable time period functionality of TTRS would be great for this

Dante123
Chief Executive
Chief Executive
Posts: 670
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: [patch] trees growth reduced

Post by Dante123 » 16 Dec 2009 20:35

could this patch be updated ? =)

User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: [patch] trees growth reduced

Post by Gremnon » 16 Dec 2009 20:50

It doesn't have too many issues. Aside from one issue in the language files for English, I applied it into my patchpack quite cleanly. You're welcome to use it, as it's included.

I'll check again with a more recent trunk than the one GPP uses though, and see if it's any different. If not, it shouldn't be that hard to fix the parts that fail, you just need a text editor, a few minutes, and to know which hunks failed to apply correctly.

Dante123
Chief Executive
Chief Executive
Posts: 670
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: [patch] trees growth reduced

Post by Dante123 » 16 Dec 2009 20:57

if i remember correct, it was only giving a error at saveload cpp or something like that.
but i don't know very sure about that.

but i dont know anything about programming :P so have no clue what to fix or change.

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: [patch] trees growth reduced

Post by pavel1269 » 16 Dec 2009 21:11

Here you go.
Last edited by pavel1269 on 19 Jul 2010 10:11, edited 1 time in total.

Dante123
Chief Executive
Chief Executive
Posts: 670
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: [patch] trees growth reduced

Post by Dante123 » 16 Dec 2009 21:13

thanx again :P

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: [patch] trees growth reduced

Post by HackaLittleBit » 18 Dec 2009 00:05

JacobD88 wrote:disabling of tree growth as well as the selectable time period functionality of TTRS would be great for this
You got it in r18522

thx RB

petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: [patch] trees growth reduced

Post by petert » 18 Dec 2009 00:06

hackalittlebit wrote:
JacobD88 wrote:disabling of tree growth as well as the selectable time period functionality of TTRS would be great for this
You got it in r18522

thx RB
Is that what that was? Was that based off of your patch?

Eddi
Tycoon
Tycoon
Posts: 7400
Joined: 17 Jan 2007 00:14

Re: [patch] trees growth reduced

Post by Eddi » 18 Dec 2009 18:43

no, it's something entirely different. this patch modifies the rate at which trees grow. the trunk patch prevents trees spreading to tiles which do not have at least one tree. [makes trees eventually die out]
You might not exactly be interested in Ferion, but if you are, have fun :)

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [patch] trees growth reduced

Post by Terkhen » 28 Dec 2009 19:57

Update to trunk.
Attachments
reduced_tree_growth_r18655.diff
(4.54 KiB) Downloaded 180 times

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: [patch] trees growth reduced

Post by pavel1269 » 19 Jul 2010 10:10

Update
Attachments
reduced_tree_growth_r20180.patch
(4.58 KiB) Downloaded 328 times

Gigigonzalez
Engineer
Engineer
Posts: 92
Joined: 12 Jun 2014 14:24

Re: [patch] trees growth reduced

Post by Gigigonzalez » 20 Aug 2014 17:05

Is it possible to totally eliminate growth AND death of trees? Like it literally doesnt change at all. Would be a nice option to have as well.

Eddi
Tycoon
Tycoon
Posts: 7400
Joined: 17 Jan 2007 00:14

Re: [patch] trees growth reduced

Post by Eddi » 21 Aug 2014 01:57

Tree handling happens in two places:

OnTick_Trees handles the random placement of trees on the map. This can be influenced by a setting.

TileLoop_Trees handles the growth of trees to their mature state, spreading into neighbouring tiles and killing trees which have been around for a while. This can currently not be influenced and is probably what you want. It would be fairly trivial to remove this function, which would freeze all trees. but that planted trees will not grow is probably not desired.
You might not exactly be interested in Ferion, but if you are, have fun :)

Gigigonzalez
Engineer
Engineer
Posts: 92
Joined: 12 Jun 2014 14:24

Re: [patch] trees growth reduced

Post by Gigigonzalez » 21 Aug 2014 15:47

Ah right.


i just thought it would be interesting to keep map size more under control in multiplayer. like

McZapkie
Tycoon
Tycoon
Posts: 1175
Joined: 18 Jan 2014 18:10

Re: [patch] trees growth reduced

Post by McZapkie » 12 Sep 2014 14:12

Gigigonzalez wrote: i just thought it would be interesting to keep map size more under control in multiplayer. like
I found a method to keep trees growth limited, without use of special patch, newgrf only.

Instead of forest, use lumber mills, with non-zero in-game probability.

Of course, wood payment rate should be same as in case of forests (or even lower), if lumber mills pop up for free.
I already tested this with my Manpower Industry newgrf (payment not fixed yet) and found, that it works pretty well - lumber mills are eating all trees and die, next lumber mill appear randomly and is eating another trees - a kind of homoeostasis between forest density and lumber mills is formed.

The 2048x2048 map with initial size ~1.4 MB, without lumber mills, growth up to 5.5 MB, covered mostly by trees:
McT, 13 kwi 2050.png
trees without random lumber mills
(246.94 KiB) Downloaded 2 times
It is really a harassment for multiplayer, even with max_download_time increased - I cannot download time endlessly.

Now, with lumber mills, map size stabilise at 2.8MB level, and it can be downloaded even trough weak ADSL link.

If one industry/town setting is on, nice features would be observed - low trees density in populated area and extensive woodlands in sparsely populated areas:
McTest6, 3 lip 2050.png
tree growth controlled by random lumber mills
(179.59 KiB) Downloaded 2 times
After 132 fame years, forest are exactly where are supposed to be: east/northern "land of lakes and marshmallows" and south mountains.

There is small issue - in some languages "sawmill" and "lumber mill" translates to the same word.
To avoid such disambiguation, probably different industry with different graphics is needed,
which works like lumber mill but appear during game.
I don't know English terminology: logging place? forest felling?
I mean something like:
Image
(image from melbournecatchments.org)
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: [patch] trees growth reduced

Post by Supercheese » 12 Sep 2014 16:42

I think it can be translated as "lumber camp" or "logging camp" without any confusion.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

Gigigonzalez
Engineer
Engineer
Posts: 92
Joined: 12 Jun 2014 14:24

Re: [patch] trees growth reduced

Post by Gigigonzalez » 13 Sep 2014 23:02

Meh, interesting but still doesn't really solve the trade off between having no trees at all or having a sh*tload of them after 25/50 years and nothing in between. Its a killer for multi player games. Either 2-4MB maps with no trees, or 10+MB maps with trees. (lzma:2)

Imo there needs to be a toggle to literally freeze trees from being destroyed or planted at all, so a map would be the same side from start to end (Except for user made stuff and towns etc ofc that always increases map size a bit)

Same goes for the 'garbage' tiles or 'dirt' tiles Im not sure what to call them, simply have a toggle to disable them because 1. they aint pretty, 2. again they increase map size without reason (imho)

Just my 2 cents,

User avatar
keoz
Transport Coordinator
Transport Coordinator
Posts: 321
Joined: 16 Jul 2009 10:04

Re: [patch] trees growth reduced

Post by keoz » 13 Sep 2014 23:18

Gigigonzalez wrote:Imo there needs to be a toggle to literally freeze trees from being destroyed or planted at all, so a map would be the same side from start to end (Except for user made stuff and towns etc ofc that always increases map size a bit)
Nah. Freezing isn't the solution. Having a finer tree growth algorithm is. And actually, I'm sure it shouldn't be so hard to do it (but somebody should dig into the code). There should just be a better balancing between trees death and birth. It could use a mechanism similar to that used for industries, where there is a max industries limit, and new industries pop up only if this limit isn't reached. Trees could do the same.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests