Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a save editor (round 1) #336

Merged
merged 10 commits into from
Jan 28, 2024
Merged

Conversation

jonko0493
Copy link
Member

@jonko0493 jonko0493 commented Jan 27, 2024

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.

@jonko0493 jonko0493 requested a review from WiIIiam278 January 27, 2024 05:57
@jonko0493 jonko0493 self-assigned this Jan 27, 2024
@WiIIiam278
Copy link
Member

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
Copy link
Member Author

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

Copy link
Member

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few smaller things here and there.

With regard to the flow here (and this is more UI stuff so can be delegated till after this PR): I think it'd be nice if we could:

  • 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).

I think Save Editing is a fairly key use case (albeit not our primary goal) for Serial Loops and should be available from the top menu, and so we should make this easy to access.

src/SerialLoops.Lib/Flags.cs Outdated Show resolved Hide resolved
src/SerialLoops/Dialogs/SaveEditorDialog.cs Show resolved Hide resolved
src/SerialLoops/Dialogs/SaveEditorDialog.cs Show resolved Hide resolved
src/SerialLoops/Dialogs/SaveEditorDialog.cs Outdated Show resolved Hide resolved
@jonko0493
Copy link
Member Author

jonko0493 commented Jan 28, 2024

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
Copy link
Member

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 👍 - just wanted to guage thoughts

@WiIIiam278 WiIIiam278 merged commit ccd9ae8 into haroohie-club:main Jan 28, 2024
4 checks passed
@jonko0493 jonko0493 deleted the SaveEditor branch January 28, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add save editor tool
2 participants