Latest Posts

Topic: Trees and Terrains

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-08-14, 20:26

einstein13 wrote:

I know 4 "basic temperature scales": Celsius, Fahrenheit, Kelvin and Réaumur. Wikipedia knows even more. We can make even "Widelands Scale". No problem face-wink.png

I know, but i don't understand the math behind it so i need a useful description of the widelands scale. Apparently there is no one who could give me such a description.... face-upset.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-08-14, 22:35

what's so wrong with "temperature is in arbitrary units"?

Fertility and humidity both are arbitrary units, with nothing more of a description than "1 is very fertile". If you want, you could say temperature goes from 180 to 20, but someone may want to add more terrains in the future


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-08-14, 22:54

king_of_nowhere wrote:

if necessary, we can specify that desert environments have a temperature around 150, summer and wasteland around 100, and winter about 50.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-08-15, 12:18

I have some issues with launchpad, because of insecure ssh-keys after updating openssl. Seems that i need to make a new key-pair.

But i managed to update the description and the branch anyway. Now we have to wait for approval and merging to get the new values into latest trunk.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-09-03, 14:58

I just committed the new tree values to trunk. Thanks for working on this face-smile.png

Edited: 2015-09-04, 07:29

Busy indexing nil values

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-09-03, 21:31

Thanks GunChleoc face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-11-23, 22:51

king_of_nowhere (or king_of_trees ?) face-grin.png

Could you please have a look to my formula of tree growing? The idea behind it is to have an indication if a terrain is good for trees or not. I used your last affinity values (the current in-game ones) and tried to fiddle out some rules depending on your former posts ... The reason why i am working on this is that i want the probability of grow show in the editor terrain menu. Normally it should be enough to have the terrains marked which are good for trees. If a terrain is really barren this may should be marked too.

Real barren terrains should be:

if humidity < 0.2 OR fertility < 0.2 then
    terrain is bad for trees

Bad means here that trees will may grow, but may die before they get old. The terrain is bad.

On the other side:

if humidity >= 0.2 AND fertility >= 0.2 then
    terrain is good for trees

Good means here that trees will "probably" grow until it's mature.

Could you confirm this?


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-11-24, 00:37

no, that's not accurate. you can't really say much based on humidity, because wasteland trees like it very dry (0.15 is the lowest preferred humidity), although they require high fertility. ash has humidity lower than 0.2 but it is good for trees.

fertiility is what's really important, since no tree has a preferred fertility lower than 0.4. A more accurate formula would be

if fertility < 0.4, then the terrain is moderately bad for trees, and if fertility < than 0.2 then it is really bad. (note: this is a strictly minor, not minor-or-equal; there are some winter terrains with fertility 0.4 which are nevertheless fertile)

To give you a better quantification of what "good" and "bad" mean, if you put foresters and woodcutters on a terrain with fertility from 0.4 to 0.2, at first glance it will look like the terrain is fertile, but the woodcutters will have low productivities. If you plant a forest on that terrain, you can let it be and it will generally survive. on a terrain from 0.2 to 0.1, you can't get any meaningful productivity from woodcutters, but if you put foresters on it, they will still manage to grow a forest of mature trees eventually. The forest will gradually die out once the foresters are stopped, though, but it will take a few hours. With fertility lower than 0.1, very few trees even make it past the first stage of growth. no amount of foresters can force a forest to grow there, and if one is planted with the editor, it won't last long.

humidity plays a minor role too, because there is no tree with good tolerance to both low humidity and fertility, but most of the discrimination is on fertility. the formula I gave you should be good for 90% of terrains, so I think that will be ok for you.

And I'm not sure I could give a more accurate one anyway, because the exact interplay of the values with fertility between 0.4 and 0.2 depends on what sppecific trees like. For example, 0.2 humidity 0.4 fertility will grow very well, because those are the preferred values of the twine. but that's a picky plant (0.8), so raising the humidity will make the terrain more barren. Unless your terrain is hot, in which case palm borassus will dominate (0.4 h, 0.4 f, 0.6 picky, but has the higher preferred temperature of all trees, 180). if your terrain is cool instead there are no plants that can grow on it with average humidity. oak and spruce are both mildly tolerant to low fertility (0.5, pickyness 0.6) in the presence of high huidity, but they prefer cool or cold climates; no desert tree likes high humidity, so a hot terrain with mid-low fertility and high huidity will actually be less fertile than one with lower humidity. larch also likes it cold, wet and infertile, but it is picky, so it rarely grows outside of tundra. So, you should probably just stick to the limitation based on fertility.

I think I mentioned it somewhere, but for reference, I repost here the principle to ensure that terrains that are intended as barren will actually be so:

  • no tree with a pickyness lower than 0.6

  • no tree with preferred fertility lower than 0.4

  • tolerant to dry, tolerant to infertile, low pickyness: no tree with all those three together. two out of three at most.

Edited: 2015-11-24, 00:38

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-11-24, 08:25

dammn face-crying.png

Thanks anyway for explaining...

Edited: 2015-11-24, 08:26

Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-02-26, 16:52

I'm finding the recently introduced editor help very useful to check on the trees. I have seen in particular that, while I generally made a good job with the terrain values, giving most terrains the tree growth probability that I wanted for it, in some cases I went wrong. For example, summer meadow 2, one of the supposedly most fertile terrains, only has a 55% chance of growing anything. I'm thinking on fixing it and a handful of other cases where the actual probability is not what it was supposed to be. would that make sense, or you think we should go on with those values and avoid more work?


Top Quote