Delete poor quality trees / monthly auto uproot

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Azzerhoden
Alpha Tester
 
Posts: 1621
Joined: 08 May 2014, 17:44

Re: Delete poor quality trees / monthly auto uproot

Post by Azzerhoden » 18 Aug 2015, 20:43

Vande wrote:Wondering if this still works too.


Yes. I run it. As been mentioned multiple times, make sure you have a solid backup.

I actually changed mine to remove quality under 35 trees, and that made a huge difference.
| - Alpha Tester and Zealous Believer
Image

Kingdom of Hyperion founding Duchy - A practical RP Community est. 1999 - Apply Today!


S3ktor
 
Posts: 3
Joined: 21 Aug 2015, 14:53

Re: Delete poor quality trees / monthly auto uproot

Post by S3ktor » 09 Sep 2015, 10:44

Does this script working on a "create server"?


Dragoneye85
 
Posts: 5
Joined: 28 Nov 2014, 09:56

Re: Delete poor quality trees / monthly auto uproot

Post by Dragoneye85 » 27 Oct 2015, 15:24

I would also like to know if I can use this script for a "create a world" server. I only play with my girlfriend on the local server and all the low level trees are realy to much.

User avatar
KhaimovMR
 
Posts: 77
Joined: 10 Oct 2015, 01:39

Re: Delete poor quality trees / monthly auto uproot

Post by KhaimovMR » 19 Nov 2015, 23:18

Thanks to the author of the script.

I'm going to use it's idea in next version of LiFDS-CP (LiF dedicated server control panel) to clean out all the low quality trees on a single button click.
Spoiler

PS: If someone has an ideas to implement into lifds-cp you're welcome, guys: LiFDS-CP

User avatar
HolyCrusader
Beta Tester
 
Posts: 251
Joined: 24 Nov 2014, 15:47

Re: Delete poor quality trees / monthly auto uproot

Post by HolyCrusader » 20 Nov 2015, 01:10

KhaimovMR wrote:Thanks to the author of the script.

I'm going to use it's idea in next version of LiFDS-CP (LiF dedicated server control panel) to clean out all the low quality trees on a single button click.
Spoiler

PS: If someone has an ideas to implement into lifds-cp you're welcome, guys: LiFDS-CP

I would implement safeguards for this feature such as preventing people from using it unless the server is down.

User avatar
KhaimovMR
 
Posts: 77
Joined: 10 Oct 2015, 01:39

Re: Delete poor quality trees / monthly auto uproot

Post by KhaimovMR » 20 Nov 2015, 16:55

Yes. This thing is already in upcoming features.
Some of menu items will not be executed on server-side unless it has a "DOWN" status.


Afpgij
Beta Tester
 
Posts: 15
Joined: 10 Jul 2015, 11:08

Re: Delete poor quality trees / monthly auto uproot

Post by Afpgij » 26 Nov 2015, 21:13

still work this command?when i execute it i get a error sintax in line 6. but in my local server it work, the server is host in vilayer


Thenavydoc
 
Posts: 18
Joined: 06 Nov 2015, 16:24

Re: Delete poor quality trees / monthly auto uproot

Post by Thenavydoc » 18 Dec 2015, 22:55

that worked beautifully. I ran it at 50 as a query.
Image

Image


Zhalls
Alpha Tester
 
Posts: 89
Joined: 14 Mar 2014, 19:30

Re: Delete poor quality trees / monthly auto uproot

Post by Zhalls » 08 Jan 2016, 21:09

Works perfectly as of today's date, 1/8/16

When adding it to the my Heidi query, it spat out an error, despite working just fine server side. But when I added it to the very end of my patch file, it worked and without error. I suggest the patch route.


Cratos
Zealous Believer
 
Posts: 4
Joined: 30 Jan 2016, 16:50

Re: Delete poor quality trees / monthly auto uproot

Post by Cratos » 30 Jan 2016, 16:56

Where should I put the code???


TheZar
 
Posts: 108
Joined: 20 Jan 2015, 01:50

Re: Delete poor quality trees / monthly auto uproot

Post by TheZar » 02 Mar 2016, 03:47

How would one modify this to remove all those ugly Birch trees


Raynedarkwave
 
Posts: 2
Joined: 05 Mar 2016, 23:11

Re: Delete poor quality trees / monthly auto uproot

Post by Raynedarkwave » 06 Mar 2016, 00:58

Greetings, some of my server asked about a way to delete bad quality trees and i reached here looking, and well i am not really used to scripting, and also dont know how this thing work...

So i have understand well,i shall add the script machine posted in his/her answer inside the "patch.sql"(made a copy just in case) found in the sql folder inside server folder... at the end of it and save it, and it will delete all the trees under the quality specified in that script, in this case 80?

but i have also read that some use that script other way, like just running it once instead of putting it inside the patch.sql... and i would love to know how to make it that way...

This is kind of new to me so it looks messy, thanks for the patience :oops:


Kael
True Believer
 
Posts: 48
Joined: 03 Jan 2016, 16:05

Re: Delete poor quality trees / monthly auto uproot

Post by Kael » 28 Mar 2016, 14:36

problem solved


Catherine
 
Posts: 31
Joined: 01 Mar 2016, 10:00

Re: Delete poor quality trees / monthly auto uproot

Post by Catherine » 04 Jun 2016, 15:11

Kael wrote:problem solved



i have a problem too in our server is lagging like crazy with so much trees.
i am a newb in database files.
can you help me getting there?


Gchristopher
 
Posts: 33
Joined: 20 Apr 2016, 21:58

Re: Delete poor quality trees / monthly auto uproot

Post by Gchristopher » 05 Jun 2016, 06:27

Padme wrote:
Kael wrote:problem solved



i have a problem too in our server is lagging like crazy with so much trees.
i am a newb in database files.
can you help me getting there?

Larainan wrote up a good summary for deleting low-quality trees. Here's a good alternate approach to delete only low-quality trees that have grown since the game started.

If you're new to databases, try to find a friend to help who understands the steps, or at least be sure you know how to backup and restore your server database, so you can safely figure it out through trial and error!


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 14 Jun 2016, 12:30

Guys, can you confirm this script is still working since last patch?

I have a server hosted @ Pingperfect. It's running OK, but there are too many trees. Log in times are huge and you can't really use your horse in the forest. Also, when the trees grow, the server lags a lot, probably applying the growing script to all trees.

I have read the whole topic, and apparently the best way of doing it is through patch.sql.

Can I use the same script no problem? If I understood corretly, I just copy and paste at the end of my patch.sql, set quality of trees I want (in my case 10), upload the new patch.sql file and restart the server?


Silvazar
 
Posts: 2
Joined: 18 Jun 2016, 21:14

Re: Delete poor quality trees / monthly auto uproot

Post by Silvazar » 26 Jun 2016, 04:05

KevlarBR wrote:Guys, can you confirm this script is still working since last patch?

I have a server hosted @ Pingperfect. It's running OK, but there are too many trees. Log in times are huge and you can't really use your horse in the forest. Also, when the trees grow, the server lags a lot, probably applying the growing script to all trees.

I have read the whole topic, and apparently the best way of doing it is through patch.sql.

Can I use the same script no problem? If I understood corretly, I just copy and paste at the end of my patch.sql, set quality of trees I want (in my case 10), upload the new patch.sql file and restart the server?


I am in the exact same predicament. did you have any luck with it?


TheZar
 
Posts: 108
Joined: 20 Jan 2015, 01:50

Re: Delete poor quality trees / monthly auto uproot

Post by TheZar » 26 Jun 2016, 09:00

Silvazar wrote:
KevlarBR wrote:Guys, can you confirm this script is still working since last patch?

I have a server hosted @ Pingperfect. It's running OK, but there are too many trees. Log in times are huge and you can't really use your horse in the forest. Also, when the trees grow, the server lags a lot, probably applying the growing script to all trees.

I have read the whole topic, and apparently the best way of doing it is through patch.sql.

Can I use the same script no problem? If I understood corretly, I just copy and paste at the end of my patch.sql, set quality of trees I want (in my case 10), upload the new patch.sql file and restart the server?


I am in the exact same predicament. did you have any luck with it?


It needs to be put at the end of Dump.sql


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 28 Jun 2016, 13:07

Silvazar wrote:I am in the exact same predicament. did you have any luck with it?


I didn't have the balls yet to run it, but I think I will. Trees are getting on my nerves, man... But I think it is, yes.


TheZar wrote:It needs to be put at the end of Dump.sql


Dump.sql or Patch.sql? I'm not sure. Anyways, what I think I'll do is shut down the server, back it up, run a query with the code to remove the trees, add the tree spawn removal code and start the server again...


Gms0012
 
Posts: 166
Joined: 23 Feb 2015, 08:49

Re: Delete poor quality trees / monthly auto uproot

Post by Gms0012 » 28 Jun 2016, 16:55

dump
Image


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 28 Jun 2016, 18:46

Damn lol!

If I put it in the dump, it will run every time I restart the server?


Gchristopher
 
Posts: 33
Joined: 20 Apr 2016, 21:58

Re: Delete poor quality trees / monthly auto uproot

Post by Gchristopher » 28 Jun 2016, 19:14

It's a little more work, but here's discussion of a better option for cleaning up excessive tree growth.


Silvazar
 
Posts: 2
Joined: 18 Jun 2016, 21:14

Re: Delete poor quality trees / monthly auto uproot

Post by Silvazar » 29 Jun 2016, 05:43

KevlarBR wrote:
Silvazar wrote:I am in the exact same predicament. did you have any luck with it?


I didn't have the balls yet to run it, but I think I will. Trees are getting on my nerves, man... But I think it is, yes.


TheZar wrote:It needs to be put at the end of Dump.sql


Dump.sql or Patch.sql? I'm not sure. Anyways, what I think I'll do is shut down the server, back it up, run a query with the code to remove the trees, add the tree spawn removal code and start the server again...


I hate to let you be the one to try first KevlarBR but did it work out? I am spooked that it will end up corrupting my database and all the poeple on my server will lose all their work.


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 30 Jun 2016, 18:19

Silvazar wrote:
KevlarBR wrote:
Silvazar wrote:I am in the exact same predicament. did you have any luck with it?


I didn't have the balls yet to run it, but I think I will. Trees are getting on my nerves, man... But I think it is, yes.


TheZar wrote:It needs to be put at the end of Dump.sql


Dump.sql or Patch.sql? I'm not sure. Anyways, what I think I'll do is shut down the server, back it up, run a query with the code to remove the trees, add the tree spawn removal code and start the server again...


I hate to let you be the one to try first KevlarBR but did it work out? I am spooked that it will end up corrupting my database and all the poeple on my server will lose all their work.


Stilll haven't done it, hahaha!! I'm afraid it will fook up my archives as well, and I don't understand much about programing... So far, I've only downloaded HeidiSQL and learned to make backups... When I'm confident with that I'll try the script... Unless you wanna go first! hahaha


Gchristopher
 
Posts: 33
Joined: 20 Apr 2016, 21:58

Re: Delete poor quality trees / monthly auto uproot

Post by Gchristopher » 30 Jun 2016, 19:14

If you can make a backup and restore from it, you'll definitely be okay.

The code posted by Machine in the second post of this thread definitely works for the current version of LiF. (Though his removes under quality 80 and you probably don't want to remove that many.)

Running the code once against the database via HeidiSQL (or mysql) is probably a good idea.

Here is some code you can add to the main.cs file on the server file to slow down tree growth dramatically.

Again, that thread also contains a much cleaner way to reset your trees without losing player-planted ones than deleting everything under a certain quality.


Woundedcern
 
Posts: 2
Joined: 29 May 2016, 18:07

Re: Delete poor quality trees / monthly auto uproot

Post by Woundedcern » 04 Jul 2016, 15:09

cant seem to get this working, does it work with patch 1.1.1.15 if so then would someone please help me get it up and running.


Woundedcern
 
Posts: 2
Joined: 29 May 2016, 18:07

Re: Delete poor quality trees / monthly auto uproot

Post by Woundedcern » 04 Jul 2016, 17:16

this mod works fine but the problem i was haveing was everyone keeps saying to mod wrong file, the file that needs to be moded is the dump.sql file. mod is a one time use mod so doesnt run while game is running only on restarts.


TheZar
 
Posts: 108
Joined: 20 Jan 2015, 01:50

Re: Delete poor quality trees / monthly auto uproot

Post by TheZar » 05 Jul 2016, 13:00

Woundedcern wrote:this mod works fine but the problem i was haveing was everyone keeps saying to mod wrong file, the file that needs to be moded is the dump.sql file. mod is a one time use mod so doesnt run while game is running only on restarts.


It used to be patch.sql, but it's now dump.sql


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 05 Jul 2016, 23:35

OK, it worked fine.

For all the noobs in server stuff like me out there, heres a quick step by step:

1. Shut down your server. THIS IS VERY IMPORTANT!!!
2. Copy Machine's code (second post on this thread: delete-poor-quality-trees-monthly-auto-uproot-t8393/). Make sure you copy THE WHOLE code... If you leave lines out, it will fail
3. Paste it on HeidiSQL and run it as query
4. Restart the server

I also added Alakarsiann's code to avoid random tree spawn on main.cs. I downloaded it, added it to the end of the file and uploaded the new version. You can find it in this thread: tree-modifications-for-the-rented-server-part-1-t15928/

hope it helps!


KevlarBR
True Believer
 
Posts: 20
Joined: 10 Jun 2016, 12:05

Re: Delete poor quality trees / monthly auto uproot

Post by KevlarBR » 06 Jul 2016, 11:58

Also, first I did it with Quality < 6. That deleted all trees with quality 5 and below (6s were still there). This deleted like 25% of the trees. It was better, but you would still eventually see some trees bunched up in a way you couldn't pass through them or would make hard-to-ride-a-horse-here areas.

I shut down the server again and I ran the script again, this time with Quality < 8. That deleted the 6s and 7s too.

Perfection! I have a server with significantly less trees (I would say around 50% less), no trees bunched up, but at the same time, there was barely any change in the scenery and lots of trees in the map (no near clears or bald spaces in the map).

:Yahoo!:

Return to Game mods