Mods / Grief Logger

Category: #Utility
Author: codeAtorium
Side: Server
Created: Mar 27th at 4:22 PM
Last modified: 1 day ago
Downloads: 343
Follow Unfollow 5

Latest file for Various v1.19.x:
grief_logger_0.0.21.zip 1-click install


This mod works by storing information about placed and broken/used blocks in the savegame file.  When a user first places a block in a chunk, it marks the chunk with a unique id, and used that id to key the placed block information in the file. Then, when a user breaks a block, it checks for the presence of that id, and if it finds it, compares the block being broken to the blocks in that chunk's placed block information.  If it finds a matching block that was placed by a different player, it marks that in a single table. The mod creates a grief-log.csv file that is openable in Google Sheets or Microsoft Excel.

It outputs a grief_log.json file to the modconfig folder where you can set a few settings. This will allow you to trim the length of the grief log, whitelist low value items like soil, set the chat group that receives the grief announcement (acceptable vakyes are: AllChatGroups, ConsoleGroup, DamageLogChatGroup, GeneralChatGroup, InfoLogChatGroup, ServerInfoChatGroup), and limit the announcements by the player's role (remove any roles from the list you don't want).  

The mod also detects when a player places a bomb within radius of a griefable block and announces it once (not for all blocks in threat, since there are many).  

The mod also detects animal griefing.  In order to be recognized, the animal must be non-wild (generation 1), and must be on claimed land that is not the killing player's.  Thanks to funnybunnyofdoom whose code on github helped me to accomplish this.

Remember that this mod tracks ownership of all placed blocks.  That means it can be used to determine who placed a block next to claimed land, or on top of public paths. (Breaking the block will reveal who placed it in the grieflog.) 

Please let me know if you're experiencing any errors or slowdowns on your server.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v0.0.21 5 1 day ago Show grief_logger_0.0.21.zip Install now
v0.0.20 6 2 days ago Show grief_logger_0.0.20.zip Install now
v0.0.19 14 5 days ago Show grief_logger_0.0.19.zip Install now
v0.0.18 9 Apr 17th at 12:25 AM Show grief_logger_0.0.18.zip Install now
v0.0.17 15 Apr 16th at 11:58 PM Show grief_logger_0.0.17.zip Install now
v0.0.16 16 Apr 16th at 9:39 PM Show grief_logger_0.0.16.zip Install now
v0.0.14 17 Apr 16th at 8:55 PM Show grief_logger_0.0.14.zip Install now
v0.0.13 16 Apr 16th at 5:05 PM Show grief_logger_0.0.13.zip Install now
v0.0.12 15 Apr 16th at 3:13 AM Show grief_logger_0.0.12.zip Install now
v0.0.11 16 Apr 16th at 1:19 AM Show grief_logger_0.0.11.zip Install now
v0.0.10 18 Apr 15th at 4:30 AM Show grief_logger_0.0.10.zip Install now
v0.0.9 18 Apr 15th at 3:18 AM Show grief_logger_0.0.9.zip Install now
v0.0.8 14 Apr 13th at 4:19 AM Show grief_logger_0.0.8.zip Install now
v0.0.7 14 Apr 12th at 4:49 PM Show grief_logger_0.0.7.zip Install now
v0.0.6 36 Mar 29th at 5:56 AM Show grief_logger_0.0.6.zip Install now
v0.0.2 25 Mar 28th at 7:24 AM Show grief_logger_0.0.2.zip Install now
v0.0.1 31 Mar 27th at 4:46 PM Show griefloggerwithharmony_0.0.1.zip Install now
v 24 Mar 28th at 2:17 PM Show grief_logger_0.0.4.zip
v 27 Mar 28th at 6:18 PM Show grief_logger_0.0.4.zip

12 Comments (oldest first | newest first)

💬 codeAtoriumAuthor, Apr 10th at 11:49 PM

@MadGnome

  1. I think I fixed a null bug in DidUseBlock, but I wasn't able to reproduce it.  Time will tell.
  2. You can now filter messages by role.  This can be set in the config file.  Currently all roles are included, so you can just eliminate the ones you don't want.
  3. If the block is in a claimed area, it doesn't log or report the grief.  If there's some special logic that's needed in these cases, fine, but I assume if you're allowed to work in the claimed area, you're not griefing.
  4. You can now set the chat channel in the config.  Acceptable values are: AllChatGroups, ConsoleGroup, DamageLogChatGroup, GeneralChatGroup, InfoLogChatGroup, ServerInfoChatGroup

You might need to delete your old modconfig file to get this new version working.

💬 MadGnome, Apr 9th at 2:10 PM

Getting quite a few error messages in my logs:
server-main, server-event
9.4.2024 07:59:26 [Error] Mod exception during DidUseBlock
9.4.2024 07:59:26 [Error] Exception: Object reference not set to an instance of an object.
at grieflogger.griefloggerModSystem.getLogString(String locString, IServerPlayer byPlayer, BlockSelection blockSel, List`1 oldData) in C:\Users\jgord\source\repos\grief_logger\grief_logger\grief_loggerModSystem.cs:line 172
at grieflogger.griefloggerModSystem.possibleGriefEvent(IServerPlayer byPlayer, BlockSelection blockSel) in C:\Users\jgord\source\repos\grief_logger\grief_logger\grief_loggerModSystem.cs:line 214
at Vintagestory.Server.ServerEventManager.TriggerDidUseBlock(IServerPlayer player, BlockSelection blockSel) in VintagestoryLib\Server\ServerEventManager.cs:line 553

💬 MadGnome, Apr 8th at 12:16 AM

Some feedback from testing this out on a server currently, we seem to avg around 6-15 players online.  We are currently running it on VS 1.19.7, server has 100+ mods on it.

Haven't noticed any performance issues yet, it's handy getting the grief notifications, our players have been poking and prodding it to see how it works.

Couple of things.

Is there anyway to filter the messages to just the admins, or by role?

It logs griefs when a small team is sharing the same claimed space, even though they have the permissions from claims to mine those blocks.  Could a feature be added to not report griefing, or disable that chat message, when players have permissions to mine blocks in a claim?

Would there be a way to get the messages in the main chat, since discord bots don't recognize other chat channels.  If the server does a reset the logs are lost, but if it's in the main chat to discord it's recorded there forever for an Admin to find it.

I appreciate the work you've put into this, so far it's working very well and we haven't encountered any errors while testing.  (I'm in the main VS Discord under the same name)

💬 FunnyBunnyofDOOM, Apr 6th at 2:03 AM

This is great! Let's colaborate if you'd like to. I'd like to help get animal tracking into this. I sent you a discord request.

💬 codeAtoriumAuthor, Apr 1st at 2:45 AM

Currently this is only tested on 1.19.5, but I expect that it proably works for 1.19.* and maybe 1.18.*.  If you test it and find it does or doesn't work, please let me know.

💬 Aki_II, Mar 31st at 1:43 AM

Has this been tested for 1.19.3?

💬 codeAtoriumAuthor, Mar 29th at 5:55 AM

I think it will work in 1.19.4, but I haven't tested it.  I marked it as compatible, but let me know if you have issues.

💬 MrL972, Mar 29th at 2:54 AM

work in 1.19.4 ?

💬 codeAtoriumAuthor, Mar 28th at 2:17 PM

Now it requires installation on the server only.  The client doesn't need it.

💬 codeAtoriumAuthor, Mar 28th at 7:07 AM

I think I have a solution to the lag issues that other mod ran into.  I'm storing the placement data on a per chunk basis, which makes it much quicker to query and save.  That new version is live.  I've included the source in it, if anyone wants to take a look.

💬 Kara, Mar 28th at 2:53 AM

i guess ill wait. 
check out https://mods.vintagestory.at/blocklog i think all its code wasnt turned into a dll file. it might help, with progression. RogueRaiden, yah the one i posted. we stopped using it, cause of the lag it would cause xD having something like https://www.spigotmc.org/resources/logblock.67333/ for VS would be amazing xD

💬 RogueRaiden, Mar 27th at 6:47 PM

This could be an absolutely amazing addition to servers!
The last mod that was doing this was fantastic for a while but it ended up causing world saves to take several seconds, 5-10+ seconds at times with lots of activity (20+ player activity after several hours, problem would compound). Made it too much of a issue to use.
Looking forward to more updates!

(edit comment delete)