This is an old revision of the document!

Using hex editing to add pseudo-WASD in Wolf4SDL

This guide, originally by Nexion on the Wolf3D Haven Message Boards, will teach you how to map strafe-left and strafe-right to keys in Wolf4SDL, allowing for pseudo-WASD control schemes in not just classic Wolf3D, but many mods built on the engine.

For this guide you will need:

  • A game running on Wolf4SDL, that you have run at least once (So it generates a config file!). For this guide we'll be using the original Wolf3D, but with minor changes this will work with most Wolf4SDL mods.
  • A hex editor. For this tutorial we'll be using HxD. Go to their page and download the program in your preferred language. Install it wherever you would like.
  1. Open HxD. You should be greeted with a screen similar to the following:
  2. Go to File→Open as shown above, and navigate to your game folder. Select your config file and Open. The file may be named CONFIG, or possibly CFGSDL in the case of certain mod releases.
  3. The Hex Editor is broken into multiple columns. We want to look at the final column, titled “Decoded Text”. Scroll down until you locate numbers “1…2…3…4”. These sequential numbers are most likely going to be the weapon-select buttons which means when we find them, we’ve found the controls!
  4. There are multiple controls we can edit from within this file. Below is a full list of what we can do, though for this guide we are just focusing on strafe left and strafe right.
    • n - next weapon
    • l - previous weapon
    • e - exit to menu
    • p - pause game
    • a - strafe left
    • d - strafe right

  5. So, to add dedicated strafing buttons, you would need to put an ‘a’ and ‘d’ (or whatever keys you’d like them to be) in the appropriate places of your file. Be careful to replace spots in the file and not add to it, otherwise there might be unforeseen issues. You should have results similar to the following screenshot: Use the ‘ÿ’ symbols as a reference point; they should be in the same place as before you edited the file.

  6. Many Wolf4SDL games might have more weapons in them, which will result in more numbers in the config file. Just remember, the pattern of keys are generally the same, so you only need remember how many spaces after the weapons to edit (Generally, there should be four spaces between the weapons and strafing controls). In a game with a single additional weapon, it would look like the following:
  7. Provided you’ve followed the instructions above, you should be able to save the CONFIG file and run your game. Change forward to ‘w’ and backwards to ‘s’ within the in-game control options, and you should have functioning WASD controls.

Some games will include extra controls like portable medkits that might change where the strafing keys are located. For these games it comes down to trial and error to find the location of the strafe keys. Remember to backup your file!

  • guides/wasdinwolf4sdl.1585114041.txt.gz
  • Last modified: 2020/03/25 16:27
  • by zombie