Looking through the archive of posts, you guys really, really don't want people editing the .Data files. However, I'm stubborn and I've spent over 3 hours looking through various resources, documentation, and source code as well as pretty much every post in the general vicinity of the topic, in addition to some of Google's documentation on their protocol buffering. Is there a way to edit it?
I've looked through of all of the source code for umod as well as the rust extension. All uses of the protobuf is in Reference. Eventually in the References I found a dll called protobuf-net.dll. Researching that I realize that it isn't a typical protobuf file, it's a special dll. Now that I understand what you're using. Back to the source code; under RustPlayerManager.cs I found:
Next, I found two interesting method calls:
I'm now stuck. I understand what's going on in the source code but for the life of me cannot understand how you would go about actually editing the data files. My goal is to view and edit oxide.groups.data if it's the last thing I do. I'm really pushing the boundries of my computer knowledge and honestly will keep going until the problem is solved.
I would really appreciate some kind of guidance. You've made it clear that you don't condone it but hopefully I've shown enough initiative to demonstrate the fact I won't break my file. Also, it doesn't matter whether I break the file or not, I'm not uploading it to my live server.
Thanks,
-King
I've looked through of all of the source code for umod as well as the rust extension. All uses of the protobuf is in Reference. Eventually in the References I found a dll called protobuf-net.dll. Researching that I realize that it isn't a typical protobuf file, it's a special dll. Now that I understand what you're using. Back to the source code; under RustPlayerManager.cs I found:
[ProtoContract(ImplicitFields = ImplicitFields.AllFields)]Which, to my understanding, just automatically numbers members to be seriallized.Next, I found two interesting method calls:
playerData = ProtoStorage.Load<Dictionary<string, PlayerRecord>>(dataFileName) ?? new Dictionary<string, PlayerRecord>();internal void SavePlayerData() => ProtoStorage.Save(playerData, dataFileName);Which calls ProtoStorage.Load and ProtoStorage.Save. Then, I found ProtoStorage.cs in the uMod repository. The methods called are the seriallization and deseriallization methods for your protobuf.I'm now stuck. I understand what's going on in the source code but for the life of me cannot understand how you would go about actually editing the data files. My goal is to view and edit oxide.groups.data if it's the last thing I do. I'm really pushing the boundries of my computer knowledge and honestly will keep going until the problem is solved.
I would really appreciate some kind of guidance. You've made it clear that you don't condone it but hopefully I've shown enough initiative to demonstrate the fact I won't break my file. Also, it doesn't matter whether I break the file or not, I'm not uploading it to my live server.
Thanks,
-King