News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Tree Density

Started by The Hood, February 05, 2009, 10:49:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

The Hood

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?

prissi

forest_no_of_trees_per_square = 3 caps it at three a tile. Number higher than 5 will make simutrans crawl with large maps.

VS

Just curious: how many trees can be on one tile?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

254; but then strange things migth happen when an airplane wants to enter this tile ...

VS

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 ;)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

z9999

Quotebaum_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

VS


My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

The Hood

OK thanks.  Somehow I missed that one.  D'oh!

prissi

It is actually:
max_no_of_trees_on_square
But it is wrong for ages in the forestconf.tab of pak64 ...

Spike

Quote from: 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 ;)

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 (assuming that it still is the one that was in use when I was active with coding).