Environment Variables - Heroic-Games-Launcher/HeroicGamesLauncher GitHub Wiki

Environment Variables

Table of Contents

Introduction

In short, environment variables are a way to pass settings to a game on launch. Environment variables can tell the Proton runner to output a verbose log which can then allow the user to debug the game. Environment variables can also tell Proton to use different DLLs, either those bundled with Proton or those bundled with the game in the game's installed directory.

Do note many guides online will include tutorials on how to set environment variables in Steam. If you are using the Heroic Games Launcher, do not set environment variables in Steam. Instead set these variables directly in the Heroic Games Launcher. This page will cover how to do so. In addition, many guides will include %command%, this bit is specifically for Steam. It does not apply to Heroic. Do not add `%command% to environment variables you set in the Heroic Games Launcher.

Another important thing to keep in mind is that many guides can be frivolous with setting environment variables. These can be seen as a "magic bullet" to fix a game but in some cases, these environment variables can be unnecessary which can either not fix the game at all or mask the actual issue at hand.

Typically the most common use-case for an environment variable is debugging. In these cases, you will set an environment variable that prints out a verbose log which can allow you to further investigate the issue at hand. After you have resolved the issue, you can disable the environment variable. For specific instructions on debugging using environment variables, see [How to Debug Games Using Environment Variables)[https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/How-to-Debug-Games-Using-Environment-Variables]

External Documentation

%command%

As noted in the introduction, %command% is specifically for Steam. Do not use %command% when setting environment variables in the Heroic Games Launcher.

Commonly Used Environment Variables

  • WINEDEBUG=+fixme
    • Outputs verbose logging information.
  • WINEDLLOVERRIDE=DLLNAME=n,b
    • The n and b stand for native and built-in. This environment variable tells Proton to first check for any DLLs in the game's directory. If this fails or if it cannot find a DLL, it falls back to the DLL bundled with Proton.
    • For more information, see Wine Environment Variables
    • WINEDLLOVERRIDES is a common environment variable used for modding games.

How to Set Environment Variables

Though Heroic Games Launcher does not require an =, these will often be included when sharing environment variables to clearly convey that the left side of the = is the NAME field and the right side is the Value field.

  1. Open the Heroic Games Launcher.
  2. Select a game and open the game's page.
  3. In the top right, click the Settings button.
  4. Click the Advanced tab and scroll down to the Environment Variables section.
  5. Set your environment variable(s), this example will use WINEDEBUG=+fixme as an example:
  6. Click the green + icon to save the environment variable(s).
  7. Your environment variable(s) will now be applied to this game in specific.

How to Convert Steam Environment Variables to Heroic

On occasion, you may see users suggesting environment variables for Steam games as shown in the images below. However, these need to be converted slightly in order to be used in the Heroic Games Launcher.

Using the second example in the image above, WINEDLLOVERRIDES="winhttp=n,b" %command%, Heroic does not need a = or %command. It also does not need quotes surrounding winhttp=n,b. In the Heroic Games Launcher, you will need to set WINEDLLOVERRIDES as the NAME field and winhttp=n,b without quotes as the Value field. For a step by step guide, see below.

Though Heroic Games Launcher does not require an =, these will often be included when sharing environment variables to clearly convey that the left side of the = is the NAME field and the right side is the Value field.

  1. Open the Heroic Games Launcher.
  2. Select a game and open the game's page.
  3. In the top right, click the Settings button.
  4. Click the Advanced tab and scroll down to the Environment Variables section.
  5. Using WINEDLLOVERRIDES="winhttp=n,b" %command% as an example, in the Heroic Games Launcher, it will look like the below image:
    • WINEDLLOVERRIDES is in the NAME field and winhttp=n,b is in the Value field.
  6. Click the green + icon to save the environment variable.
  7. Your environment variable will now be applied to this game in specific.