Black Mesa

Black Mesa

40 ratings
Black Mesa Optimal Controller Configuration / Setting Up a DS4 and Other Controllers
By gru
This guide will cover the optimal controls for Black Mesa, based off from the console versions of Half-Life 2. Keep in mind that while this is the "optimal" one, there might be still room for improvement on the controls.
2
   
Award
Favorite
Favorited
Unfavorite
⁣⁣
The controls and how they are set up
Firstly, navigate to your game installation folder. You can do this by right clicking on your game in the library, selecting manage and then "Browse Local Files". Afterwards, navigate to bms and then the cfg folder. There'll be a file named 360controller.cfg. Open up this file.


Next up, you want to change the bindings here under Joystick Buttons. Refer to the screenshot on how to arrange the bindings.

Explanation for the controls:

A is for jumping
B is for reloading
X is for interaction
Y is for flashlight
Left Bumper is for running
Right Bumper is for last used weapon
D-Pad is for weapon switching
Right Trigger is for attacking
Left Trigger is for alternative fire
Left Stick (pressed) is for crouching
Right Stick (pressed) is for zooming
Loading it up in game and adjustments
Next up, you want to launch your game to load the custom controls. In order to be able to do that, you must first have developer console enabled. You can skip this bit if you already have it enabled, but for those who don't know how, go to options, under the game tap scroll down and set Developer console to yes. The key to opening the console in game is the ~ key or the " key, depending on your keyboard layout. While you're at that screen, I also heavily recommend enabling auto aim so that you can have an easier time with encounters using a controller, as well as enabling toggle crouch.

After this is done, open up the console and type exec 360controller to the console. At this point, your controller is mostly ready, but you can still adjust some things such as the sensitivity. Under the options, navigate to input and adjust the settings to your own liking.

Navigating the menu with the controller can be a bit tricky. D-pad is used for this purpose but regardless I'd recommend just using a mouse to go through the menu for now, until the game is updated to have proper support for navigating the menus.

Using a Dualshock 4 and other similar controllers
Note that I only possess a Dualshock 4 controller and as such, this part of the guide will cover just that. If the steam input supports your specific version of the controller, then it'll work just as fine.

Dualshock 4 users as well as other controllers should follow the steps listed earlier in the guide about controls and setting it up in game before moving on with this section.

There are multiple ways you can go along with this. One is that you can use a program like DS4Windows to emulate your controller as an xbox controller, and other is to use steam input to emulate your controller as an xbox controller. For the sake of avoiding external programs, this guide will focus on what is available to everyone, which is steam input.

Firstly, you want to launch your steam in big picture, which is done by clicking the windowed box on the top right.


After big picture is launched, click on the gear icon on the top right and navigate to controller settings. Enable the configuration support for the type of controller you posses. In my case, I have to enable PlayStation Configuration Support since I have a Dualshock 4. Steam should be able to show you the detected controller if it supports it. If it does not show up, try using your controller with a cable instead of bluetooth.
If your controller does not show at all regardless, the type of controller you're using may not be supported. As such, you'll have to find a program for your controller that emulates it as an xbox controller.

While still in big picture, navigate to your library, click on Black Mesa and select manage game.


Click on controller configuration and you'll be brought to a screen like this.
Chances are, yours will look different with the controller buttons prompting to keyboard buttons. This is not what we want, as it will not make the controller work properly at all. What you want to do is click on Browse Configs at the bottom. Click on Templates at the left and select just gamepad.
After the config is loaded, click on Apply Configuration at the bottom and it'll be loaded. Click on Done to leave the controller configuration screen and launch your game. With this, you'll be done setting up the controller and it should fully work (even with Rumble!) with your controller.


Extra Notes
You won't really have any controller prompts while playing the game like this due to it being a source engine limitation. There were mods amongst the internet for this if one REALLY wants to have controller prompts, but I believe it is not necessary for a game like this when they occasionally show up.

Xbox Controller users should make sure they are not using Big Picture at all if their game is not working properly with their controller by disabling controller configuration in settings, otherwise they'll encounter issues such as not being able to move in game using the controller.

Also, resetting the game settings to default will get rid of the controller bindings you set up, as well as sensitivity and what not. Simply type exec 360controller to the console again and adjust the settings in game to your liking.

I've also found out that some mods may break the weapon switch by not showing the icons properly. I'd advertise caution playing with lots of mods while using a controller.

Thank you for reading the guide. If you've found it helpful, share it with other people so that more can see it and experience this fantastic game on their controller.
16 Comments
gru  [author] 1 Oct, 2023 @ 10:45pm 
I literally cannot help you unless you give me screenshots of what you set up or something else. I don’t have this issue with my own game.
Limbo 1 Oct, 2023 @ 4:12pm 
Yep it was already connected. Still doesn't work
gru  [author] 30 Sep, 2023 @ 1:31pm 
"I solved the issue, the command works only when I have the gamepad already connected. Thank you for this guide!"
Limbo 30 Sep, 2023 @ 1:19pm 
I'm not on a beta or using an old version of black Mesa. I did read the comments
gru  [author] 30 Sep, 2023 @ 12:11pm 
Please read the below comments.
Limbo 30 Sep, 2023 @ 12:07pm 
Just says all buttons are invalid after entering the command.
Icebound 23 Jan, 2023 @ 11:41am 
I solved the issue, the command works only when I have the gamepad already connected. Thank you for this guide!
gru  [author] 23 Jan, 2023 @ 6:54am 
It shouldn’t give you such an error unless you’re on older version of the game - there’s no reason why it would say it’s not a valid key otherwise.

You can check by looking at the main menu. If you are on the new UI, then the issue lies somewhere else.

You can delete the controller file and verify game files to re-create the file.

Unfortunately, I didn’t see anyone else encounter this issue. But make sure you’re not opted into any of the betas. I’m also not sure if it matters if you are on linux or not, since I made this with Windows in mind.
Icebound 23 Jan, 2023 @ 6:47am 
How can I know which version I have? I downloaded the game for the first time yesterday, and I don't have any mods.

If I delete the controller file will it appear again?
gru  [author] 23 Jan, 2023 @ 6:44am 
You’re probably playing on an older version of the game.

If you aren’t, delete the file, verify game files and try again.

But beyond the game version, some mods etc might be causing the issue. I don’t think it can be caused by anything else.