SMAPI icon indicating copy to clipboard operation
SMAPI copied to clipboard

SMAPI breaks Steam controller support on MacOS

Open merlinbk opened this issue 5 years ago • 10 comments

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.

  • Stardew Valley executed via Steam without SMAPI results in working Switch Pro Controller. Everything works correctly.

  • Stardew Valley with SMAPI 2.7 without mods results in Switch Pro Controller not working correctly. (The right joystick works. ZR button Works. + button Works. )

  • Stardew Valley with SMAPI 2.7 with mods results in Switch Pro Controller not working correctly. (The right joystick works. ZR button Works. + button Works. )

  • I cannot test Stardew Valley without Steam because controller is not read by Stardew Valley without Steam. I have been trying to find a third party app that enables controller functionality within Stardew Valley.

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.

merlinbk avatar Oct 26 '18 03:10 merlinbk

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.)

Pathoschild avatar Oct 26 '18 22:10 Pathoschild

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.

robbiev avatar Jan 03 '19 13:01 robbiev

@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).

Pathoschild avatar Jan 04 '19 00:01 Pathoschild

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.

breathnu2 avatar Jan 16 '21 02:01 breathnu2

@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.

Pathoschild avatar Jan 16 '21 23:01 Pathoschild

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

  • Edit ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/StardewValley
  • Replace dotnet with /usr/local/share/dotnet/dotnet
  • Comment out the open -W -a Terminal and add /tmp/open-smapi-terminal.sh 2>&1 > ~/smapi-term.txt below it
  • Update dotnet StardewModdingAPI.dll "$@" to /usr/local/share/dotnet/dotnet StardewModdingAPI.dll "$@" 2>&1 > ~/smapi.txt

However, the controller still does not work.

cookandy avatar Nov 28 '21 20:11 cookandy

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

bpenda avatar Mar 14 '22 18:03 bpenda

@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.

Pathoschild avatar Mar 15 '22 13:03 Pathoschild

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 :(

soh-999 avatar Apr 24 '22 10:04 soh-999

@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.

Pathoschild avatar Apr 24 '22 17:04 Pathoschild