Reloaded-Project / Reloaded-II

Universal .NET Core Powered Modding Framework for any Native Game X86, X64.
GNU General Public License v3.0
608 stars 82 forks source link

Bug: "Create Shortcut" makes an Empty File instead of an actual Shortcut. #481

Open Willshaper opened 3 weeks ago

Willshaper commented 3 weeks ago

Describe the Bug I have added Metaphor ReFantazio to Reloaded-II, and it can launch the game properly with installed Mods via the Reloaded-II "Launch Application" button. But trying to use the "Create Shortcut" button will result in a 0 Byte file on my desktop called "Metaphor", no extension or data in it as far as i can see.

To Reproduce Steps to reproduce the behaviour:

  1. Click Metaphor ReFantazio Icon in the Sidebar
  2. Click the "Create Shortcut" button under "Actions"
  3. Find the newly created file on your Desktop
  4. File is Empty

Expected Behaviour I expect the shortcut file to be a Shortcut, not an empty file.

Screenshots billede billede billede

Additional Context This is with a freshly installed and updated Reloaded-II: "2024-10-18T17:42:34 | 1.28.2 | .NET 8.0.10" I have tested both launching normally, and as Administrator.

Sewer56 commented 3 weeks ago

That's a new one.

Does your username have special characters in it? I wonder if it could be related to that.

Willshaper commented 3 weeks ago

That's a new one.

Does your username have special characters in it? I wonder if it could be related to that.

It just so happens that my username has an underscore at the end. "name_" billede

Sewer56 commented 3 weeks ago

Interesting, I'll look into it eventually.

Sewer56 commented 3 weeks ago

In the meantime, if you want to make a shortcut manually, you can make a shortcut to Reloaded-II.exe and add --launch "PATH_TO_FULL_GAME_EXE" as a parameter.

You can do that by right clicking shortcut, going to properties and appending it to the Target field.

cadewey commented 2 weeks ago

The problem is that the game has a colon in its name, and that's not a valid character for a Windows file name. MakeShortcutCommand.Execute() probably needs some sanitizing.

As a workaround, you can fix this by editing the game config in Reloaded and removing the colon character.

kamsai11 commented 2 days ago

My workaround was like... if you have another atlus game for example, let's say.... Persona 5R. Just create a shortcut with p5r, edit the path to something like this: C:\Users\ryuuk\Desktop\Reloaded-II\Reloaded-II.exe --launch "F:\SteamLibrary\steamapps\common\METAPHOR\METAPHOR.exe", and just edit the icon to the right exe as well.

Of course this is not ideal, but it works.