haroohie-club / SerialLoops

An editor for Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya)
https://haroohie.club/chokuretsu/serial-loops
GNU General Public License v3.0
14 stars 6 forks source link

Add a save editor (round 1) #336

Closed jonko0493 closed 7 months ago

jonko0493 commented 7 months ago

Closes #333.

This PR adds a new dialog accessible from the tools menu that allows for editing Chokuretsu save files. A lot of RE work had to be done to understand the save files better, so there were some changes to the Chokuretsu lib that propagated up here as well.

Currently, the (rather bad) UX flow works as follows: Tools -> Edit Save File prompts the user to select a save file through an open file dialog. The user is then presented with this screen:

image

These four buttons each represent different parts of the save file. Clicking any of them will open a second dialog that takes a long time to load.

image

The common save file dialog looks like this. The user is presented with common flags that exist across all save files in addition to options from the config menu.

image

The first two saves are checkpoint saves and their dialog looks like this. The time of the save can be adjusted as well the episode number that's displayed in the save. Finally, the index of the scenario command and the friendship levels can be edited.

image

Finally, this is the quick save slot dialog. In addition to the checkpoint save options, the current script, the current script block, and current script command index can be edited. This results in changing the saved script preview as well.

Future PRs should improve the UX for this component, especially with regard to load times. After the UX improvements are made, we should also introduce UI testing for this component. Additionally, more RE work should be done to better understand the remaining unknown components of the save file sections and mark down more of the flags. #334 will particularly affect our understanding of the "read flags" for script files.

WiIIiam278 commented 7 months ago

Testing this - amazing work so far. Truly great stuff! There's nitpicks I have with the UI, but I think it'd be easier to start a UI PR to go through and update some of those myself :)

jonko0493 commented 7 months ago

I agree -- the UI needs an overhaul rather than nitpicks haha

jonko0493 commented 7 months ago

move the Save Editor to the "File" menu (since it's an action involving a file, rather than a tool within project editing)

which would allow us to expose this as an option in the main menu. It should then prompt the user to make a project (and then automatically open the Save Editor when done).

Regarding these two points -- do you mind if you handle these in your UI overhaul for this component? It is a pretty substantial flow break, I feel. I can definitely do it here if you would prefer that, of course!

WiIIiam278 commented 7 months ago

move the Save Editor to the "File" menu (since it's an action involving a file, rather than a tool within project editing) which would allow us to expose this as an option in the main menu. It should then prompt the user to make a project (and then automatically open the Save Editor when done).

Regarding these two points -- do you mind if you handle these in your UI overhaul for this component? It is a pretty substantial flow break, I feel. I can definitely do it here if you would prefer that, of course!

Fine by me :+1: - just wanted to guage thoughts