Mods / Grief Logger
Author: codeAtorium
Side: Server
Created: Mar 27th at 4:22 PM
Last modified: Apr 30th at 5:05 PM
Downloads: 1876
Follow Unfollow 10
Latest file for Various v1.19.x:
grief_logger_0.0.23.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.
UPDATE: I will not be continuing development of this or any of my mods. Please feel free to fork them and continue development.
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v0.0.23 | 152 | Apr 30th at 5:05 PM | Show | grief_logger_0.0.23.zip | Install now | |
v0.0.22 | 69 | Apr 29th at 4:40 AM | Show | grief_logger_0.0.22.zip | Install now | |
v0.0.21 | 92 | Apr 26th at 3:45 AM | Show | grief_logger_0.0.21.zip | Install now | |
v0.0.20 | 94 | Apr 24th at 9:28 PM | Show | grief_logger_0.0.20.zip | Install now | |
v0.0.19 | 85 | Apr 21st at 8:03 AM | Show | grief_logger_0.0.19.zip | Install now | |
v0.0.18 | 80 | Apr 17th at 12:25 AM | Show | grief_logger_0.0.18.zip | Install now | |
v0.0.17 | 86 | Apr 16th at 11:58 PM | Show | grief_logger_0.0.17.zip | Install now | |
v0.0.16 | 83 | Apr 16th at 9:39 PM | Show | grief_logger_0.0.16.zip | Install now | |
v0.0.14 | 84 | Apr 16th at 8:55 PM | Show | grief_logger_0.0.14.zip | Install now | |
v0.0.13 | 86 | Apr 16th at 5:05 PM | Show | grief_logger_0.0.13.zip | Install now | |
v0.0.12 | 77 | Apr 16th at 3:13 AM | Show | grief_logger_0.0.12.zip | Install now | |
v0.0.11 | 82 | Apr 16th at 1:19 AM | Show | grief_logger_0.0.11.zip | Install now | |
v0.0.10 | 87 | Apr 15th at 4:30 AM | Show | grief_logger_0.0.10.zip | Install now | |
v0.0.9 | 84 | Apr 15th at 3:18 AM | Show | grief_logger_0.0.9.zip | Install now | |
v0.0.8 | 78 | Apr 13th at 4:19 AM | Show | grief_logger_0.0.8.zip | Install now | |
v0.0.7 | 79 | Apr 12th at 4:49 PM | Show | grief_logger_0.0.7.zip | Install now | |
v0.0.6 | 98 | Mar 29th at 5:56 AM | Show | grief_logger_0.0.6.zip | Install now | |
v0.0.2 | 97 | Mar 28th at 7:24 AM | Show | grief_logger_0.0.2.zip | Install now | |
v0.0.1 | 93 | Mar 27th at 4:46 PM | Show | griefloggerwithharmony_0.0.1.zip | Install now | |
v | 92 | Mar 28th at 2:17 PM | Show | grief_logger_0.0.4.zip | ||
v | 91 | Mar 28th at 6:18 PM | Show | grief_logger_0.0.4.zip |
And where is that csv file located?
28.5.2024 16:29:35 [Error] Object reference not set to an instance of an object.
28.5.2024 16:29:43 [Error] Exception: Index and count must refer to a location within the string. (Parameter 'count')
at System.String.Remove(Int32 startIndex, Int32 count)
at grieflogger.griefloggerModSystem.OnEntityDeath(Entity entity, DamageSource damageSource) in C:\Users\jgord\source\repos\grief_logger\grief_logger\grief_loggerModSystem.cs:line 532
at Vintagestory.API.Common.Entities.Entity.Die(EnumDespawnReason reason, DamageSource damageSourceForDeath) in VintagestoryApi\Common\Entity\Entity.cs:line 1706
at Vintagestory.API.Common.EntityPlayer.Die(EnumDespawnReason reason, DamageSource damageSourceForDeath) in VintagestoryApi\Common\Entity\EntityPlayer.cs:line 1177
at Vintagestory.GameContent.EntityBehaviorHealth.OnEntityReceiveDamage(DamageSource damageSource, Single& damage) in VSEssentials\Entity\Behavior\BehaviorHealth.cs:line 169
at Vintagestory.API.Common.Entities.Entity.ReceiveDamage(DamageSource damageSource, Single damage) in VintagestoryApi\Common\Entity\Entity.cs:line 813
at Vintagestory.GameContent.AiTaskMeleeAttack.attackTarget() in VSEssentials\Entity\AI\Task\TasksImpl\AiTaskMeleeAttack.cs:line 173
at Vintagestory.GameContent.AiTaskMeleeAttack.ContinueExecute(Single dt) in VSEssentials\Entity\AI\Task\TasksImpl\AiTaskMeleeAttack.cs:line 146
at Vintagestory.GameContent.AiTaskManager.OnGameTick(Single dt) in VSEssentials\Entity\AI\Task\AiTaskManager.cs:line 174
at Vintagestory.GameContent.EntityBehaviorTaskAI.OnGameTick(Single deltaTime) in VSEssentials\Entity\AI\Task\BehaviorTaskAI.cs:line 114
at Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\Entity.cs:line 874
at Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityAgent.cs:line 540
at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 330
at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 169
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 886
GRIEFLOG (claim error): Object reference not set to an instance of an object.
shown in console without further infos
Also the grief logger makes players jump to the info chat tab every time someone is griefing, which is kind of annoying.
It should log without forcing people to another chat tab.
@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!