Can we get a fix for the tree algorithm?

General discussion about Life is Feudal MMO and Life is Feudal: Your Own, The main section and backbone of the forums.
User avatar
Dansk_viking
 
Posts: 31
Joined: 31 Dec 2015, 11:41

Re: Can we get a fix for the tree algorithm?

Post by Dansk_viking » 18 Mar 2017, 17:40

I asked a while ago whether it was possible to slow the tree aging down. I'm running a semi-realistic server with 24-hour cycle, and to be honest, tree growth needs to be reduced for a more realistic feeling.

So, I asked a while ago whether it was possible to use the code to get a slower growth/death time by setting it to ex: <TreeAgingSpeed>0.5</TreeAgingSpeed> or even less. But I never got an answer.

Now, suddenly all my old oak trees disappeared, and I suspect it's this new algorithm. I'ts really immersion-breaking for me (especially since my village is named Oakengrove, and now all but two trees in the grove are mysteriously gone - when oaks would outlast several life times in reality).
Last edited by Dansk_viking on 19 Mar 2017, 09:59, edited 1 time in total.
Image

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: Can we get a fix for the tree algorithm?

Post by Nyuton » 19 Mar 2017, 02:25

Larainan wrote:I have done what he instructed and heres what im seeing on my server. trees that look like sprouts are major trees not only the ones i planted before making the changes to the xml but all those after as well.
the tree behind the box http://images.akamai.steamusercontent.c ... 8CFAB1B5A/

Trees are aging and not actually growing.


I'm not aware what kind of mod Alakar gave you or what it's supposed to do. But if that mod was created before the new forest algorithm came out, chances are that it's no longer compatible. What you describe happens if there is an inconsistency between your forest and forest_patch database tables in terms of tree age.

Will it make my trees grow right? and how often will that run ?
It does the same as the game does every midnight and it runs and often as you enter the command. Usually takes 20-40 seconds or so. Then you can repeat. I would recommend doing that when there is nobody on your server, so you can easily track the console messages and see when it says something like 'forest maintenance finished' ...


@Dansk_viking you can't set TreeAgingSpeed below 1 but you can increase maximum tree age and death border up to sky high values, which will accomplish kind of what you're looking to do.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools

User avatar
Dansk_viking
 
Posts: 31
Joined: 31 Dec 2015, 11:41

Re: Can we get a fix for the tree algorithm?

Post by Dansk_viking » 19 Mar 2017, 10:11

Nyuton wrote:@Dansk_viking you can't set TreeAgingSpeed below 1 but you can increase maximum tree age and death border up to sky high values, which will accomplish kind of what you're looking to do.


Thank you! At least that should take care of the dying trees, but it may result in a pretty cluttered forest if growth itself isn't checked.

Do you have any idea how high it can be set (in the thousands or more)? It says "note that the number of deaths is capped by ChangeLimit setting", I'm not sure what that means, and I can't find anything about the "ChangeLimit setting".


EDIT: I now set:
<AgeDeathBorder>2200</AgeDeathBorder>
...
<MaxAge>9999</MaxAge>

This should virtually remove the upper limit (forced death) for trees, while still having a chance that very old trees (ten times as old as before) die.

I wonder if the MaxAge can simply be disabled, but this works for now hopefully.

I even managed to roll back the forest to my latest backup so my oak trees have returned (with HeidiSQL, replacing the data in forest and forest_patch, and manually setting the ForestVersion in terrain_blocks).
Image


Larainan
 
Posts: 83
Joined: 08 Sep 2015, 15:19

Re: Can we get a fix for the tree algorithm?

Post by Larainan » 20 Mar 2017, 14:06

I'm not aware what kind of mod Alakar gave you or what it's supposed to do. But if that mod was created before the new forest algorithm came out, chances are that it's no longer compatible. What you describe happens if there is an inconsistency between your forest and forest_patch database tables in terms of tree age.

Will it make my trees grow right? and how often will that run ?
It does the same as the game does every midnight and it runs and often as you enter the command. Usually takes 20-40 seconds or so. Then you can repeat. I would recommend doing that when there is nobody on your server, so you can easily track the console messages and see when it says something like 'forest maintenance finished' ...


Thanks For the reply. the files Alakar had me change are the new files . He had me pull a forest file from the art/forest folder on my client and edit it for tree age and replace the same forest file in the art/forest folder on the server that has a dso extension with the cs one from my computer. I figured out that the file in the art folder is created on character creation so its not modified by the server after making this change. New players will get the new settings and see the tree changes but players that had the client side file before the change didnt get an updated one so I had to have them add a copy of the one I replaced on the server to their client side folder for forest in the art folder. Now they see trees right.

Now on to the next battle my server is never empty LOL i'll try running this command from the console before starting my server in firedaemon so nobody can connect until after it updates.

User avatar
Cosimo
Zealous Believer
 
Posts: 140
Joined: 02 Jan 2016, 13:40

Re: Can we get a fix for the tree algorithm?

Post by Cosimo » 21 Mar 2017, 17:23

So we upped to 3 our <TreeAgingSpeed>3</TreeAgingSpeed> but we found now after 1 month of running that new players cannot find high quality trees (oaks seem to have died off).

As usual the question came, wipe or fix it.

I had a stab and found out that there needs to be a way to "change" trees to repopulate the server.... currently we have an invasion of pines and undergrowth.

Code: Select all
select count(*) from forest_patch where TreeHEalth = 2 and TREETYPE = 7


on a 2 week old DB: 2353
on a 1 month old DB: 1072

so basically the great oaks are halved!

I changes the TREETYPE of a few but my question is, is there a script to reseed the trees?


Girdian
True Believer
 
Posts: 56
Joined: 05 Mar 2015, 07:50

Re: Can we get a fix for the tree algorithm?

Post by Girdian » 23 Mar 2017, 04:59

I have been talking with Tolik in regards to the report I made about this issue. They are attempting to reproduce the issues they saw on my DB in their own DB by setting the day lengths to a couple minutes and upping the tree growth to 5 like I had it. They will then wait as the months go by and observe how the trees act. If no trees are disappearing that way, they will then plant 100 or more oak trees and see if the trees begin to disappear then. So this means they are looking into the issue.

In terms of a fix, the best I have been able to find is to significantly increase the agedeathborder and maxage. Mine are now set to 1700 and 2400. I have also played around with the percentages for densities. I have upped the max density for every region and have upped the densities of various trees and lowered that of spinny and hazel. In an attempt to restore the trees around the map, I have sped up the growth speed after making the changes I listed above. I also ran the old tree script at 30q in an attempt to get rid of a large portion of the underbrush and clear up forest cells.

In terms of a script to repopulate the server, I have not found anything for it yet.
Owner/Admin of The Great Kingdom

User avatar
Tufed
True Believer
 
Posts: 13
Joined: 16 May 2016, 08:48

Re: Can we get a fix for the tree algorithm?

Post by Tufed » 31 Mar 2017, 13:28

I saw this problem on my dedicated server. I had a game day time = 1 real hour. I still have oak trees in the forest with only qualities < 10. I can assume that there is a limit on the quality of new trees in the forest. I addressed this issue to the developers two months ago and did not get an understanding. I solved this problem by increasing the life time of trees and giving the players 100% quality seeds to plant. I can not say exactly where, but I'm configuring the game's config file to increase the lifetime of the trees.
Forgive my English, Google has come to me.


ThrainnLodur
 
Posts: 2
Joined: 27 May 2016, 07:41

Re: Can we get a fix for the tree algorithm?

Post by ThrainnLodur » 16 Apr 2017, 20:01

Hello there.
First i have to apologize for my english. Ist not my native language.

The issues with tree aging, dying and leaving a wasteland behind is nothing new to me.

we are running the lif-rungholt.de Isla Nebula Server and had some Problems with it too.

From a mathematically Point of view, we tried to solve the Problem.

first of all we were wondering about aging Speed.

as we have a 5 hour day cicle and wanted Players to be able to plant, lumber and use their trees in a way they were used to, we set aging Speed to 4.
This means: every day cicle a tree ages 4 growing periods as we knew it in the older versions.

the two death borders are pretty simple Things.

the first one means: earlyest Moment a tree dyes after he has been planted. We set that Value to 2200.
10 times the value, the Developers intended.
The second one means: latest possible death border. = Hit that Border and you are dead u puny git of a tree.
We set that Value to 3300.
10 times... you know what i want to say.

by aging 4 periods per game day you may divide the number of in game days we set the border to get the following:

2200 earliest divided by 4 = 550 day cicles. multiplied with daytimelength (5 in our case) you get 2750 Hours. Divided by 24 = 114,58 Days in real life. Minimum lifespan.

3300 latest death border divided by 4 = 825 day cicles. multiplied with daytimelength (again 5 ) you get 4125 hours. Divided by 24 = 171,87 Days in Real life. largest lifespan.

If you have another daycicle simply divide the real life days in this example by 5 and multiply by the daytimelength you have on your Server to know how Long will they last.

For example : 3 hours ingame days
114,58/5*3=68,748 Real life days. Minimum
171,87/5*3=103,12 Real life days. Maximum

The Trees will die within that range.

the next step for understanding ist the Kind of trees per sector.

oak Elm mulberry maple Hazel spinny birch willow spruce juniper

these 10 treetypes are the Kinds of trees you have availible.
now you just have to think about: "Where do i want those trees to be on my sectors?"

if you decide to have all 10 types in one sector, you have to add them in the forest.maintenance.

Then you have to think about the numer of forests you want in that sector. That is stated in the Biomes. if you want 10 forests Change that value to 10 for the selected sector.

Then you have to think about the density. Density states the percentile number of total forestsoil tiles occupied in that sector.
If you want 10 % of all tiles with a single Kind of tree set the value to density="0.1" decimal System as 1 is statet as 100%.


example:
<terrain id="445"> <!-- ШИРОКОЛИСТВЕННЫЙ ЛЕС -->
<BiomesCount>9</BiomesCount>
<MaxBiomeDensity>0.7</MaxBiomeDensity>
<AgeDeathBorder>2200</AgeDeathBorder>
<MaxAge>3300</MaxAge>
<Substance name="forestsoil">
<tree density="0.075" mean="0.4" maxBiomeOvergrowth="0.25">elm oak apple maple</tree>
<tree density="0.145" mean="0.4" maxBiomeOvergrowth="0">hazel</tree>
<tree density="0.155" mean="0.4" maxBiomeOvergrowth="0">spinny</tree>
<!--summ 0.375-->
</Substance>
</terrain>

37,5% of the forest soil tiles will be Forest.
Still a acceptable forest.

hope this will be helpfull.

oh... an a Little advice...

SAVE you forest.maintenance.
AND: insert it after EVERY FUCKING PATCH... we just forgot it once... now our Server is wiped off trees too, because we forgot to insert it after updating the Server to the latest Version. so really really really: instert this file as you want it to be again and again after every patch you bring to your Server.

User avatar
Deus-X-Incognita
 
Posts: 181
Joined: 24 Aug 2015, 11:31

Re: Can we get a fix for the tree algorithm?

Post by Deus-X-Incognita » 16 Apr 2017, 21:22

It just isn't working.

Even if we use the command
Code: Select all
forestStretchedMaintenance();

several times, there are just a few more trees (around 25), nothing worth mentioning - and especially nothing that would repopulate the world within 200 ingame days.
We used the command around 4-8 times, so that would mean, even if it was only 4 times, that we would have 200/4 = 50 ... 50*25 = 1250 new trees in 200 days. Yep, that will really populate our barren wasteland.
Especially since trees die in that time too.

There are so much questions regarding this, so i will start:

  1. Somewhen there was mentioned that wheather influences tree growth. Which wheater, how does it work?
  2. Our forest maintenance was cleared of one tree type - it still was planted with above command (forestStretchedMaintenance();). Why does it plant trees that it shouldn't?
  3. How can we see the current state of the maintenance? If it works,
    when it was run, etc.
  4. How can we easily see what the server planted in one maintenance?
  5. How can we watch what decisions the server makes regarding the planting? Somewhere along this decisions the script makes an error,
    but how can we find it? Maybe it was programmed so it tests only the grwoth of one tree per tree type? Could be that.
  6. All in all, the forest maintenace is definitly malfunctioning. And it seems it does this on many servers - if not all. Its only that the work of players that plant trees is covering the failure of the script up.
  7. Which data exactly do you need to find the errors? How shall we send it to you? A database dump isn't exactly that easy to send. Where to?

Just so many questions, and ones we shouldn't have, the tree system should work and plant. Not deforest the world.
Image
German RP Server


DarkArchaon
 
Posts: 17
Joined: 28 Nov 2015, 17:36

Re: Can we get a fix for the tree algorithm?

Post by DarkArchaon » 28 Jun 2017, 15:35

Any update to this, the tree are growing very slow.....

User avatar
SnowSharky
 
Posts: 29
Joined: 01 Jun 2016, 02:50

Re: Can we get a fix for the tree algorithm?

Post by SnowSharky » 28 Jun 2017, 19:27

Couple mistakes I see here:

1. Using a 4 digit value (anything over 999) for <MaxAge> and <AgeDeathBorder> will cause problems (less trees planted), values over roughly 1500 will cause no new trees to be planted, eventually leading to 0 trees on the server.

2. Instead of "forestStretchedMaintenance();" try using "forestMainThreadMaintenance();" to advance the forest.

Edit: Also worth noting that Nyuton has some tools to reforest your servers and get them setup correctly over at his site: https://terratool.nyuton.net/index.php

Return to General Discussion