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

[Launcher] Add support for profiles for Nitrox save data and other files #958

Closed
Measurity opened this issue Mar 12, 2020 · 4 comments · Fixed by #1808
Closed

[Launcher] Add support for profiles for Nitrox save data and other files #958

Measurity opened this issue Mar 12, 2020 · 4 comments · Fixed by #1808
Labels
Area: setup Related to installing or configuring Nitrox Area: user interface (launcher) Related to UI/UX in the launcher

Comments

@Measurity
Copy link
Collaborator

Measurity commented Mar 12, 2020

Right now files are saved left and right. It would be nice to have them in one "nitrox data" folder.

Both client and server should store files into same directory if both are on the same PC/machine. Location of the profiles is likely best stored in App Data but if not, let me know.

The API is best implemented in the "NitroxModel" project so that it can be used anywhere.

Folder structure should be like

"Nitrox data"

  • "default"
    • "servers" (text file with server list for profile 1; default)
    • "world"
      • "BaseData.nitrox"
      • "PlayerData.nitrox"
      • "WorldData.nitrox"
    • "dev"
      • "settings.json"
  • "Profile 2" (If created, same structure as profile 1; default)
  • ...

Example API (doesn't need to work like this)

var profile = DataProfile.CreateOrLoad("default"); // Ensures folder structure
var serverList = profile.GetServers(); // servers stored in "servers" file or empty list
...
profile.SetServers(servers); // Store servers into its file
profile.GetBaseData(); // Returns an object that's deserialized from base data.
profile.SetBaseData(baseData); // Store base data object to file.

// Delete whole profile folder (could be useful for removing old Nitrox profiles)
profile.Delete();
@killzoms
Copy link
Collaborator

killzoms commented Apr 3, 2020

Doesnt this run into the issue of there being specific settings for the server that are pointless on the client? wouldnt it be best to separate the client and server data? Yes I can see where keeping them together is nice however it can cause certain issues to crop up in the long run especially when someone wants to put the server files on a separate drive from their client, Say in the event of someone having a specific drive they want their server to be on(Say for speed purposes) but they don't keep their games/programs on that drive.

@Measurity
Copy link
Collaborator Author

Measurity commented Apr 11, 2020

We can use the same structure for both client and server with just some files/folders missing. This way we can have the same code for both client and server.

@Jannify
Copy link
Member

Jannify commented May 10, 2020

Will look into that after #1075

@Mathew3000
Copy link
Contributor

I'll take a look at it. Seems doable :)

@Jannify Jannify added this to Minor backlog (Alpha Blockers) in Nitrox (old) Jun 1, 2020
@Jannify Jannify added the project label Jun 1, 2020
@Jannify Jannify changed the title Add support for profiles for Nitrox save data and other files [Launcher] Add support for profiles for Nitrox save data and other files May 9, 2021
@Jannify Jannify linked a pull request May 25, 2022 that will close this issue
8 tasks
Nitrox (old) automation moved this from Minor backlog (Alpha Blockers) to Complete Sep 5, 2022
@Jannify Jannify added Area: setup Related to installing or configuring Nitrox Area: user interface (launcher) Related to UI/UX in the launcher labels Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: setup Related to installing or configuring Nitrox Area: user interface (launcher) Related to UI/UX in the launcher
Projects
Status: Complete
Nitrox (old)
  
Complete
Development

Successfully merging a pull request may close this issue.

4 participants