id5 Tweaker

What is this?

The id5Tweaker is a small mod that allows additional configuration of id Tech 5 games. Its features include the option to change the FPS limit, force the value of CVars and additional game specific settings.

You can download the mod from PC Gaming Wiki here or from Nexusmods here.

Overview

Description

Although the id Tech 5 engine offers a surprising amount of flexibility in regards to configurations through its CVar system, it is inconvenient to use because some CVars won’t be saved, are restricted or have too narrow bounds (e.g. the FOV in the Wolfenstein games).

Additionally, there are some problems that can’t be fixed by CVars at all, such as the limit of 60 FPS. While there are some methods out there which supposedly should unlock the FPS, they don’t seem to work or ceased to work after the games were patched.

This mod aims to make the overall configuration easier while at the same time to offer additional options for certain problems. The mod is used through a set of new console commands which can either be directly entered into in the in-game console or applied by using an optional config file. The Tweaker can change the FPS limit, force restricted CVars without having to use workarounds such as the cvaradd command and push some CVars out of their bounds. It also offers some game specific options.

Features

All Games

  • Change FPS limit
  • Force restricted or read-only CVars
  • Push some CVars out of their bounds (e.g. FOV)
  • Bind opening the console to any key
  • Bundle configuration in a single config file
  • Easy to install

RAGE (32-/64-Bit)

  • Bind the use of items to individual keys
  • Bind toggle versions of aim down sights or sprint
  • Disable parts of the HUD (e.g. crosshair or minimap)

Instructions

Supported Games

Important: This mod relies on the latest, fully patched executables of the supported games. Older versions or ones that otherwise have been tempered with very likely won’t work. This also includes versions of the games from other regions which I don’t own myself. For example, the German versions of the Wolfenstein games probably currently won’t work with the mod.

  • RAGE [32-/64-Bit, Global]
  • Wolfenstein: The New Order [Global]
  • Wolfenstein: The Old Blood [Global]

Note: You can find out what version of a a game you have by using one of the methods stated here.

Install

Note: The mod does not make any permanent changes to the game or the system and can easily be removed (see below).

  1. Extract the file dinput8.dll to your main game folder. For Steam this in most cases is "Steam\steamapps\common". For example: "D:\Games\Steam\steamapps\common\Wolfenstein.The.New.Order".
  2. (Optional) Place the id5Tweaker.ini config file in the game directory and edit as necessary (see below).
  3. Start the game like you would normally, for example directly through Steam or a desktop shortcut.

Note: There are two versions of the DLL in the zip-file. Since the default version of RAGE is a 32-Bit executable, it needs a separate DLL. The 64-Bit version of RAGE as well as both Wolfenstein games can use the same DLL.

Uninstall

  1. Remove or rename the dinput8.dll from the folder of the game.

How To Use

After the installation, the mod gets loaded automatically when you start a supported game. You can interact with the mod by using one of the corresponding console commands (see below). They behave like original commands and can either just be entered into the console or bound to a key by using the bind command. You can also use the optional config file to bundle commands and CVars, which are executed and set each time a level is loaded.

The mod also uses the in-game console to print status information every time a command is executed. This output is color coded in super stylish cyan. So if something does not work as intended, look into the console to see if for example the specified command or CVar could not be found.

List Of Commands

All Games

id5Tweaker_SetFpsLimit value

  • Changes the FPS limit to value
  • Example: id5Tweaker_SetFpsLimit 140
    Note: There are some known issues with unlocking the FPS (see below)

id5Tweaker_ToggleFps

  • Enables or disables the above FPS limit
  • Can be used to play sections of a game that have issues with high FPS
  • Is in the default config file bound to the '*' key on the numpad

id5Tweaker_ForceCVar name value

  • Forces a CVar with name to value
  • Can be used to set restricted or read-only CVars
  • Extends the bounds for certain CVars (e.g. g_fov)
  • Example 1: id5Tweaker_ForceCVar g_fov 110
  • Example 2: id5Tweaker_ForceCVar r_postProcessDofMode -1

id5Tweaker_Reset

  • Reloads the id5Tweaker.ini config file executing and setting all commands and CVars
  • Is in the default config file bound to the '-' key on the numpad

id5Tweaker_ToggleConsole [0.0-1.0]

  • Toggles the state of the in-game console
  • The optional argument specifies the fraction of the screen being covered by the console
  • Obviously only makes sense when bound to a key

RAGE (32-/64-Bit)

id5Tweaker_RAGE_Bind key action

  • Binds an action to key
  • For a full list of actions use the id5Tweaker_RAGE_ListActions command
  • For a full list of keys use the id5Tweaker_RAGE_ListKeys command
  • Example 1: id5Tweaker_RAGE_Bind F use_grenade_he
  • Example 2: id5Tweaker_RAGE_Bind MOUSE2 toggle_zoom

id5Tweaker_RAGE_ListActions

  • Lists all valid actions for the id5Tweaker_RAGE_Bind command in the console

id5Tweaker_RAGE_ListKeys

  • Lists all valid key names for the id5Tweaker_RAGE_Bind command in the console
  • Most key names should be intuitive, such as X, ENTER, MOUSE2 or KP_2

id5Tweaker_RAGE_HideCrosshair [0,1]

  • Hides the crosshair
  • Does not remove interaction info (see below)
  • Works as a toggle when used with no argument

id5Tweaker_RAGE_HideInteractionInfo [0,1]

  • Hides information of interactable things (e.g. bodies you can loot)
  • Works as a toggle when used with no argument

id5Tweaker_RAGE_HideMiniMap [0,1]

  • Hides the minimap
  • Works as a toggle when used with no argument

id5Tweaker_RAGE_HideWeaponInfo [0,1]

  • Hides all weapon information in the lower left including quick items
  • Works as a toggle when used with no argument

Using The Config

Instead of manually entering the commands into the console, you can use the id5Tweaker.ini config file.

The config file gets read and applied every time a level is loaded. You can also manually trigger a reload of the config by using the id5Tweaker_Reset command. This can be useful when trying to find the right settings. Just edit and save the file and reload the config. By default, this command is bound to the '-' key on the numpad.

There are two sections in the config file:

  • [CVARS]

    In this section you can specify any console variable (CVar) available in the respective game. The value of the CVar is forced directly via the internal CVar system. This is equivalent to using the id5Tweaker_ForceCVar command.

  • [COMMANDS]

    Every line in this section gets send to the command system of the game as if it were manually entered into the console. Therefore, anything you can enter into the console of a specific game can also be used here.

The default config already contains the most important CVars and commands. However, most of them are disabled because they are a matter of personal preference or the hardware. To enable them, uncomment the corresponding line by removing the ';'.

You might encounter areas of the game that don’t work with high frame rate (see Known Issues below). If this happens, use the id5tweaker_ToggleFps command in the console to toggle the FPS unlock. By default, this command is bound to the '*' key on the numpad.

Optimizing Performance

Maintaining a rock-solid 144 FPS is difficult, even on high-end hardware. Although the usual options, such as resolution and anti-aliasing, have an impact on the overall frame rate, other, more obscure settings, have a greater impact on stability — i.e. frame times. Because the virtual textures continuously have to be transcoded and streamed, the frame times may fluctuate depending on the configuration and level geometry. Because many of the corresponding CVars have an effect on each other, their overall impact on performance is not as easy to assess as traditional options such as anti-aliasing.

Important CVars

From my experience, the following CVars are the most important:

  • vt_pageImageSize* [4096, 8192, 16384]
  • vt_uncompressedPhysicalImages [0,1]
  • vt_maxPPF [1, 2, 4, 8, 16, 32, 64, 128]

The size of the page images determines the overall texture quality. The bigger the images are, the better the textures look and the more VRAM the game needs. Using uncompressed physical images further increases image quality at the expense of even more VRAM. The maxPPF option determines how many pages are transcoded (i.e. “loaded”) per frame.

Bigger textures mean that it is more costly to transcode the textures. At the same time, not being able to transcode the textures fast enough will result in the notorious “pop-in” of the id Tech 5 games.

Overall, it comes down to a balance of visual fidelity and frame time stability, while at the same time minimizing texture pop-in.

Many people should be able to set the page sizes to 16384. This leads to a VRAM usage of around 3GB for RAGE and 4GB for the Wolfenstein games. However, I would disadvise from enabling the usage of uncompressed images. Not only does this increase the VRAM usage in conjunction with big page sizes to about 5GB for RAGE and up to 8GB for the Wolfenstein games, it may also introduces micro-stutter in many areas of all games.

The value of the max pages per frame should be set as low as possible. Fortunately, playing at high FPS also means that more textures can get transcoded more quickly, making the pop-in much less noticeable and in most cases even a non-issue. This is primarily a CPU-heavy setting.

Warning: Even with CUDA-Transcode enabled, a large amount of the work will be done on CPU and the engine is very efficient in using the all available cores. Setting the maxPPF to values of 64 or higher with high FPS might load even high-end CPUs to 100%.

Recommended Approach

My recommendation to approach the best settings would be the following:

  1. Set all four vt_pageImageSize* CVars to 16384, vt_uncompressedPhysicalImages to 0, and vt_maxPPF to 4
  2. If you experience noticeable pop-in, double the vt_maxPPF value until the pop-in is no longer noticeable/bothersome
  3. If you can’t find a good balance between stability and pop-in or are experiencing severe stutter due to a lack of VRAM, set the page image sizes to 8192
  4. If you are satisfied by the performance, have at least 6GB of VRAM and want to further push image quality, set vt_uncompressedPhysicalImages to 1

For The Tech-Savvy and Adventurous

The main bottleneck of the engine seems to be the streaming of the virtual textures. By default, this means a lot of reads on the drive the game is installed on. The game also allows to set a path for a cache file. Playing the game from a slow, fragmented HDD may prevent players entirely from achieving high FPS. If your SSD is too small to install the whole game, you can at least set the cache path to it. The path can be set by adding +fs_cachepath "" to the command-line of the corresponding game.

If you have enough RAM, you can also use a RAM-Disk for the cache file or even install install the whole game to it, although this might only be feasible for RAGE, even for the vast majority of high-end systems.

Finally, although I spent a fair amount of time analyzing the various CVars and their impact on FPS and stability, the approach above might not be the best. Feel free to experiment to search for better combinations and share your experiences. Remember that you can use the find command in the in-game console to search for CVars and commands.

A starting point could be to enable the usage of CUDA to transcode the textures, which for me seems to make very little difference in FPS or stability and appears to introduce micro-stutter in some situations. Use vt_useCudaTranscode to enable the usage of CUDA. If you enable CUDA you should also set vt_cudaBudget to a value below your frame time. Remember that CUDA only works on Nvidia GPUs.

Additional Information

What You Should Know

This mod is essentially a hack and relies on the layout of the specific executable. There may be crashes or unexpected issues. Feel free to provide feedback so that the problems can get fixed.

Also, beware that some of these games were not optimized for such a high frame rate. Although the games generally perform well, I ran into sections were the FPS would drop significantly, even on a very powerful machine.

Finally, since this mod consists of an executable DLL-File, I could have put any harmful shenanigans in there. You just have to trust me that the file is clean.

If you don’t — and why should you — feel free to use a meta online virus scanner like VirusTotal to verify the file. Be aware however, that because the mod uses “hacking techniques” such as injection and hooking, it could trigger anti-virus software without being harmful.

Known Issues

There are some known problems when unlocking the frame rate in certain parts the games. Some of these problems are more severe than others. Remember that you can toggle the FPS unlock with the id5tweaker_ToggleFps console command, which by default is bound to the '*' key on the numpad.

This might not a complete list and probably will be extended in the future. If you encounter any problems, feel free to provide a description of the corresponding section in the style seen below.

RAGE

Various Locations [type: visuals, severity: minor]

  • A few physics animations like cloth or the turn rate of turrets are running faster than normal. As far as I can tell this has no effect on gameplay and is in most cases barely noticeable unless you look for it

Wolfenstein [Both Games]

Various Locations [type: interface, severity: medium]

  • Some players reported that the subtitles are lagging behind the audio in some cases, though I did not have time to verify this yet

Wolfenstein: The New Order

Chapter 1 – Deathshead’s Compound [type: performance, severity: medium]

  • Some players reported very low FPS on the first cutscene when starting a new game, although I could not confirm this on my end

Chapter 2 – Asylum – Yard [type: gameplay, severity: game-breaking]

  • The two drones that are released from the truck that crashes through the gate get ejected faster than normal and can get stuck in the ground, making them unkillable

Contact And Support

If you like this mod and want to support the development or show your appreciation, you can find more information on my website. There you can also find out more about other fixes that I have done and means to contact me if you have a question, want to provide feedback, bug reports or suggestions.

Version History

Beta 0.3:

  • RAGE: Toggling the HUD elements can now be done without having to reload the game
  • RAGE: Hiding the crosshair no longer hides the interaction info
  • RAGE: Added command to hide the interaction info
  • RAGE: Fixed bug that some items could not be correctly bound to a key (e.g. bandages)
  • RAGE: Binding an item to a key now also works with the advanced versions (e.g. Advanced RC Bomb Car)

Beta 0.2:

  • All functionality can now be accessed via in-game commands
  • Added command to open the console which can be bound to any key
  • Added some game-specific commands for RAGE

Beta 0.1:

  • Initial release

Direct Input FPS Fix

Download Sources


TL;DR

The DirectInputFpxFix fixes an input related FPS drop/slowdown problem that occurs in FEAR, its expansions, Condemned: Criminal Origins and other games. It is easy to install and does not require manual disabling of HID devices.

Quick start guide:

  1. Extract the file dinput8.dll to the folder containing the executable of the game. For example: "C:\Program Files (x86)\Steam\steamapps\common\FEAR Ultimate Shooter Edition"
  2. Start the game like you would normally, for example directly through Steam or GOG Galaxy.

Features

The DirectInputFpsFix fixes a bug that causes the FPS to severely drop after a few minutes of play. This problem is probably most widely known in regards to the game FEAR and often occurs in conjunction with the usage of Logitech devices.

However, the problem also crops up in other games using the same engine, such as the FEAR expansions or Condemned: Criminal Origins and with non-Logitech hardware configurations. A similar problem has also been reported to occur in other titles, like Prototype.

Although this issue can often be fixed by disabling most/all HID-Devices in the device manager, it is bothersome to do so and lately some people reported that that solution does not even work at all anymore, especially on machines running Windows 10.

Instructions

Supported Games

The fix is agnostic towards the game that uses it and should therefore work with all versions of a supported game, including the Steam, GOG and retail versions.

  • Confirmed:
    • FEAR and its expansions
    • Condemned: Criminal Origins
  • Supposedly:
    • Prototype
    • Kane & Lynch: Dead Men

Feel free to provide feedback if the DLL works on other games as well.

Install

The fix does not make any permanent changes to the game or to Windows and can easily be removed.

  1. Extract the file dinput8.dll to the folder containing the executable of the game. For example: "C:\Program Files (x86)\Steam\steamapps\common\FEAR Ultimate Shooter Edition"*
  2. Start the game like you would normally, for example directly through Steam or GOG Galaxy.

*Note that for the FEAR expansions the fix also has to be installed into the corresponding sub-folder of the game

Uninstall

  1. Rename or remove the dinput8.dll from the folder of the game.

Known Issues

There are currently no known issues with the fix.

Additional Information

Antivirus Software

Since this mod consists of an executable DLL file that uses “hacking techniques” such as injection and hooking, it could be classified as malicious by antivirus software. In that case, it might be necessary to add an exception rule to the scanner.

If you lack the trust in random people on the internet — and I would not blame you — feel free to use a meta online virus scanner like VirusTotal to verify the file.

Loading Other Fixes/Mods/Injectors

To increase the compatibility with other mods or injectors that are using a wrapper DLL, this fix offers two methods for remote loading of additional files. Note that there might still be compatibility issues between the different fixes, mods or injectors that have nothing to do with the loading process.

File method:

The mod will load another dinput8.dll automatically if it has the name dinput8.dll. Just rename the DLL you want to load accordingly. Using this method will lead to an error if the renamed DLL is not itself a dinput8.dll.

Folder method:

The mod will also automatically load all DLLs regardless of their names in a dinput8 sub-directory. Just create a corresponding folder in the install directory of the mod. This is the only way to load multiple (conflicting) files.

How This Works

The fix is implemented using a common technique known as DLL hooking.

User input in games like FEAR can be realized via DirectInput, an API by Microsoft for interacting with HID-Devices. The library is ancient and should no longer be used today, because there are other ways to get mouse and keyboard input, especially for games.

The FPS drops happen because the thread that runs DirectInput massively slows down after a while (as can be seen in tools like ProcessExplorer).

If an application uses a library like DirectInput, it needs a so-called DLL (dynamic-link library) where the functionality of the library is stored. In many cases, especially for libraries provided by Microsoft, these DLLs usually reside in the Windows folder.

However, there is an order of how an application searches for the DLLs it needs. Since the DLL of the fix gets copied into the main folder of the application and has the same name of a DLL needed by the game (the one of DirectInput), it gets loaded instead of the one in the Windows folder.

This means that all calls to DirectInput go through the Hook-DLL and can either be directed to the original DLL in the Windows folder or changed as necessary. This also allows some insight in how exactly the library is used by the game.

It turned out that some games not only unnecessarily register all HID-devices, they also call several functions every frame that usually only should be called once during initialization. The latter seems to apply only to devices that are not keyboards or mice. This eventually leads to circumstances where a lot of time is spent opening and closing device connections.

The fix changes the DirectInput initialization in such a way that only keyboard and pointer devices get registered.

Contact And Support

If you like this mod and want to support the development or show your appreciation with a donation, you can find more information on my website. There you can also find out more about other mods that I have done and means to contact me if you have a question, want to provide feedback, bug reports and suggestions.

Version History

v1.0:

  • Fixed a compatibility problem that prevented games to start on some systems
  • Added support for additional games
  • Updated the loading system to add support for remote loading of additional DLLs for increased compatibility with other mods and fixes (see Loading Other Fixes/Mods/Injectors)

v0.2:

  • Statically linked the Microsoft Visual C++ Runtime so that users no longer have to install the corresponding Visual C++ Redistributable package.

v0.1:

  • Initial public release

Dead Space Mouse Fix

What is this?

This fix makes Dead Space use raw mouse input without any additional smoothing or acceleration. It works with VSync and high frame rates and is easy to install without having to fiddle around with FPS limiters or config files.

You can download the fix from PC Gaming Wiki here.

Overview

Description

The mouse controls in Dead Space are notorious. While many players report issues with positive or negative mouse acceleration or overall sluggish movement, others state that the controls are not that bad. This is because the engine applies a lot of transformations to the input that are based on frame time. This leads to movement that is generally better when the frame rate ist stable. The problem gets worse when activating V-Sync. This is why popular workarounds recommend to disable V-Sync and cap the frame rate to avoid fluctuations.

Unfortunately, this also means that playing at higher frame rates is often not feasible, which also prevents users from taking advantage of GSync, FreeSync, Fast Sync or similar technologies.

This fix attempts to circumvent those problems by acquiring raw mouse input and injecting it directly into the game’s camera functions, making the controls as independent of the frame rate as possible.

While the movement is still not as perfect as in other games — e.g. DOOM — it should be a huge improvement to the default behavior.

Features

  • Raw mouse input independent of FPS or VSync
  • Reasonable sensitivity range
  • Same sensitivity in each direction
  • No dead zone for slow movement
  • No additional smoothing or positive/negative mouse acceleration
  • Improved mouse cursor
  • No automatic camera re-center
  • Configuration via the ingame settings as usual
  • Simple installation and usage without any external configuration

Note: Although the input is pretty raw when aiming, it may still feel a little bit sluggish when moving and turning the camera at the same time. This is because the game applies calculations based on the momentum of the player character to the input.

Instructions

Supported Versions

Important: This fix relies on the latest, fully patched executables of the supported versions. Older versions or ones that otherwise have been tempered with might not work.

  • Steam
  • GOG
  • Origin*

*The Origin version might crash on start when the ingame overlay is enabled. If that happens, disable the overlay in the game properties in Origin. If the game still crashes the problem might be unrelated to the fix as this is an ongoing issue with the Origin version. In that case uninstall the fix and try to resolve the issue first before installing the fix again.

Install

Note: The fix does not make any permanent changes to the game or the system and can easily be removed (see below).

  1. Extract the file dinput8.dll to your main game folder*. For example: "C:\Program Files (x86)\Steam\steamapps\common\Dead Space"
  2. Start the game like you would normally, for example directly through Steam, Origin or GOG Galaxy

See *Loading Other Fixes/Mods/Injectors for information on how to use the fix with another fix, mod or injector that uses a DLL file with the same name.

Uninstall

  1. Remove or rename the dinput8.dll from the folder of the game.

How To Use

After the installation the fix does not require any additional treatment. Just launch the game as usual.

To change the sensitivity just use the ingame settings like you would normally. The fix also incorporates the x- and y-axis inversion settings.

Loading Other Fixes/Mods/Injectors

To increase the compatibility with other fixes, mods or injectors that are also using a dinput8.dll, this fix offers a remote loading feature of additional DLLs. This can be done in two ways:

  • File method: The fix DLL will automatically load a DLL that has the same name as itself with the postfix _Remote added to it. For example dinput8_Remote.dll. Just rename the DLL file you want to load accordingly. This is the simplest way if you only have a conflict with one additional DLL
  • Folder method: The fix DLL will also automatically load all DLL files regardless of their name in a sub-directory that has the same name as itself with the postfix _Remote added to it. For example dinput8_Remote. Just create a folder with the corresponding name in the install directory of the fix. This is the only way to load multiple (conflicting) DLLs

Note: There might still be compatibility issues between the different fixes, mods or injectors that have nothing to do with the loading process.

Additional Information

What You Should Know

This fix is essentially a hack and relies on the layout of the specific executable. There may be crashes or unexpected issues. Feel free to provide feedback so that the problems can get fixed.

Since this fix consists of an executable DLL-File, I could have put any harmful shenanigans in there. You just have to trust me that the file is clean.

If you don’t — and why should you — feel free to use a meta online virus scanner like VirusTotal to verify the file. Be aware however, that because the fix uses “hacking techniques” such as injection and hooking, it could trigger anti-virus software without being harmful.

Known Issues

There are currently no known issues with the fix.

Acknowledgments

I would like to thank Magmarock (Steam/gog) for his detailed bug reports and testing for the v1.0 version of the fix.

Contact And Support

If you like this fix and want to support the development or show your appreciation, you can find more information on my website. There you can also find out more about other fixes that I have done and means to contact me if you have a question, want to provide feedback, bug reports or suggestions.

Version History

v1.0:

  • Camera movement is now constrained to the original angles. This also fixes spinning issues in zero-g
  • Using the breadcrumbs will now turn the character as intended
  • Using the mouse modifier key in a menu will no longer cause the camera to jerk when closing the menu again
  • Opening a cursor-driven menu will no longer cause the camera to jerk when closing the menu again
  • Setting the sensitivity to the lowest value no longer prevents the camera and cursor movement entirely
  • Improved mouse cursor
  • The mouse cursor is now independent of camera sensitivity
  • The camera will no longer automatically re-center
  • The fix should now work with almost every version of the game
  • The fix now offers an option to remotely load DLLs of other fixes, mods or injectors (see Loading Other Fixes/Mods/Injectors for details)

v0.5.1 Beta – Hotfix:

  • Fixed bug that caused the Steam and retail version to crash on start

v0.5 Beta:

  • The fix should now correctly work with Origin versions from any region

v0.4 Beta:

  • Added MessageBox to inform users when the fix cannot be loaded (e.g. using it on an unsupported version)

v0.3 Beta:

  • Added support for GOG and Origin versions of the game

v0.2 Beta:

  • Added support for x- and y-axis inversion

v0.1 Beta:

  • Initial release

Initial Release

Hi there and welcome to The Meth Lab. I’m a PC Gaming enthusiast and software developer, who occasionally creates fixes to solve problems in certain games. This is just a place to centralize information of stuff that I have done and where I might post updates on the status of projects.

I’m always interested in feedback. If you have a problem, a question or just want to chat, see the contact page on how to get in touch with me.