FYI.

This story is over 5 years old.

Games

The Modder Who Reverse Engineered ‘Dark Souls’ to Fix Its Mouse Support

When the developer won't do the work, someone else has to.

When fans successfully petitioned Bandai Namco to port Dark Souls onto the PC, the struggle wasn't over. As FromSoftware's first major PC game, it was an infamously rough port, saved only by dedicated fans who carried it across the finish line. Modder Methanhydrat has been one of those fans, and though Dark Souls was released on the PC almost five years ago, he's never been able to get over how poorly the game implemented support for mouse and keyboards.

Advertisement

It was difficult to play Dark Souls with a mouse and keyboard when it launched. Not only did the game's default key bindings seem randomly assigned, the camera didn't respond how you'd expect when swinging the mouse around. As is often the case with developers making the jump from console to PC, it was clear FromSoftware wasn't intimately familiar with what PC players expect. Various mouse fixes were implemented over the years, including one that basically made the game think the mouse was an analog stick, but it was miles from ideal.

FromSoftware sorted things things out for subsequentgames, but it never patched the original. Methanhydrat's simply titled " Dark Souls Mouse Fix" arrived last month, to the celebration of many players, even if they'd already beaten it.

"this means I can actually play DS now without feeling like my hand is constantly on fire," said one user, who used mouse and keyboard due to hand mobility issues.

Cracking this problem involved Methanhydrat reverse engineering one of his favorite games, and to learn more how he pulled it off, I went to the source himself.

This interview has been lightly edited for clarity.

Waypoint: Dark Souls shipped with mouse support on PC, but obviously it wasn't right for everyone. What didn't work?

Methanhydrat: As probably most people know by now, the PC version of Dark Souls was a total mess at release and is to this day only properly playable, thanks to the fantastic DSFix by Durante.

Advertisement

Aside from many technical issues, people also quickly discovered that the mouse and keyboard controls were in a state one could, without exaggeration, only describe as unplayable. Not only [did the] default layout of the keybindings [show] a profound lack of understanding of how games are played with that control method, it was also basically impossible to properly control the camera. While there are other games out there which have sub-optimal mouse input, they usually only suffer from unwanted acceleration, sluggish movement or input lag. But the original mouse controls of Dark Souls have a very weird behavior, where the movement is choppy and controlling the camera feels like using a mouse that only updates once a second.

While the keybindings could easily be fixed in the in-game settings, the camera controls were basically broken. Another modder very early on came up with a solution that was the way to go when wanting to play the game with the mouse. What he did was [write] a controller emulator that feeds the mouse input to the game as movement of the right analog stick, thereby circumventing the original mouse input of the game altogether. This was a good enough solution and made the game finally playable for people who do not have a controller or someone like me who just prefers to use mouse and keyboard.

Images courtesy of FromSoftware

Although it did a great job in helping many people (including myself) to enjoy the game over the years, it is not an optimal solution, because using an analog stick is very different on a technical level from mouse movement and therefore emulating it with a mouse does not feel like you would expect or want from a PC game. Aside from sluggish movement, the most prominent drawback of that solution is negative acceleration, meaning that the faster you move the mouse, the less camera movement is produced. This had bothered me and other people for years, but we just accepted it, because the only way of this getting fixed was for the game to be patched, which everybody knew would was not going to happen at that point.

Advertisement

Waypoint: It's hard for me to imagine playing Dark Souls with a mouse; a gamepad is ingrained into my mind. Is there an advantage to using a mouse, or just preference?

Methanhydrat: All the games can be played fine with mouse and keyboard from start to finish. It is, of course, undeniably true that you lose a little control of the movement, because you are trading an analog stick for binary keyboard input, but in practice this actually makes very little difference. The two relevant movement speeds can be specified with a modifier key, and using the eight rolling directions the keyboard offers work perfectly well to do anything you need in those games. On the other hand, you gain fine control of the camera with a mouse, which makes some things such as aiming with a bow easier. But I would be the first to admit that this also does not have a major impact to the overall gameplay, unless maybe you are playing a bow-only build.

So for most people it is not about getting an advantage, but rather personal preference. I personally cannot stand using a controller for any game in which I have direct control over a 3D camera. Even though precise input is not necessary from a gameplay standpoint, I am just more comfortable with a mouse and keyboard. One of the beautiful aspects of PC gaming is that everyone can use the control scheme he or she prefers, even though it may deemed to be inferior by other people.

Advertisement

"One of the beautiful aspects of PC gaming is that everyone can use the control scheme he or she prefers, even though it may deemed to be inferior by other people."

Waypoint: This mod goes far beyond swapping texture or importing a character model. I have to imagine this was complex. What was its development like?

Methanhydrat: Yes, even though it might not appear like it, because there are no changes to the visuals or the gameplay, fixes like this actually do take a lot of effort to make. The problem is that these kind of technical issues often cannot be fixed from outside of the game. When it comes to controls, there is only so much you can do by tinkering with configuration files or using external tools, such as AutoHotkey.

If they are broken on a fundamental level, like they were with Dark Souls, you actually have to dive deep down into the guts of the game to figure out a way to solve the problem. This is why this approach should only be used as a last resort, when it is pretty clear that all other options have been exhausted and that there is no hope for an official patch to fix the problem.

To do something like this, you have to apply techniques that in computer science are referred to by the term "reverse engineering." The same way you can break apart your toaster to find out how it works, you can take a look at the executable file of a piece of software to reveal its inner workings, without having access to the source code. Now, this is easier said than done, because a modern game is of course much more complex than a toaster and you are looking for very specific parts in a program that quite a few people spend years on to develop.

Advertisement

How long it will take to do a fix such as this is highly dependent on experience and intuition. People hacked into games forever, and of course I am far from the only person being able to do this. To be honest, I have very limited experience and skills in this kind of thing, especially compared to some other people out there, who in some cases have been doing nothing else for the past 20 years. Unfortunately, more often than not, those people usually end up developing cheats or cracks for games, instead of using their powers for good.

Waypoint: Was there a particular aspect of this mod that was challenging to put together? What took the most time?

Methanhydrat: The development of a fix such as this can broken down into two parts. First, you have the hacking part, in which you are trying to solve the actual problem by dissecting the executable and finding ways to make the game do what you want. Secondly, once you have actually achieved what you wanted, you have to think about how to make the fix usable by other people. Although the first part consumed more time overall, the second one consumed more time than I had anticipated.

What you have to keep in mind, is that you are trying to deploy something that is essentially a hack, to a game without any modding support whatsoever, for a lot of people with vastly different combinations of hardware, tools and other mods they are using with the game.

Advertisement

This is much harder than it may seem, because especially with Dark Souls you cannot assume that people are playing the same way you do. You have to ask yourself things such as: "Is the fix easy enough to install or configure, so it can also be used by people who might not be tech-savvy? Are the instructions and the GUI design intuitively to understand? Can players configure the controls the ways they want?"

Additionally, there is also the problem of compatibility. People are using all kinds of different mods and tools to customize the game, sometimes resulting in Frankensteinian amalgamations of different programs and DLLs that all interact with the game simultaneously, and you have to take care that at least the most popular ones are working with your fix. Although there was a fair amount of alpha testing before the fix was made public, there were a lot of issues like this that I had not seen coming.

"It made me realize that I could contribute to the PC community in ways that did not require any creative talent."

Waypoint: At this point, Dark Souls is several years old, with most of the community having moved on to newer games. Why keep working on Dark Souls ?

Methanhydrat: Even though the sequels were generally well received, the first Dark Souls is already somewhat of a cult-classic and is by many people considered to be the best part in the series. The SteamSpy statistics seem to confirm this, with the first Dark Souls still being roughly on par with Dark Souls 2 in terms of concurrent players. Even Dark Souls 3 has only a little over twice as many, despite being a much younger game. So the first Dark Souls is far from dead and it is also a game many people hold dear and come back to for another playthrough a few years later.

Advertisement

Additionally, even though some games do not age well, great games generally do not suddenly become bad because they are a few years old. And I am of the opinion that good games deserve to be preserved.

Waypoint: Do you have a history with modding? Do you thinker with things?

Methanhydrat: I am a long time PC gamer, and came first into contact with the concept of modding around 1995, when building levels for the Star Wars game Dark Forces, together with my father and brother. Not only was it amazing to see how much work people put in custom campaigns, it was also an interesting experience to exchange levels online at a point in time where most people around you had not even heard about the internet.

While I was dabbling around with an editor to create a custom map for the original Counter-Strike, I quickly realized that I lacked the creativity and dedication to contribute anything valuable for other people and I just kept enjoying modding as a player instead of a developer.

Some time ago I ran into a notorious problem in one of my all-time favorite shooters named F.E.A.R. On many modern systems, [it] slows the performance of the game down to an unplayable degree and can only be fixed by a tedious workaround. I took a deeper look into the problem, and was able to determine the cause and develop a fix for it. After I released it, I was amazed by the reception, and it made me realize that I could contribute to the PC community in ways that did not require any creative talent.

That is why I do not consider myself a modder in the traditional sense of the word. Up to this point, I did not create anything that changes the gameplay or visuals of a game, but rather help people to better utilize their hardware and to allow them to play a game in the way they like. There are many other great people doing stuff like this, such as Durante or the developers behind tools such as Flawless Widescreen.

Unfortunately, I have two left hands when it comes to fixing things in real-life that have nothing to do with computers. But I have an unspoken agreement with a long-time friend of mine, who works as a craftsman. I will fix any problems he has with his PC, and he will help me with any handiwork around my apartment. Which is also an idealized way I like to think about the PC gaming community as a whole.

Follow Patrick on Twitter. If you have a tip or a story idea, drop him an email here.