• The move of Eco-Mods.com has taken place and the merge of our old officials forums is currently ongoing, read more here.

Modifying the growth rate of trees

raptor

Stone
Messages
1
Reaction score
0
Does anyone know of a mod/is willing to make one, that allows editing of the growth rate for trees?
 

nid

Copper
Trusted Dev
Mod Dev
Messages
67
Reaction score
22
Hello, welcome to the forums.

You don't really need any dedicated mod for the change you are after, you can make the edits yourself.

Files you need to edit are located in Eco\Eco_Data\Server\Mods\AutoGen\Plant

Let's assume you want to edit Ceiba tree. Just open the Ceiba.cs file, look for value this.MaturityAgeDays = ;

It is important to remember that growth rate of trees is expressed in real days so, if you want it in hours, you would need to lower it to something like 0.4 or so.

Code:
public partial class CeibaSpecies : TreeSpecies
        {
            public CeibaSpecies() : base()
            {
                species = this;
                this.InstanceType = typeof(Ceiba);

                // Info
                this.Decorative = false;
                this.Name = "Ceiba";
                this.DisplayName = Localizer.DoStr("Ceiba");
                // Lifetime
                this.MaturityAgeDays = 6;
                // Generation
                // Food
                this.CalorieValue = 12;
                // Resources
                this.PostHarvestingGrowth = 0;
                this.ScythingKills = false;
                this.PickableAtPercent = 0;
                this.ResourceList = new List<SpeciesResource>()
                {
                    new SpeciesResource(typeof(LogItem), new Range(0, 60), 1)
                };
                this.ResourceBonusAtGrowth = 0.9f;
                // Visuals
                // Climate
 

Pistola29

Stone
Messages
2
Reaction score
0
Hello, welcome to the forums.

You don't really need any dedicated mod for the change you are after, you can make the edits yourself.

Files you need to edit are located in Eco\Eco_Data\Server\Mods\AutoGen\Plant

Let's assume you want to edit Ceiba tree. Just open the Ceiba.cs file, look for value this.MaturityAgeDays = ;

It is important to remember that growth rate of trees is expressed in real days so, if you want it in hours, you would need to lower it to something like 0.4 or so.

Code:
public partial class CeibaSpecies : TreeSpecies
        {
            public CeibaSpecies() : base()
            {
                species = this;
                this.InstanceType = typeof(Ceiba);

                // Info
                this.Decorative = false;
                this.Name = "Ceiba";
                this.DisplayName = Localizer.DoStr("Ceiba");
                // Lifetime
                this.MaturityAgeDays = 6;
                // Generation
                // Food
                this.CalorieValue = 12;
                // Resources
                this.PostHarvestingGrowth = 0;
                this.ScythingKills = false;
                this.PickableAtPercent = 0;
                this.ResourceList = new List<SpeciesResource>()
                {
                    new SpeciesResource(typeof(LogItem), new Range(0, 60), 1)
                };
                this.ResourceBonusAtGrowth = 0.9f;
                // Visuals
                // Climate
Hello, I am new to this forum, I was searching for that exactly but I have a doubt about the values, so 1 means 24h and 0.1 means 2h24min,
but in some configs there are values like 0.8f I wonder what does the "f" means.
 

nid

Copper
Trusted Dev
Mod Dev
Messages
67
Reaction score
22
Welcome!

Yes, 1 will amount to 24 real hours.

f needs to be always added to the end of the number in case of this value - for example 0.5f Server expects a float value and by adding the f at the end of it, you are designating your number as float.
 

Pistola29

Stone
Messages
2
Reaction score
0
Welcome!

Yes, 1 will amount to 24 real hours.

f needs to be always added to the end of the number in case of this value - for example 0.5f Server expects a float value and by adding the f at the end of it, you are designating your number as float.
I figured it out when I tried to start my server after I post my first message here :LOL: I just put an f after all decimals then it worked :ROFLMAO:
But thank you for clarifying 😄👍
 

SirKakadu

Stone
Messages
1
Reaction score
0
Hello, welcome to the forums.

You don't really need any dedicated mod for the change you are after, you can make the edits yourself.

Files you need to edit are located in Eco\Eco_Data\Server\Mods\AutoGen\Plant

Let's assume you want to edit Ceiba tree. Just open the Ceiba.cs file, look for value this.MaturityAgeDays = ;

It is important to remember that growth rate of trees is expressed in real days so, if you want it in hours, you would need to lower it to something like 0.4 or so.

Code:
public partial class CeibaSpecies : TreeSpecies
        {
            public CeibaSpecies() : base()
            {
                species = this;
                this.InstanceType = typeof(Ceiba);

                // Info
                this.Decorative = false;
                this.Name = "Ceiba";
                this.DisplayName = Localizer.DoStr("Ceiba");
                // Lifetime
                this.MaturityAgeDays = 6;
                // Generation
                // Food
                this.CalorieValue = 12;
                // Resources
                this.PostHarvestingGrowth = 0;
                this.ScythingKills = false;
                this.PickableAtPercent = 0;
                this.ResourceList = new List<SpeciesResource>()
                {
                    new SpeciesResource(typeof(LogItem), new Range(0, 60), 1)
                };
                this.ResourceBonusAtGrowth = 0.9f;
                // Visuals
                // Climate
I have a problem with this:
when i start the server (i rent a server) every single file changes to default.
i dont know what to do. maybe startparameters?

thanks for your help!
 

nid

Copper
Trusted Dev
Mod Dev
Messages
67
Reaction score
22
I have a problem with this:
when i start the server (i rent a server) every single file changes to default.
i dont know what to do. maybe startparameters?

thanks for your help!
Hey. This may be specific to the hoster you are using. Feel free to add me on discord - nid#3035 , or join my channel - I will try to help there.
 
Top Bottom