**REPORTED** Gamepad issues

yodabeto

Terrarian
Your Terraria Device
Xiami Redmi Note 9
Mobile OS
Android 11
Hello,
I recently bought an 8bit do SN30 pro gamepad with the purpose of playing terraria and some retro games, this gamepad has basically two types of bluetooth connection I can use Dinput or Xinput. The gamepad seems to work correctly with everything except terraria. I tested different android games, emulators and even gamepad tester apps and all of them indicate the controller(all buttons, including triggers and thumbsticks) is working correctly. I know that currently there are many people facing gamepad issues with android 11 update and some "accesibility" settings as well and it might be related. This gamepad issue on terraria is a bit complex so the whole story is explained below.

Initially:
First try (tried with both Dinput and Xinput, same result), all gamepad buttons were not recognized in game except for L1 which actually was the only button detected ingame. When tried to "Edit controller Settings" terraria didn't allow me to change any control. Next, I tried using the menu option "setup controller hardware", it appeared only when turning off then turn on gamepad (small bug?), so... in this "setup controller hardware" menu option terraria said I had a Controller: "Virtual" and it only detected and was able to remap D-pad, both Thumbsticks (sometimes called L3 and R3), select,start and A,B,X,Y buttons, in the other hand both joysticks left and right horizontal and vertical axis were not recognized also the shoulders L1,L2 and triggers R1,R2 were not recognized as well. Note: Take notice that here Thumbsticks are recognized by the hardware mapping menu.

Next try:
I heard there was an android 11 issue so applied the "workaround" disabling all accessibility features I had enabled. Now, If you remember my gamepad can connect in Dinput or Xinput mode. So, I tried with both configurations and it seemed that they both worked good and exactly the same (except A and B, and X and Y being inverted in each case, not much of an issue really), now both joysticks left and right were completely functional but then I started doing deeper tests and hell I was wrong, there are still issues. I found two sets of behavior, one for Dinput and other for Xinput

Xinput: All buttons work, except L2,R2(Triggers) and L3,R3 (thumbsticks buttons)
Dinput: All buttons work, except L3, R3 (thumbsticks buttons)

In summary, it seems that this game controller issue in terraria is somewhat related to the buggy android 11 update since it improves using the workaround but...it still seems to be a terraria issue because any other game, gamepad tester, emulators correctly detected the controller even though I had the accesibility settings enabled. Terraria was the only thing requiring me to apply the android 11 "workaround".
I know you have told multiple times that not all controllers are supported but for this gamepad I think this is not the case since android 11 workaround + Dinput configuration allowed this gamepad to be almost 100% functional except for the L3 and R3 buttons
 
Hello i've read the post and I have 8BitDo Pro2 and like you my Dinput does not register my L3,R3 (thumbstick buttons)
 
Yes. It is only with Terreria. Other applications work good, could be related to the android 11 gamepad issues. Let's see if it is possible to be fixed.
it must be android 11 and terraria, on another device with Android 10 it works fine, except for LT and RT, in my case
 
This is extremely annoying. It has nothing to do with android 11, and everything to do with how they've decided to handle controllers in the app. If you look at any emulator for example, basically every single controller that exists is supported because you're always able to map any input recognized by the OS to the emulator function. However in Terraria, for some stupid reason they decided to completely hide and disable the "setup controller hardware" menu for any controller the app "thinks" it supports. I'm pretty sure in our case, the app "thinks" it supports the 8bitdo sn30 pro, but when it comes to L3 and R3 inputs, it's expecting a different input than what it's getting, and just ignores the other input. And because we can't map our real L3 and R3 input values to the game's L3 and R3, we can't do anything about it.
If you're still confused about what I mean, hopefully this last explanation will help: When in Dinput mode on these controllers, the triggers (L2 and R2) work fine because the app is looking for certain trigger key values, and the controller serves these expected values for the trigger presses. However in Xinput mode, the app is looking for xbox controller values. Xbox controllers use analog triggers (full range of motion), while this controller has digital triggers (on/off only). And this is why the triggers don't work in Xinput mode for the terraria app.

I could be wrong, but this is the explanation I've stuck with. I even asked about this issue back in 2020 on the official discord, right after controller support was initially added. However, the only responses I got from the devs was that they could possibly look into adding support for 8bitdo controllers (which they obviously never did add support for). However this type of support is not the best solution. This is the reason why so few controllers are supported, because their controller support method is built in a way which requires them to manually add mappings for every controller which they want to support. I just don't understand why in addition to this, they don't provide the controller mapping menu at all times! If they just let the end user map their controller to a virtual xbox controller for example, they wouldn't need to manually support every controller - the user would map the controller themselves! Like I said in the beginning, every emulator app uses this method and thus is able to support every single controller that is able to connect to your phone and is supported by the linux/android kernel.
I'm not saying that the current method is completely garbage. It has some advantages, like having automatic controller configurations 'outta the box' ready to go. There just needs to be a way for user to manually edit the mappings - and it needs to be available 100% of the time. Not only when the app deems it necessary to appear.
 
Those having issues with a controller, check the ingame keybindings or see if you have to initialize the controller before playing. The controller has to have a left and right analog joystick for UI navigation and in game weapon/tool aiming, 4 face buttons for confirming and canceling actions, and a directional D pad as an alternate UI navigation. Also note that not all controllers are completely supported with Terraria. Controllers that are guaranteed to work well are PlayStation 4 Dualshock controllers and Xbox One controllers
 
This is extremely annoying. It has nothing to do with android 11, and everything to do with how they've decided to handle controllers in the app. If you look at any emulator for example, basically every single controller that exists is supported because you're always able to map any input recognized by the OS to the emulator function. However in Terraria, for some stupid reason they decided to completely hide and disable the "setup controller hardware" menu for any controller the app "thinks" it supports. I'm pretty sure in our case, the app "thinks" it supports the 8bitdo sn30 pro, but when it comes to L3 and R3 inputs, it's expecting a different input than what it's getting, and just ignores the other input. And because we can't map our real L3 and R3 input values to the game's L3 and R3, we can't do anything about it.
If you're still confused about what I mean, hopefully this last explanation will help: When in Dinput mode on these controllers, the triggers (L2 and R2) work fine because the app is looking for certain trigger key values, and the controller serves these expected values for the trigger presses. However in Xinput mode, the app is looking for xbox controller values. Xbox controllers use analog triggers (full range of motion), while this controller has digital triggers (on/off only). And this is why the triggers don't work in Xinput mode for the terraria app.

I could be wrong, but this is the explanation I've stuck with. I even asked about this issue back in 2020 on the official discord, right after controller support was initially added. However, the only responses I got from the devs was that they could possibly look into adding support for 8bitdo controllers (which they obviously never did add support for). However this type of support is not the best solution. This is the reason why so few controllers are supported, because their controller support method is built in a way which requires them to manually add mappings for every controller which they want to support. I just don't understand why in addition to this, they don't provide the controller mapping menu at all times! If they just let the end user map their controller to a virtual xbox controller for example, they wouldn't need to manually support every controller - the user would map the controller themselves! Like I said in the beginning, every emulator app uses this method and thus is able to support every single controller that is able to connect to your phone and is supported by the linux/android kernel.
I'm not saying that the current method is completely garbage. It has some advantages, like having automatic controller configurations 'outta the box' ready to go. There just needs to be a way for user to manually edit the mappings - and it needs to be available 100% of the time. Not only when the app deems it necessary to appear.
Sorry about this, there is a way to overload the default configuration of your controller and get it displaying in the menu for configuration,

If you create a folder in your root save folder, called ControllerProfiles,
you can place a configuration file in there which should then make the extra controller configuration menu appear

You should name the json configuration file the same as how it displays in settings menu (of the OS) when connected.

Also inside the json set the attribute for the deviceName the same

e.g.

"deviceName": "Wireless Controller",
I've attached a configuration file to this post as an example this would work on a device called "Wireless Controller". If you can get back to me to make sure this works for you and give me details of your working configuration (once you have edited it in game) file that would be great
 

Attachments

  • Wireless Controller.json
    10.7 KB · Views: 206
Sorry about this, there is a way to overload the default configuration of your controller and get it displaying in the menu for configuration,

If you create a folder in your root save folder, called ControllerProfiles,
you can place a configuration file in there which should then make the extra controller configuration menu appear

You should name the json configuration file the same as how it displays in settings menu (of the OS) when connected.

Also inside the json set the attribute for the deviceName the same

e.g.

"deviceName": "Wireless Controller",
I've attached a configuration file to this post as an example this would work on a device called "Wireless Controller". If you can get back to me to make sure this works for you and give me details of your working configuration (once you have edited it in game) file that would be great
Thank you for solving the problem. Now I can play terraria on my Defender Blast controller. The config file is attached.
 

Attachments

  • Gamepad.json
    10.2 KB · Views: 154
Hello,
As the original creator of this post I kept an eye on it for some time but since I didn't see any real useful information I eventually forgot to check until now. So, I'm here to thank you for taking the time to help and provide the information on the controls profiles and config file. I have not yet tested it but I will and will come back here with feedback. Again, thanks
 
Have you tried Angryhippo's instructions? I believe the instructions are aimed at making "Setup Controller Hardware" show up.
 
Hey there, is there a way to fix this issue without root? I can't afford to root my phone, so I can't really use the method above. The phone I'm using is the Infinix HOT 11s NFC with an 8bitdo PRO 2 controller (with latest firmware). Only issue I have is L3/R3 not working and the "Setup Controller Hardware" menu not showing up.
 
Hey there, is there a way to fix this issue without root? I can't afford to root my phone, so I can't really use the method above. The phone I'm using is the Infinix HOT 11s NFC with an 8bitdo PRO 2 controller (with latest firmware). Only issue I have is L3/R3 not working and the "Setup Controller Hardware" menu not showing up.
You don't need to root your phone to do that.
In order to change the attributes in the .json file you will need a computer with a notepad app.
In Windows:
1. Download that file
2. Left-click the file two times. When you see a window open, select "Notepad", than between the lower 2 options, choose "only once"
3. When the file is opened, press Ctrl+F in your keyboard. Look for "deviceName"
4. Replace deviceName with the name of the gamepad that appears in your phone Bluetooth settings when you connect it.
5. Save the .json file.
6. Connect your phone to your PC with a cable.
7. In the File Explorer, left-click your phone two times.
8. Go to Android/data/com.and.games505.TerrariaPaid/ControllerProfiles
9. Replace the .json file that has the name of your controller (that was already in your phone) with the one you just edited in your computer. You will probably find it under Downloads.
10. You can now disconnect your phone from your PC.
11. Launch Terraria and if the controller still doesn't work properly, try going to the controller tab in settings.
12. Enjoy!
If you have any more questions just reply to me.
 
the ingame keybindings or see if yo

You don't need to root your phone to do that.
In order to change the attributes in the .json file you will need a computer with a notepad app.
In Windows:
1. Download that file
2. Left-click the file two times. When you see a window open, select "Notepad", than between the lower 2 options, choose "only once"
3. When the file is opened, press Ctrl+F in your keyboard. Look for "deviceName"
4. Replace deviceName with the name of the gamepad that appears in your phone Bluetooth settings when you connect it.
5. Save the .json file.
6. Connect your phone to your PC with a cable.
7. In the File Explorer, left-click your phone two times.
8. Go to Android/data/com.and.games505.TerrariaPaid/ControllerProfiles
9. Replace the .json file that has the name of your controller (that was already in your phone) with the one you just edited in your computer. You will probably find it under Downloads.
10. You can now disconnect your phone from your PC.
11. Launch Terraria and if the controller still doesn't work properly, try going to the controller tab in settings.
12. Enjoy!
If you have any more questions just reply to me.
Hi, sorry for the late reply. Just saw the message after looking up this post again. It worked, had to fiddle around with the settings (mostly changing the button styles and rebinding everything) and now it works like a charm.

Thanks a bunch!
 
Back
Top Bottom