hyblocker/TSPUD-SaveEditor

Linux CLI

Closed this issue · 5 comments

As a Linux user who wanted to edit their save, I took your code and ran a few methods to achieve similar functionality to what your UI does.

I think a similar approach could be used to make a command-line interface that can convert your save to JSON and let you edit that JSON, either manually or with an online JSON editor.

If you Dislike the idea, I can do it in a fork. I am simply asking if you would like such a thing to be in this repo.

I'll implement this when I find some time to do so. Should be able to next week.

Do note that scrambling and descrambling is quite easy if you know how to work with shell. Doesn't take much effort.

I'll implement this when I find some time to do so. Should be able to next week.

Oh ok. This whole issue was about me wanting to help with that, but alright

If you're in a hurry, I made a save converter here: https://replit.com/@TylerFlowers/TSPUD-Save-Converter
Or if you want to figure it out in shell, this is the code in C#:

string EncSec = "saRpmZ6mMgZpmcojUkvkyGEQGez9YkWoXZfJdRc9ZmmJrCzfM8JksVxQfQK8uBBs";
string data = "insert data here";
StringBuilder _sb = new StringBuilder();

// For each character, get another from the encryption secret...
// (depending on length and position)
// ...and compare the two using XOR.
for (int i = 0; i < data.Length; i++) {
  _sb.Append((char)(data[i] ^ EncSec[i % EncSec.Length]));
}

string json = _sb.ToString();
Console.WriteLine(json);

CLI has been implemented in the latest release.