[How] Get graves out of yigd_grave_data.dat
itsdinkd opened this issue · 30 comments
So I have a player that I need to restore his grave and in game, he has no graves. however, in the data file, it is there. How can I restore the grave from whats in the data file?
You can attach files to your github comment, or you can link to pastebin or something. There is a file in your save folder (world/data/yigd_grave_data.dat) that if possible, I would like to take a look at. If you can't attach that file putting it in a zip file usually works. Otherwise you don't have to share it I just think that the likelyhood of me finding the source of the issue might be a little bit better if you do
Howdy, I am the player in question
So when i died the grave appeared as normal
I then reentered the space where the grave was and when i got within 5 blocks the grave was struck by lightning and disappeared
The GUI does not show the grave at all even when all boxes are checked so i know it wasn't destroyed
Last time i had a grave struck by lightning it turned invisible but i was still able to claim it
This isnt the case this time
Ill find the file and check that as soon as I can
You can attach files to your github comment, or you can link to pastebin or something. There is a file in your save folder (world/data/yigd_grave_data.dat) that if possible, I would like to take a look at.
If you can't attach that file putting it in a zip file usually works. Otherwise you don't have to share it I just think that the likelyhood of me finding the source of the issue might be a little bit better if you do
Here's the server's data file. Also, soul bound doesn't seem to work either.
yigd_grave_data.zip
Ok so likely somthing went wrong when you died then. I can't see your user in the data file, at least not with any graves stored, which is a bit weird unless the server reset the data file for some reason, and previous deaths was deleted. I can't quite figure out why or where the grave failed to spawn however. If anyone that would have had this bug happen to them previously that has access to the logs, I would appreciate if you could send them my way. If you don't want to publish the logs publicly you can send them to me on discord DMs (Pixel#6974, I'm in your aqm discord server), or just send a small part of the logs if you're able to determine where in the logs this happened
If you want I can send the full logs, but this is the section where I died and my grave disappeared.
https://pastebin.com/WUL2tTCY
Let me know if you can't access this for some reason btw.
If you want I can send the full logs, but this is the section where I died and my grave disappeared. https://pastebin.com/WUL2tTCY Let me know if you can't access this for some reason btw.
Am I correct in that you didn't die at X: 505 / Y: 74 / Z: -2211 / overworld
? If you don't know that's fine I just can't see a way you died there and no backup data was generated. Also I know this is your client's logs, which I guess helps a little bit but not really to identify the source of the issue. For that I need the server log. Thanks anyway
I'm afraid there isn't. Were you killed by another player with a renamed sword or something? Trying to track down the actual cause of this issue, and this is sort of the best I have to go on so far
has to be an issue with the replace block feature. this wasn't happening prior to this feature
here is the config I use in my pack https://pastebin.com/UX3VDCK8
Players A and B killed by another player, and player C by a mob.
Player A with a renamed sword, grave disappeared
Player B with a normal sword, not renamed, grave disappeared
Player B was also killed with a Gobber bow, same issue
If you want I can send the full logs, but this is the section where I died and my grave disappeared. https://pastebin.com/WUL2tTCY Let me know if you can't access this for some reason btw.
also why did Beans grave generate over 1k blocks away from where they died? Is it possible the grave is there, but not in GUI? This isn't the first time the grave did not spawn anywhere it said in GUI.
Beans -- where you in a protected claim
I was able to destroy blocks so I don't believe it was a protected claim, also it was in the mining dimension.
When a player respawns they will get a message about where their last grave generated. So it's probably an old/claimed grave in the message. I will try to test with another player to see if I can reproduce the issue. I'm leaving for a vacation tomorrow however, and I have to release an update before then, so there is a chance I can't fix this issue until I get home again
You could try restoring the grave from the GUI. Do /yigd grave [playername]
as usual, and then check all the boxes in the top of the GUI screen (filters). If that doesn't show the grave I would assume something has went really wrong, and I'm afraid I can't really help you. But since it's in the grave data file, and you can see it in there, it should work.
If this player could provide more info about how they died that would also help.
I'm honestly confused about how the grave is in the .dat file but not in the GUI. The only way I can see this happening is that they die, someone clears their backups with the /yigd clear [user]
and then before the world is saved the .dat file is checked.
Either that or I think somehow the data might've corrupted, and not loaded. Could be due to a crash or something. Knowing more about perhaps what the data say or logs or something could help, but could as well be a dead end which will have everything make less sense
The player has responded upon my request for more information;
"Another player killed me to test his sword and when he did it didn’t show a kill log in chat nor did it drop a grave. Like the game didn’t register that he killed me but I still died and respawned with nothing."
Unfortunately I do not have any logs for this
So he joined, we ticked all the boxes to make sure. still nothing, but the data is in that backup file still.
Could I see that data perhaps? I don't know if something is going wrong when reading the file or not. I saw someone mention in your discord server again that since someone died before a crash "the grave is gone". Idk the context to that, but could again be something with the server not loading the data file properly. I would appreciate if I could see this data file and perhaps test it on a local server myself to find out why the info won't appear
Howdy, while I am not the player in question, I have very recently experienced the exact same bug where my grave is fully gone. It's not in yigd at all.
I was killed by a player (consensually) and my grave just disappeared.
I also do have my logs, but I'm not really sure how you'd want me to give them to you
Ok let me explain in more depth how the code/mod works to hopefully answer your questions. All the grave data is stored in a list. Here each entry in the list have info about the death, if the grave is claimed/destroyed/available, and the graves also have an ID. This is a uuid, so that's mainly the reason you can't restore graves with the id in the command. When a player respawn however, and after checking all the soulbound stuff, the mod will find the latest entry in this grave data list. Currently the availability state doesn't matter, however I will change this once I get back from my vacation. But in a nutshell that's how that works. I'm not sure how usable it would be to use the grave ID in the command since the only way of getting it is the .dat file. The commands are since latest version I believe usable server side. At least those that doesn't bring up a gui. There's no command feedback unless ran by a player though
If something is still unclear or if you have any more questions feel free to ask. Can't do much more than gathering info currently though, if a change of something is in order
When a player respawns they will get a message about where their last grave generated. So it's probably an old/claimed grave in the message. I will try to test with another player to see if I can reproduce the issue. I'm leaving for a vacation tomorrow however, and I have to release an update before then, so there is a chance I can't fix this issue until I get home again
The message appeared after they died which would indicate its the most recent grave that was nowhere near their death, no?
Also I have a couple suggestions to implement.
-
grave ID. I recommend giving each grave a unique ID that is stored in the backup data file which can be restored via command. This why it's not reliant on a visual menu but more so on back end, and can restore the exact grave through a command.
-
the command(s) being more on the data side will allow operators and moderators to run commands through console/rcon and not require them to be physically in the server. (This is a huge pain point). The command above would resolve this.
Ok let me explain in more depth how the code/mod works to hopefully answer your questions. All the grave data is stored in a list. Here each entry in the list have info about the death, if the grave is claimed/destroyed/available, and the graves also have an ID. This is a uuid, so that's mainly the reason you can't restore graves with the id in the command. When a player respawn however, and after checking all the soulbound stuff, the mod will find the latest entry in this grave data list. Currently the availability state doesn't matter, however I will change this once I get back from my vacation. But in a nutshell that's how that works. I'm not sure how usable it would be to use the grave ID in the command since the only way of getting it is the .dat file. The commands are since latest version I believe usable server side. At least those that doesn't bring up a gui. There's no command feedback unless ran by a player though
If something is still unclear or if you have any more questions feel free to ask. Can't do much more than gathering info currently though, if a change of something is in order
Was making a suggestion for a feature request, not really a question aside from the coordinates. The commands unfortunately do not run in a server console. When running it, it returns a message sying a player must run this command which means you need to join the server. I imagine the reason being is because of how the command opens a gui interface. I get how the .dat file works, im simply suggesting a way to run the command to restore a specific grave through a console or even in game (and then doing this to find out the grave didnt even spawn in the world is not a good feeling). Allowing a command to pick a grave by a ID would be very useful to not just my team, but I imagine other server operators as well. I highly recommend looking at how Corail Tombstone utilizes commands. These all can be ran through a server console and allows specific grave retrieval.
Will you be fixing this issue with Graves not spawning at all when you get back? It's become very troublesome as many players are losing items and we have to manually give back each individual item based around their death log. Everything was working fine until these last few updates.
I'm probably going to switch back to universal graves until this matter is resolved, which sucks because I really wanted to use the new graveyard feature, but I'm getting new issues raised almost every other day that someone's grave did not spawn in the world and have no way of retrieving it from them.
I really want to fix this issue, yes, but last time I tried to reproduce this, I didn't once manage to not get a grave to spawn. I'll try further when I am back from my vacation. I can look into corail tombstones. Thanks for that suggestion.
If you want to do a temporary switch, the easiest I would say to not remove a lot of graves from the world, is to disable the grave feature and keep the mod. AoF did that a while back and I don't think they had any problems with that. Let me know if for some reason it won't work however. As for the server-ran commands I am very confident in making restore and some other commands that's probably not used, executable in at least a command block. So that command should not require a player at least, as long as you're using the latest version of the mod.
And yes. Once again. I will fix this eventually. It's at the top of my priority list. I just have to understand where the mod's breaking, since I can't find anything new in the latest updates that would crash or fail.
Huh ok my bad then. I'll check on that in a few days, when I'm back home and can actually fix it
The more I look at this issue the more it looks like the code handling the graves just straight up won't be reached. I think I managed to include a possible fix in the newest version. In the config file there is now a config called createGraveBeforeDeathMessage
. If this is set to true the code will be executed slightly earlier. Since according to you death log seemed to work the graves can thus be generated from there. I don't think it should break anything but I'm not sure how other mods could affect this, which is why I made it a config. The mods I've tested with so far seems to be good though. Only incompat experienced is a soulbound issue with twilight forest, but that's not related to this issue and will be fixed by twilight in their next release. Since I have not been able to reproduce the issue no matter how hard I've tried, I can bring no guarantees this fix will work, but if my understanding of the issue itself is not totally off, you should be good now.
Also I don't know why console commands didn't work for you last time, but I made a few minir adjustments and it should work now
I have still not managed to reproduce the issue. Can't understand why or where anything goes wrong. I can't understand why supposedly a backup was generated in the file and not the game. What should happen is that data is added to the in game info only, which later then is saved to the data file when the world is saved (there might have been some misunderstanding here since I noticed you some time ago in your discord saying there should be a command or something to reload the data file and that I didn't listen to your suggestion). Anyway that's why this have me confused. I have changed now where the data is loaded (it only loads once on server/world start) but it doesn't feel like that would help with the graves not generating.
I can't really say I am actively trying to fix this issue, but to be honest I just don't know where to look or how to try and reproduce this. I've tried everything I can think of but so far it hasn't worked. The only thing I would think to test now would be to copy someone's inventory this happened to, and try again. If you for some reason would still have info about that, that would be great.
Another thing I have noticed by the way is that likely every issue about this so far has been using your modpack. I can't say I've seen this issue from anywhere else really, and I have got no one else report this since your modpack updated. Could be some mod causing incompatibility, but could also be some people just not bothered to report it or they see the issue already exists and move on.
I haven't forgot about the issue. It's still high priority, but just very hard to deal with