Mods / Grief Logger
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.
@MadGnome
You might need to delete your old modconfig file to get this new version working.
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
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)
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.
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.
Has this been tested for 1.19.3?
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.
work in 1.19.4 ?
Now it requires installation on the server only. The client doesn't need it.
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.
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
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!