SMAPI breaks Steam controller support for a few players
Pathoschild opened this issue ยท 15 comments
Steam lets the player use controllers that aren't supported by their OS (like the Steam Controller and PS4 controller). When launching the game with SMAPI, the controller input goes to the SMAPI console instead of the game window. This doesn't affect natively-supported controllers (like the XBox Controller on Windows).
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.
- Install SMAPI as usual
- In your Stardew Valley installation directory (
/Users/YOUR USERNAME/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS
), open the file namedStardewValley
in your text editorNow, 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:
- 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
.- 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.
Hello, the new StardewValley
file from SMAPI 3.13.2 doesn't contain the mentioned code sections anymore. What would be the equivalent of this fix for the new code? Is there another way to disable opening the console window? Been trying to fiddle around with the code but no luck. Help would be greatly appreciated!
@knaifus Those instructions are outdated. See the official troubleshooting guide instead for the latest info; I also added a change in the upcoming SMAPI 3.13.3 that'll make it much easier (also documented on that page).
From @formicsapien via #496:
Steam Controller support (and general controller input mapping) doesn't work with SMAPI simply because steam thinks the command prompt box that pops up is the game, and when Stardew Valley launches it's a different application and will not recognize the inputs. If we could get a command line option that disables the prompt from showing this problem would be fixed.
@formicsapien That could work, but might be difficult since the console window is SMAPI.
Per formicsapien in #222, this can happen if you add SMAPI as an external program in Steam. Adding it to the Steam launch options (per the install guide) fixed it for them.
This seems to be figured out now. The Steam: controller not working properly section in the troubleshooting guide covers the common fixes, and all the recent cases I've seen were fixed with those steps.
Possible workaround reported in one reddit thread:
SOLVED: My roomie pointed me in the direction of InputMapper, which tricks your computer into thinking your PS4 controller is an Xbox360 controller-- which has built-in support in Stardew Valley. There you go.
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.
- Install SMAPI as usual
- In your Stardew Valley installation directory (
/Users/YOUR USERNAME/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS
), open the file namedStardewValley
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:
- 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
. - 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.
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.
Hello! Is there a Windows equivalent to this procedure? I'm having the same issue with my controllers not working.
@Kakujo You can't hide the SMAPI console with Steam on Windows so far as I know, but that's a last resort anyway. The fixes suggested in the troubleshooting guide almost always fix controller support on Windows.
If it still doesn't work, feel free to ask in #using-mods on the Stardew Valley Discord and we'll help. Feel free to ping me there (Pathoschild#0001
) if you don't get an answer!
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.
- Install SMAPI as usual
- In your Stardew Valley installation directory (
/Users/YOUR USERNAME/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS
), open the file namedStardewValley
in your text editorNow, 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:
- 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
.- 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.
I appreciate the post, does anyone know how I do this on Mac? when I try to open the stardew folder in the built-in mac text editor it doesn't give me code to look through just a bunch of folders. I have no coding experience so if someone could lay this out for me simply I would greatly appreciate!
@Schmooby The gist is that there is a single text file (called simply StardewValley
with no extension) which you need to open and change the text on a single line. I've done this on my machine, so I'll try to break it down for you.
- Navigate to the installation directory named in the post. (
/Users/YOUR USERNAME/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS/
) I normally do this in the terminal, but you could also use Finder. Be aware that macOS usually hides theLibrary
folder. To reveal it in Finder, select Go from the top menu, then hold down the option key to reveal theLibrary
folder as a destination. Click it and you can navigate down the rest of the path above. - Inside the
MacOS
folder you'll see a lot of files and folders (~50). Locate the file calledStardewValley
. - Open this file in a text editor. You can use the default text editor that ships with macOS, but I would recommend using an editor designed for code, such as Atom. These kinds of editors just make it easier to move around and identify individual lines by number.
- Do a search within the file (something like Edit > Find) and search for something like
StardewValley.bin.osx
. That should help you move quickly to the section you need to edit. - Make the edit as described in the original post. (the one you quoted above)
- Save and close the file.
That should do the trick! Of course you'll want to perform all of these steps with Stardew Valley and Steam off. Once complete, start the game as usual and things should work as expected.