RWELabs / Stardew-Valley-Mod-Manager

[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.
Other
29 stars 1 forks source link

[Issue] Enabling mod points to wrong path #120

Closed SXRWahrheit closed 6 months ago

SXRWahrheit commented 10 months ago

The Issue or Bug

The mod manager is adding a hyphen before the mod name in the path it's looking for and therefore failing to find the mod folder

2023-12-04 21_38_54-Mod Manager _ Stardew Valley Modded Framework

Version

230401

Operating System

Windows 11

Steps to reproduce the behavior

  1. Install MM fresh
  2. Install mod
  3. Attempt to enable mod

Log Files

No response

Screenshots

No response

Additional Context

No response

Suggested Resolution

No response

RyanWalpole commented 6 months ago

Howdy @SXRWahrheit!

Sorry for the delay on this one, and thanks for bringing it to our attention. I've not been able to replicate this error, nor have any of the friends and family that I made the mod for originally. Checking the code, it definitely isn't hard programmed to add a hyphen before the name of the mod.

I thought maybe that it was an issue with that mod specifically, but I'm unable to replicate it even when I install the mod in question from your report.

The way the manager actually enables/disables mods is by copying the name of the mod from the enabled/disabled mods list, copying it to a list - then executing on that list when the button is pressed. The catch(Exception) happens during this operation.

foreach (string item in AvailableModsList.SelectedItems)
                {
                    ModsToMove.AppendText(item.ToString() + Environment.NewLine);
                }
                DoEnableMods();

The only possibility I can think of is that the list of mods (which should be blank by default), has somehow accepted a stray user input. I didn't think this was possible, as the list is supposed to not actually render on the user end, so in theory shouldn't accept any accidental inputs.

If you could, can you please confirm that this is something that happens with all mods or just this mod/the first mod in particular? That would help me narrow down what should be going on. Either way, I'll be making some safeguards to the list object to ensure that it doesn't accept any accidental user inputs - the way I had intended.

Thanks again for the report & sorry for the delay!

RyanWalpole commented 6 months ago

I am unable to replicate this bug in the new update, v240401, released today. The issue seems to be fixed. In the event that you still experience this issue, please re-open this bug report. For now, however, I'm going to close it :)