The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: The Hood on February 05, 2009, 10:49:17 pm

Title: Tree Density
Post by: The Hood on February 05, 2009, 10:49:17 pm
I want to increase the number of trees that get planted per tile in a forest during map generation.  I've had a play with forestrules.tab but no joy.  Does anyone know if and how this is possible?
Title: Re: Tree Density
Post by: prissi on February 05, 2009, 10:52:18 pm
forest_no_of_trees_per_square = 3 caps it at three a tile. Number higher than 5 will make simutrans crawl with large maps.
Title: Re: Tree Density
Post by: VS on February 05, 2009, 10:54:47 pm
Just curious: how many trees can be on one tile?
Title: Re: Tree Density
Post by: prissi on February 05, 2009, 10:58:16 pm
254; but then strange things migth happen when an airplane wants to enter this tile ...
Title: Re: Tree Density
Post by: VS on February 05, 2009, 11:03:21 pm
Uhhhhh. Why isn't that horrible number capped at some 8 or so? That would definitely reduce some memory needed... and I know how much you like optimization ;)
Title: Re: Tree Density
Post by: z9999 on February 05, 2009, 11:08:35 pm
Quote
baum_t::max_no_of_trees_on_square = contents.get_int("max_no_of_trees_on_square", baum_t::max_no_of_trees_on_square );

 ;D
Title: Re: Tree Density
Post by: VS on February 05, 2009, 11:17:15 pm
Quote
Why
;)
Title: Re: Tree Density
Post by: The Hood on February 06, 2009, 09:02:37 am
OK thanks.  Somehow I missed that one.  D'oh!
Title: Re: Tree Density
Post by: prissi on February 06, 2009, 11:38:14 am
It is actually:
max_no_of_trees_on_square
But it is wrong for ages in the forestconf.tab of pak64 ...
Title: Re: Tree Density
Post by: Spike on February 06, 2009, 01:40:00 pm
Uhhhhh. Why isn't that horrible number capped at some 8 or so? That would definitely reduce some memory needed... and I know how much you like optimization ;)

It only needs as much memory as there actually are objects (plus a little overhead, but not much). It's a quite highly compressed structure (****uming that it still is the one that was in use when I was active with coding).