Code Monkey home page Code Monkey logo

rwelabs / stardew-valley-mod-manager Goto Github PK

View Code? Open in Web Editor NEW
25.0 1.0 1.0 217.58 MB

[Passion Project] The Stardew Valley Mod Manager is a powerful tool that is designed to be used alongside SMAPI to help you install and manage mods, automatically install modpacks and manage your game saves.

License: Other

C# 95.79% Inno Setup 2.94% Batchfile 1.26%
stardew stardew-valley stardew-valley-mods installer modding modloader manager-game

stardew-valley-mod-manager's Issues

[Documentation] Update + Improve Documentation

Update all documentation and move from Wiki to GitDocs for better presentation and format.

Conversion to GitDocs

  • Downloading Mod Manager
  • Setting Up Mod Manager
  • Updating Mod Manager
  • Add/Install Mods
  • Enable Mods
  • Disable Mods
  • Uninstall/Remove Mods
  • Check Mod Updates
  • Create Mod Presets
  • Load Mod Presets
  • Creating a Save Backup
  • Deleting a Save
  • Automatic Modpack Installer
  • Developer - How to create a modpack
  • Developer - How to ensure modpack is mod check friendly

Content Updated
Screenshots and Text

  • Downloading Mod Manager
  • Setting Up Mod Manager
  • Updating Mod Manager
  • Add/Install Mods
  • Enable Mods
  • Disable Mods
  • Uninstall/Remove Mods
  • Check Mod Updates
  • Create Mod Presets
  • Load Mod Presets
  • Creating a Save Backup
  • Deleting a Save
  • Automatic Modpack Installer
  • Developer - How to create a modpack
  • Developer - How to ensure modpack is mod check friendly

[Issue] Version Number, Update Check, Settings and SMAPI Version Number misaligned

Describe the Issue
The bottom bar with the version numbers, settings button and update check button are misaligned. Certain objects are lower and higher than others. It's not immediately obvious as they're separated across the different sides of the application but if you draw a ruler you can see it.

Expected behavior
All objects text to be pixel aligned

Screenshots
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 2203x, 2202x

Suggested Resolution
Set Object.Location of all objects to be placed on the same vertical axis level.

[Issue] Splash screen window is infinitely resizable in v220501

Describe the Issue
The splash screen window can be resized beyond the user interface infinitely.

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager v220501 (facelift upgrade)
  2. When on the splash screen, attempt to resize the splash screen window.

Expected behavior
The window should not be resizable.

Screenshots
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220501

Suggested Resolution

Splash.cs

this.MinimumSize = 478, 287;
this.MaximumSize = 478, 287;
this.FormBorderStyle = FixedSingle;

[Feature] Launch Game button in the Mod Manager

Overview:
Add a button that allows the user to launch the game straight from the mod manager. This would come with some possible roadblocks that would need to be considered:

  • Launch button must be disabled if game is already running
  • Program must be able to tell that the game is running even after it has first decided
  • If the SMAPI exe cannot be found, default to regular exe

Updating the Button
Button will have to check periodically if there is a Stardew Valley instance running as well as a SMAPI instance, determining the state of the button.

[Issue] Automatic modpack installer fails when user runs out of disk space.

Issue:
When the user runs out of disk space when installing a modpack, the mods will be partially installed up until the point that the drive runs out of space. The program will then throw exceptions about file and folder access.

Steps to Replicate:

  1. Have no disk space on drive where Stardew Valley directory is stored.
  2. Download modpack with automatic installer
  3. Wait for "Extracting files" stage.

Suggested Resolution:
Check disk space and file size requirements before extracting files.

[Issue] SDVMP Generator allows you to click "Create Modpack" while a modpack is being created.

The Issue or Bug

While the modpack is being created (after clicking "Create"), the application will allow the user to click the create button again. The application will not understand that there is already an operation in place, causing issues when multiple modpacks are trying to be created at once.

Version

220801, 220704 (Observed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Open "sdvmpgen.exe" from the application install directory.
  2. Select some zip files (doesn't have to be a mod as this is a demonstration only)
  3. Click "Create Modpack"
  4. Observe the "Create Modpack" button continue to stay clickable despite the modpack being created.
  5. Click the button again if you want

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

Continue.Enabled = false on button click, Continue.Enabled = true on completion of modpack creation.
Same should probably be done for the cancel and exit button as that can be pressed mid operation, causing issues also.

[Issue] SDVMP Installer does not work

Describe the Issue
Attempting to install an SDVMP file results in incomplete file installations:

  1. All existing mods being deleted with no new mods being installed.
  2. Some or all existing mods being deleted with none or some new mods being installed.

Issue is present on all Windows 10 installs of the SDV Mod Manager. It is also present on some low to mid ranged Windows 11 desktops though works more often on Windows 11.

Environment:

  • Windows Version: Windows 10
  • Mod Manager Version: v220502

Suggested Resolution
It's possible that the installation is starting steps too quickly, overwriting activities before it happens.

[Issue] The software updater auto-cancels if the application previously crashed

Describe the Issue
When using the software updater to download the latest update (in dev build 220401) it will automatically begin cancelling the download if the application crashed previously, as it doesn't get a chance to set the Properties.Settings.Default.CancelDownload back to false

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220401 [Dev]

[Feature] In-App Credits / Special Thanks

The Feature Request

A window that contains credits including development information, special thanks and disclaimers.

  • Lakoola - Tester, Inspiration
  • Eternaldoom - Tester, Inspiration
  • Vimkins - Tester, Inspiration
  • Pathoschild - SMAPI
  • ConcernedApe - Stardew Valley
  • Ryan Walpole - Lead Developer
  • Links to RWE Labs, Contact
  • Disclaimer Re: Logo, Bundled SMAPI

Is this related to an issue or bug?

No

Additional context

No response

[Issue] Modpack Installer does not have an error catch

Describe the Issue
When the modpack installer fails to install a modpack, it does not display an error. Instead, it just says "Modpack Installed Successfully".

Environment:

  • Windows Version: Windows 11, Windows 10
  • Mod Manager Version: 220502

Suggested Resolution
Currently there is no identifying whether the backgroundworker completed the operation successfully, unsuccessfully or if it was cancelled.

Add

if (e.Cancelled == true)
            {
                //message that the operation has been cancelled
            }
            else if (e.Error != null)
            {
                //message that an error occured
                MessageBox.Show("e.Error.Message");
            }
            else
            {
              //regular result as completed successful.
            }

[Issue] "Download Available" prompt contains incorrect wording.

Describe the Issue

When the user is delivered a prompt that an update is available, the text of the popup says that an update is available and asks the user if they would like to view the latest release instead of asking if they would like to download the latest release.
This is leftover wording in the code from when updates were done manually, where clicking "yes" would open the latest release in a web browser instead of downloading it directly from the application.

Screenshots

image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220601 (observed)

[Issue] Updater still gets files from ryanwalpoleenterprises.github.io

The Issue or Bug

Download files are currently downloaded from ryanwalpoleenterprises.github.io when the user updates the application. This was from when the RWE Labs GitHub account was called Ryan Walpole Enterprises. The link forwards but it should be updated regardless to comply with best practices.

Version

220703 (observed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Open SDV Mod Manager when there is a new update available.
  2. Opt to download the latest update.
  3. Observe the download source in the window.

Log Files

No response

Screenshots

image

Additional Context

No response

Suggested Resolution

Change the download server CDN to labs.ryanwalpole.com, where the files are from.

[Issue] False positive warning for SMAPI not being installed

Issue:
The application presents a warning banner informing the user that SMAPI is not detected in the Stardew Valley directory even though SMAPI is not only installed in the directory - but in some cases, the warning was not present at an earlier point despite no file changes being made.

Steps to Replicate:

  1. Have Stardew Valley and SMAPI installed to the same directory.
  2. Be (un)lucky enough for it to give the false positive.

Suggested Resolution:
Check and adjust the way that the application detects SMAPI being installed.

[Issue] Program details in Control Panel/Apps List in Windows is Incorrect/Incomplete

Describe the Issue

When viewing the Stardew Valley Mod Manager in the Control Panel or Settings App on Windows, the display name is shown as "Stardew Valley Mod Manager version XXXXXX" with the default application icon. The links are also out of date and link to the RWE website, not the RWE Labs sites.

Steps to Replicate

Steps to reproduce the behavior:

  1. Open the Windows Settings app
  2. Navigate to the apps list
  3. Observe the name and details of the Stardew Valley Mod Manager
    Alternatively:
  4. Open the Control Panel
  5. Navigate to Uninstall Programs
  6. Observe the name and details of the Stardew Valley Mod Manager.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Control Panel

image
image

Windows Settings

image

Environment

  • Windows Version: Windows 11
  • Mod Manager Version: All (Confirmed), v220502 (observed)

[Issue] Application wants to do first run setup after updating to higher version

Describe the Issue
When updating the Stardew Valley Mod Manager, the application makes you do the first run setup again. This includes providing the Stardew Valley game directory which can be cumbersome for some users.

Steps to Replicate
Steps to reproduce the behavior:

  1. Update SDV Mod Manager from one version to a higher version.
  2. Launch the updated application.
  3. You will notice you've been prompted to supply your SDV game directory again.

Expected behavior
After updating to a newer version, the expected result is that the application would open up to the main window with mod management tools - as the first run setup has already been completed on a previous version.

Environment:

  • Windows Version: Windows 11 (Virtual Machine and Native Machine)
  • Mod Manager Version: 220202

Suggested Resolution
Check how the application determines whether the first run setup has been completed or not.

[Issue] Mod Manager freezes briefly on Splash screen when Validating Directories.

Describe the Issue
When launching the Stardew Valley Mod Manager, the splash screen seems to freeze at some point when the splash text reads "Validating Directories..."

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager
  2. Observe splash screen loading indicator stop animating and window cannot be moved at "Validating Directories" stage.

Expected behavior
The loading indicator should continue to animate and the window should not crash.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220601, 220701 (alpha channel)

Suggested Resolution
Seems the UI thread may be being used by the directory validation processes. As the application has become heavier, more tasks are being completed and it's started creating a hang issue. Consider moving non UI processes to a different thread?

[Issue] Settings window minimum size does not cover size of all UI elements

Describe the Issue
The settings window can be resized vertically to a size that doesn't show all of the UI elements.

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager
  2. Click "Settings"
  3. Resize the window to make it smaller

Expected behavior
The window would not resize to be smaller as that would hide UI elements - or if it was to resize smaller, scrollbars would appear to allow the user to see the hidden UI elements with the window in it's smaller size.

Screenshots

image
The settings window when it is opened (with all UI elements visible)

image
The current minimum size that the settings window supports

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220301

Suggested Resolution
Adjust the Form.MinimumSize values to support the full UI and all UI elements or Enable Form.AutoScroll to make the window show scrollbars for any hidden content.

[Issue] Access denied when trying to install modpack

The Issue or Bug

When attempting to install a modpack, the application throws an error when trying to copy over a mod to the inactive-mods folder.

Version

220703 (Observed)
all versions from 220703 - 240401

Operating System

Windows 10

Steps to reproduce the behavior

  1. Attempt to install modpack
  2. Observe error

Log Files

No response

Screenshots

image

Additional Context

  • User attempted to install the modpack with administrator privileges and had the same issue.
  • User noted attempting to make the folders not read only.

Suggested Resolution

No response

[Issue] If user swaps displays when splash screen is loading, MainPage opens but does not appear in taskbar

Describe the Issue
When the user opens the application and swaps monitors when the splash screen expires, the Main window page does not open as expected - opening behind all other windows and not appearing in the taskbar, until the window is found and selected manually from behind other windows.

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager v220501
  2. Swap monitors and start using an application in fullscreen on the second monitor
  3. Observe that the application does not appear in the taskbar even though the splash screen has disappeared.
  4. Use Win+Alt, Alt+Tab or simply minimise applications to locate the Mod Manager.
  5. Click on the Mod Manager Window and observe it finally appear in the taskbar.

Expected behavior
The window should at the very least appear in the taskbar when it is launched, even if behind other windows - regardless of monitor location.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: v220501

Suggested Resolution

MainPage.cs

this.BringToFront();

May force the application to be brought to the forefront, showing it in the taskbar?
Triage required to solve.

[Issue] Unhandled exception when Nexus Mods gets a SMAPI update but not the GitHub repository.

Describe the Issue
Version 3.15.1 was published on NexusMods but the GitHub Repository did not get the same update (for some reason). This could happen in the future as it is happening now. Since the mod manager determines the update version from the NexusMods page but downloads from the GitHub repository (due to URL structure and authentication requirements on NM), the download link does not exist and throws the unhandled exception.

Screenshots
The SMAPI updater
image

The releases page on GitHub
image

The release page on NexusMods
image

The unhandled exception
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220701, 220702

Suggested Resolution
Handle the exception and state that the download link could not be retrieved + open the NexusMods page so it can be performed manually.

[Issue] Settings tab has more right-margin spacing than left

The Issue or Bug

In the application, the settings tab sees UI elements aligned with the left side of the application with a higher right margin than left. This leaves the application looking a tad left heavy.

Version

v220702

Operating System

Windows 11

Steps to reproduce the behavior

No response

Log Files

No response

Screenshots

image

Additional Context

No response

Suggested Resolution

Change the sizing of the UI elements to take up more space on the right side of the tab/window

[Issue] When click-drag selecting multiple disabled mods, the enable button does not become clickable.

The Issue or Bug

When attempting to highlight multiple mods by clicking and dragging the cursor in the disabled mods list, the "Enable" button does not become accessible, staying disabled to user input.

Version

v220703 (Observed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Open Stardew Valley Mod Manager
  2. Select multiple disabled mods by clicking one and dragging to highlight multiple.
  3. Observe the "Enable" button continue to stay read-only.

Log Files

No response

Screenshots

No response

Additional Context

On further observation it might be that if you stop the click and drag outside of the control boundaries, the issue is caused.

Suggested Resolution

No response

[Issue] "Enable", "Disable" and "Delete Mod" buttons show up when clicking blank space in listbox.

Describe the Issue
The enable, disable and delete mod buttons are disabled until a mod is selected - however clicking on the white space in the list of mods registers as highlighting a mod and the buttons become enabled and can be clicked. Clicking it returns an error code "Object reference not set to an instance of an object" and in the instance of using the delete button without a mod selected, the error assumes the mod you're trying to delete is not disabled(?).

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager
  2. Click on the white space within the enabled or disabled mods list
  3. Notice that the enable, disable and delete mod buttons become interactable (depending on which list you click on)
  4. Click any of the three buttons without highlighting a mod to view error code.

Expected behavior
The expected behaviour would be for the enable, disable and delete mods buttons to only appear when a mod is highlighted/selected and not simply when the user clicks on white psace in the disabled and enabled mods lists.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220201, 220301

Suggested Resolution
Inspect how the interactability of the buttons is determined and evaluate other ways it can be determined.

[Issue] Application stays open in background if closed during first run setup

Describe the Issue
When you close the application during the first run setup, the application stays open in the background. Closing the setup forms doesn't actually exit the application.

Steps to Replicate
Steps to reproduce the behavior:

  1. Reset to factory settings.
  2. Open the application
  3. Exit on either step one or two of the setup
  4. Observe that the application remains running in the background w/Task Manager

Expected behavior
Expected behaviour would be for the application to exit when the setup is cancelled.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220201, 220202, 220301, 220302

Suggested Resolution
Add the following:

Application.Exit();

To the FormClosed event for both of the setup forms

[Issue] When cancelling an update from the main dashboard, the application continues to run without a window.

The Issue or Bug

When you click "Check for updates" from within the application's dashboard and start updating, when you hit the cancel button the update window disappears as the update gets cancelled, but the main dashboard does not re-appear.
The application continues to run in the background with no window.

Version

220703 (observed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Open Stardew Valley Mod Manager
  2. If an update is available, do not update.
  3. Click "Check for updates" on the Main Dashboard.
  4. Click Yes to begin downloading the update.
  5. Before the download is completed, click Cancel
  6. Observe the download window close and no other windows appear.
  7. Open Task Manager
  8. Observe that the application is still running, windowless.

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

Possible Resolution:
Change the download form to be a .ShowDialog(); instead of a .Show(); and have the main dashboard not hide when opening the download form.

[Feature] Implement in-application feedback

Overview
Users should be able to give feedback. There should be a way from within the app to give feedback, if not, link the user to a place where they can give feedback. This should be fairly high priority.

[Request] Check for updates on startup

Is your feature request related to a problem? Please describe.
Currently the majority of users are running an outdated version of SDV Mod Manager. An easy way to circumvent this is to take the manual element of updating out of the application and automate it on startup.

Describe the solution you'd like
If the user has "Check for updates on startup" checked in the settings, check for updates on startup and prompt to update if there are any available.

[Issue] Main application window breaks on resize

Describe the Issue
The main application window can be resized (not possible in earlier versions) and when resized can often break the application unless the size is returned to normal.

Steps to Replicate
Steps to reproduce the behavior:

  1. Launch v220304 and resize the application vertically to be larger or smaller than default.
  2. Observe behaviour of UI

Expected behavior
The window to resize elegantly or not at all.

Screenshots
The application window, broken, after resize
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220304

[Issue] Update checker label doesn't update when user opts to view latest update

Describe the Issue
When an update is available and the user opts to view the latest update, the default browser opens the page for the latest release - however the "Check for updates" label remains on "Checking for updates...".

Steps to Replicate
Steps to reproduce the behavior:

  1. Run v220202 or v220301
  2. Click "Check for Updates"
  3. Opt to view the latest release
  4. Return to the application and observe the "Checking for Updates..." text.

Expected behavior
The expected behaviour would be for the label to state "Updates Available" or something along those lines to indicate that the application has completed checking for updates. Similarly to how when there isn't an available update, the text changes to "Up to date! Check again?"

Screenshots
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220202, 220301

[Issue] Readme.md has incorrect help article links

Describe the Issue
With the migration to the gitbook format for the help and guides, the readme.md was not updated to reflect URL changes.
Update Readme with next update, as there are forwarding links.

[Issue] Splash Screen and Main Dashboard experience visual performance issues

The Issue or Bug

The splash screen and main dashboard windows seem to have performance issues when loading in the UI - with UI elements "flashing" in, making it look almost like a website loading content.

Could be too much going on in the UI thread or possibly the transparent objects trying to determine the backcolor?

Version

220502 - 220703 (Observed)

Operating System

Windows 11

Steps to reproduce the behavior

No response

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

No response

[Issue] Theme doesn't carry over after updating.

The Issue or Bug

Whatever theme the user has selected does not carry over after updating the application, often not even selecting "Colourful - Pink" as the default.

Version

220901 (observed), 220802 (assumed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Update to a newer version of the mod manager.
  2. Observe that the theme choice is completely wiped.

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

No response

[Issue] When mod update check finds mod up to date, the operation button is read-only.

Describe the Issue
After checking for a mod update, if the mod is found to be up to date already the console will state that it is up to date already (expected) but the button to check for an update remains read only. This means you have to close the window and re-open it to check for another mod

Steps to Replicate
Steps to reproduce the behavior:

  1. Open "Check for Mod Updates [Beta]"
  2. Check a mod for an update
  3. When the utility detects "This mod is up to date." the "Check for Updates" button is still read-only.

Expected behavior
After finishing any update check (whether an update is found, not found, or the logic is not present to check for updates) the option to check for another mod update should be present.

Screenshots
image

image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220404

Suggested Resolution
Add Check.Enabled = true; to the code when the mod has been detected to be up to date.

[Issue] Update available prompt is displayed even when the application is up to date.

Describe the Issue
When starting v220701, no matter what the program will say an update is available and prompt to download an update. Also when you click "No" it still doesn't launch the mod manager, rendering this version of the application useless.

Steps to Replicate
Steps to reproduce the behavior:

  1. Open Stardew Valley Mod Manager v220701.
  2. Observe issue as described above.

Expected behavior
When no updates are found (the software is up to date) then the application should not prompt to update.
When clicking "no" to the update prompt, the application should launch as expected.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: 220701

[Feature] Save file management

Feature Description:
Introduce features for save file management such as save file backup, save file deletion etc.
Managing save files from within stardew valley is cumbersome and slow. Taking backups of save files is also cumbersome as it requires limited technical knowledge and the ability to go into the windows file system and manually copy files and folders.

Solution:
A save file management tab with various different features for managing save files.

[Issue] When mass uninstalling mods, the "Are you sure" prompt is shown for each individual mod.

The Issue or Bug

When you mass uninstall mods from your disabled mods list, a confirmation prompt is shown for each mod you are attempting to uninstall.

Version

v220703 (Observed)

Operating System

Windows 11

Steps to reproduce the behavior

  1. Open Stardew Valley Mod Manager
  2. Select multiple mods in the Disabled Mods list.
  3. Click "Uninstall"
  4. Observe that there are multiple confirmation prompts, one for each mod you're attempting to uninstall.

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

A better implementation would be for a single confirmation prompt to appear with a list of mods you're attempting to uninstall.
Execute a foreach on mods to uninstall and list them in a single MessageBox.Show event rather than show the MessageBox for each mod.

[Issue] Load Preset button will take the user to last viewed directory from Modpack or Mod Browsing.

Describe the Issue
If the user has installed a mod, the file dialog will record the location (whether it be Downloads, my Documents etc.) and then when the "Load Preset" button is pressed, it will go to the last used location - meaning the user has to manually go to C:\Program Files (x86\Steam\steamapps\common\Stardew Valley\mod-presets\ to access their presets.

Steps to Replicate
Steps to reproduce the behavior:

  1. Add a mod using the "Install Mod" button.
  2. Click "Load Preset" when the mod has been installed.
  3. Observe that the initial directory loaded is not the Mod-Presets directory.

Expected behavior
The "Load Preset" button should always navigate to the presets directory.

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: Present in all versions, but observed in 220501.

Suggested Resolution
Currently the code does actually set the directory correctly

OpenFileDialog ofd = new OpenFileDialog()
            {
                FileName = "",
                Filter = "Preset Configuration Files (*.txt)|*.txt",
                Title = "Select a Preset",
                InitialDirectory = Properties.Settings.Default.PresetsDir,
                RestoreDirectory = true
            };

It's also setup to restore the directory to the initial directory every time it's shown.
A possible fix would be to convert the string to a path using System.IO.Path as despite the string being a valid path, it might just be having an issue seeing it as such. This resolution would look like:

OpenFileDialog ofd = new OpenFileDialog()
            {
                FileName = "",
                Filter = "Preset Configuration Files (*.txt)|*.txt",
                Title = "Select a Preset",
                InitialDirectory = Path.GetFullPath(Properties.Settings.Default.PresetsDir),
                RestoreDirectory = true
            };

[Issue] Launching SDV Mod Manager before ever running Stardew Valley results in Unhandled Exception

Describe the Issue
Stardew Valley Mod Manager will return an Unhandled Exception after the initial application setup if Stardew Valley has never been run on the system (even if Stardew Valley and SMAPI are installed)

Unhandled exception has occurred in your application. 
If you click Continue, the application will ignore this error and attempt to continue. 
If you click Quit, the application will close immediately.

Could not find a part of the path
'C:\Users\user\AppData\Roaming\StardewValley\Saves'

Steps to Replicate
Steps to reproduce the behavior:

  1. Have Stardew Valley and SMAPI installed on your system, but have not ever run Stardew Valley.
  2. Open the Mod Manager (and complete setup for the Mod Manager)
  3. Witness error

Expected behavior
For the application to launch without an unhandled exception, for the exception to be handled in code.

Screenshots
image

Environment:

  • Windows Version: Windows 11
  • Mod Manager Version: v220302

Suggested Resolution
Handle the exception at Form.Load. Currently the application assumes that the user has run Stardew Valley before and therefore the Game Save Management tab attempts to load all directories in the AppData\StardewValley\Saves\ folder. Simply put a catch statement to catch the Exception and present a MessageBox:

MessageBox.Show(
"We weren't able to find your Game Saves folder. This usually happens if you've never run 
Stardew Valley before. If you're on a new PC, consider checking if your 
Game Save files were successfully moved.",
"Game Save Management | Stardew Valley Modded Framework", 
MessageBoxButtons.OK, MessageBoxIcon.Warning)

//Unsure of actual name of button, but probably should
//disable the button that opens the game save directory since it doesn't exist.
ViewSaveFilesButton.Enabled = False;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.