[MOD] Log Building Deletion

Place for sharing your game modifications for Life is Feudal: Your Own

RudgerWolvram
 
Posts: 37
Joined: 01 Jan 2015, 22:27

[MOD] Log Building Deletion

Post by RudgerWolvram » 16 Feb 2015, 23:41

OK, so this came about because of post:
findin-griefers-decontructed-buildings-t11732/

Trying to locate a specific object that was deconstructed via a griefer is not quite straight forward when combing logs. Namely, someone could deconstruct something they misplaced and from the log you can't tell if they deconstructed a half finished keep or a lamp post.

So i made a small SQL mod that will log any time an unmovable item is deleted/deconstructed. It stores the objecttypeid, name and geo locationID along with a time stamp.

Since this takes an extra table, we'll set that up first.
Spoiler


Then 2 lines of code need to be added to the p_deleteUnmovableObject procedure. Now this is a game procedure, meaning it can be overwritten with a patch if they change something. Currently, it is not in the patch.sql file, but it could be some day, so you will need to update patch.sql when they do.

In p_deleteUnmovableObject make some space between lines:
START TRANSACTION; and select RootContainerID

Then paste these 2 lines.
Spoiler


Now, every time the server calls the p_deleteUnmovableObject log when someone decontructs something, a log of it will be created in the object_delete_table. just select * from object_delete_table to find the object you are looking for that existed.

Then once you have the right object and GeoDataID, you can search the log files and find where the object was deconstructed based on the GeoDataID and find who did it.

On how to find it, here's the response to the original thread.
Spoiler

Return to Game mods