Page 1 of 1

[Patch] Disable Tree Growth

Posted: 30 Dec 2007 19:41
by Frostregen
This patch adds a patch setting which will control if trees are allowed to grow, or not.

This may be useful for scenario creators, who want to create customized forests, which stay the same during editing.
Or for players who do not want to have the entire map filled with trees sooner or later.

Patch available at flyspray:
http://bugs.openttd.org/task/1605

Please comment.

Re: [Patch] Disable Tree Growth

Posted: 30 Dec 2007 20:13
by Bilbo
I think the patch is good, perhaps just add some quick-switch at some place in scenario editor (in the "create new landscape" gui, perhaps? So you can toggle this once you create the map .... )

Also, some settings like "no growth in editor, but grow in the game" may be useful. Sometimes you want the trees to grow once in the game but you do not want such interference while in editor and you are likely to forgot to turn it off when saving. Therefore I think this should split into two settigns, enable tree grownt at all (as you have made) and add "disable tree growth while in editor" which won't be saved with the map but will be saved in local settigns.

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 02:52
by rbenevid
Disabling tree growth during gameplay is almost a cheat, as it greatly reduces problems
with local authority. And it breaks lumber mills in tropical. Maybe this could be on the
cheat menu during gameplay and automatically enabled during editor (or a patch
"disable tree growth in editor)?

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 03:04
by Bilbo
rbenevid wrote:Disabling tree growth during gameplay is almost a cheat, as it greatly reduces problems
with local authority. And it breaks lumber mills in tropical. Maybe this could be on the
cheat menu during gameplay and automatically enabled during editor (or a patch
"disable tree growth in editor)?
In WWOTTDGD disabling automatic tree growing was one of the "features" (yes, crippling lumber mills in troppical :), so IMHO not a cheat, rather a special server setting for some games.

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 10:40
by Frostregen
The main reason for not separating editor and ingame is:
-a scenario creator may decide if he wants the trees to grow on his map, or not.
(By saving the scenario with the appropriate patch setting)

Your "quick-switch at some place in scenario editor" idea sounds good,
but I want to keep the patch as small as possible at first.
Once it is accepted into trunk, this extra button may be added.

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 13:29
by Bilbo
Frostregen wrote:The main reason for not separating editor and ingame is:
-a scenario creator may decide if he wants the trees to grow on his map, or not.
(By saving the scenario with the appropriate patch setting)

Your "quick-switch at some place in scenario editor" idea sounds good,
but I want to keep the patch as small as possible at first.
Once it is accepted into trunk, this extra button may be added.
But what if the scenario creator want the trees to be grown once the game start, but not while he is placing them in editor? He'll turn it off, but before every save, he'll have to turn it on momentarily (in these few ticksd trees will grow a little), save the scenario and turn it off again. Therefore I suggested for extra option for the scenario editor. While you can pause the scenario editor, you can't build while paused in it. (though build-while-paused in scenario editor may solve this probably too)

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 15:21
by Ammler
Bilbo wrote:
In WWOTTDGD disabling automatic tree growing was one of the "features" (yes, crippling lumber mills in troppical :), so IMHO not a cheat, rather a special server setting for some games.
We had this feature to reduce the filesize, a map full of trees could be double the size then without... I would really like to have that switchable over the console too, while running a server, like "normal" patches.

Greets
Ammler

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 15:30
by Bilbo
So in WWOTTDGD the only purpose this have is to lower the map size to lower (re)conection times? Still, may be helpful even with other servers having 2048x2048 maps ....

Perhaps even the speed at which the trees are grown could be set (from 0 to say saomething like multiple times the current value :) ... perhaps I'll make another patch with it :)

Re: [Patch] Disable Tree Growth

Posted: 31 Dec 2007 23:54
by athanasios
I vote for a switch or slider in scenario editor to allow/not allow growth of trees after the game starts.

Re: [Patch] Disable Tree Growth

Posted: 02 Jan 2008 11:39
by Expresso
How about giving players control over how many trees are allowed to grow on the map as an additional option? Not as an arbitrary limit (i.e. players should always be able to place trees), but rather to make sure the game plants trees but doesn't fill the map with trees.

Re: [Patch] Disable Tree Growth

Posted: 02 Jan 2008 15:06
by electricmonk
Here's an idea: If tree growth is disabled but new trees can still be planted, you could 'borrow' the trees from Rollercoaster Tycoon and create 'parks' with a huge variety of trees (and other scenery). Using the ECS 'Tourists' cargo, trains (or busses) full of tourists will ride through the park. The ammount of revenue generated will be according to how 'interesting' the journey is (Rollercoaster Tycoon calculates the 'ride excitement' based on how interesting the ride is, so we could use a similar algorithm to work out how much tourists will pay).

But then, of course, the AI will sooner or later come along and terraform all over your masterpiece :(

Re: [Patch] Disable Tree Growth

Posted: 11 Jan 2008 11:32
by Frostregen
-Patchfile updated (synced with trunk r11811)

-Added patchsetting: "Disable Tree grow in scenario editor" as Bilbo suggested.
This is a config setting only -> not saved with map.


Something else:
Did the tree-planting method change in scenario editor?
I can only plant fully grown trees now...

Re: [Patch] Disable Tree Growth

Posted: 16 May 2008 15:11
by planetmaker
I updated the patch to current trunk (r13305).

Re: [Patch] Disable Tree Growth

Posted: 09 Jun 2008 14:26
by planetmaker
updated to trunk

Re: [Patch] Disable Tree Growth

Posted: 09 Jun 2008 15:27
by Tiberius
hooray! this one's MUCH cleaner. I'll include it ASAP :)

Re: [Patch] Disable Tree Growth

Posted: 09 Jun 2008 18:25
by planetmaker
Tiberius wrote:hooray! this one's MUCH cleaner. I'll include it ASAP :)
You're welcome. But I think it's exactly the same as Frostregen's. The difference between before and now is that it's now smaller due to missing indentation correction so it does NOT follow coding style with that... But it saves to replace all those lines which actually are not changed except in their indentation - an that enhances readability :)

So I'm rather in doubt that I did there too well :)

EDIT: That said, Belugas pointed out about the style violations in this patch and supplied the attached and even more simplified version of the patch. Enjoy.

Note: you don't want to disable tree growth in desert climate as the lumber mill won't work anymore, if it has not trees any longer. Don't ask for trunk inclusion therefor :)

Re: [Patch] Disable Tree Growth

Posted: 14 Jun 2008 17:07
by Two5Kid
This is a good patch. Except for the desert scenario, almost all temperate games would be affected with the uncontrolled tree growth and also the reduction in town ratings once you start to blast them away.

Edit: Now to get someone to patch it in Mac with YAPP, DistantJoinStations & Daylength. Shameful request. :(