Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.81k stars 259 forks source link

SMAPI breaks Steam controller support on MacOS #598

Open merlinbk opened 5 years ago

merlinbk commented 5 years ago

This is still a problem on OSX 10.13.6. I can't use input mapper to bypass Steam. Steam suggestions say no changes needed to run. Essentially the controller works fine when run without SMAPI: in this case SMAPI with mods installed and Stardew not reading them. When SMAPI is then reinstalled the mods work but the controller doesn't work correctly.

Is there a way to run the mods without SMAPI?

I also tested 2.5 and 2.6. 2.5 would not load/execute. 2.6 had the same controller problem as 2.7.

Running SMAPI 2.7.

Pathoschild commented 5 years ago

That's mainly a limitation in the Steam Controller feature, which doesn't handle multi-window games correctly. The only reliable fix I know of is to circumvent it using a third-party app like InputMapper, but as you discovered there's no good one available on Mac. Unfortunately I don't know of a fix for Mac users, but I'll keep this ticket open as a reference. Let me know if you find a solution!

(You can't run most mods without SMAPI, since SMAPI is what enables the changes they make to the game.)

robbiev commented 5 years ago

This is an older comment and these steps are outdated. See SMAPI doesn't recognize controller (Steam only) in the troubleshooting guide for the latest instructions. — @Pathoschild


I've managed to get this working without installing third party software to emulate an XBox controller. I've tested with the PS4 controller, and it works with the Steam Link device as well.

  1. Install SMAPI as usual
  2. In your Stardew Valley installation directory (/Users/YOUR USERNAME/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS), open the file named StardewValley in your text editor

Now, edit the following section of code.

# launch SMAPI
cp StardewValley.bin.osx StardewModdingAPI.bin.osx
open -a Terminal ./StardewModdingAPI.bin.osx $@

Change the last line, so it looks like this:

# launch SMAPI
cp StardewValley.bin.osx StardewModdingAPI.bin.osx
./StardewModdingAPI.bin.osx $@ 2>&1 > ~/smapi.txt

Results:

  1. It will no longer open a console window for SMAPI. Instead, SMAPI output now goes to a file in your user's home directory. The file is called smapi.txt.
  2. Controller support works 🎉

As was said here, I don't think Steam likes the multi-window setup, so the changes I describe here disable multiple windows.

Pathoschild commented 5 years ago

@robbiev Thanks! I added instructions on the wiki to do that as a last resort (see Steam: controller not working properly in the troubleshooting guide).

breathnu2 commented 3 years ago

After doing the steps above, how do I enter SMAPI console commands while in-game? Is it still possible?

In my case, I'm using an Xbox 360 controller recognized by 360Controller.

Pathoschild commented 3 years ago

@breathnu2 You can use Chat Commands to run console commands in-game in that case. Hiding the console is a last resort though; see Steam: controller not working properly in the troubleshooting guide for more info.

cookandy commented 2 years ago

Any ideas on how to accomplish this same fix using the dotnet version for the Stardew Valley 1.5.5 beta?

I was able to suppress all terminal output using the following

However, the controller still does not work.

bpenda commented 2 years ago

This windowing issue also results in SMAPI being broken on the steam deck.

Pathoschild commented 2 years ago

@cookandy The latest instructions are documented at SMAPI doesn't recognize controller (Steam only) in the troubleshooting guide. You only need to edit one line now.

@bpenda Make sure you follow all the steps in the install guide, which includes the steps to hide the console window on Steam Deck.

soh-999 commented 2 years ago

Is it any way to make it work with the PS4 controller without installing third party software? Some time ago I tried @robbiev method, and it worked, but since the update some months ago I haven't managed to make it work in any other way! Even if I uninstall SMAPI :(

Pathoschild commented 2 years ago

@soh-999 The instructions in robbiev's comment are outdated. The latest instructions are documented at SMAPI doesn't recognize controller (Steam only) in the troubleshooting guide. You only need to edit one line now.