Skip to content

Allow the ability to rename the save file in game.#75

Open
echoslabs wants to merge 29 commits into
FujiAPI:devfrom
echoslabs:better_saves
Open

Allow the ability to rename the save file in game.#75
echoslabs wants to merge 29 commits into
FujiAPI:devfrom
echoslabs:better_saves

Conversation

@echoslabs
Copy link
Copy Markdown

Allows player to rename the save file in game.
Also all saves are moved into Userpath\Saves except save.json which is copied.

@axiand axiand self-assigned this Mar 28, 2024
@axiand
Copy link
Copy Markdown
Member

axiand commented Mar 28, 2024

Self-assigning this as I'm gonna be testing this code and probably making changes to the text input class

@axiand axiand added this to the 0.7.0 blockers milestone Mar 28, 2024
@axiand
Copy link
Copy Markdown
Member

axiand commented Apr 1, 2024

Went through and added some polish, as well as changes, some major and some minor.

Notably, to keep the code in one place, the input handling is now all done in the OnScreenKeyboardMenu. Also, an issue was fixed with the initial setup of the new save file directory.

This should be ready for merge, though I wouldn't mind a final round of testing.

@axiand
Copy link
Copy Markdown
Member

axiand commented Apr 1, 2024

It's worth mentioning that this PR also makes it so that the vanilla game's save file is completely separate from the Fuji save files.

I thought about this a little bit and imo, we're probably better off that way, with how much stuff Fuji changes about the game fundamentally, I'd rather keep the files separate than risk corruption back in vanilla.

@echoslabs
Copy link
Copy Markdown
Author

Thanks for cleaning it up and fixing bugs!

Comment thread Source/Data/Controls.cs Outdated
Comment thread Source/Data/Save.cs Outdated
Comment thread Source/Scenes/Overworld.cs Outdated
Comment thread Source/Mod/Data/SaveManager.cs Outdated
Comment thread Source/Mod/Menu/SaveSelectionMenu.cs Outdated
Comment thread Source/Mod/Menu/SaveSelectionMenu.cs Outdated
Comment thread Source/Mod/Menu/OnScreenKeyboardMenu.cs Outdated
Comment thread Source/Mod/Menu/OnScreenKeyboardMenu.cs Outdated
Comment thread Source/Mod/Menu/OnScreenKeyboardMenu.cs
Comment thread Source/Mod/Patches/KeyboardHandler.cs Outdated
Comment thread Source/Mod/Data/SaveManager.cs Outdated
@psyGamer
Copy link
Copy Markdown

psyGamer commented Apr 3, 2024

I might as well leave my thoughts here too:

  • I don't like how it's split into 2 menu instead of one. It could just straigh up go to the on-screen keyboard. You could just accept / cancel with Enter / ESC. For controllers, "Accept" and "Cancel" could just be buttons like "Space".
  • Pressing Enter doesn't even seem to work? I can exit the on-screen keyboard.
  • You are renaming the file not the save. Imo you should be editing an arbitrary string associated as the name for the file instead. That means the save files would either be indexed or maybe a sanitized version of the inputted name.
  • You can name a file with just an empty string or whitespace
  • Your method of implementing the direct keyboard input is just bad. Sorry to put it so bluntly, but thats the truth. You map the keyboard keys directly to characters. Now that seems fine at first, however you do realize that the US isnt the only country on the world, right? For example the german layout swaps Y and Z, but this method doesn't care about that or about any other keyboard mapping (I imagine things like DVORAK would just completely break). Instead you should be using a text input API and luckily Foster even provides one: Input.OnTextEvent.

@axiand axiand removed this from the 0.7.0 blockers milestone Jun 25, 2024
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.

4 participants