Skip to content

acidicoala/SmokeAPI

Repository files navigation

SmokeAPI

Legit DLC ownership emulation for Steamworks.

✨ Features

  • πŸ”“ Emulate DLC ownership in legitimately owned games
  • πŸ›… Emulate Inventory item ownership
  • πŸ“„ Optional configuration
  • 🐧 Support for 32-bit and 64-bit Windows and Linux systems

πŸ”— Links

πŸ“– Introduction

❓ What is SmokeAPI?

SmokeAPI is a tool for Steamworks DLC ownership emulation in games that are legitimately owned in Steam. It attempts to fool games that use Steamworks SDK (Steamworks) into thinking that you own the game's DLCs. However, SmokeAPI does not modify the rest of the Steamworks, hence features like multiplayer, achievements, and so on remain fully functional.

❔ Which games are supported?

Only games that use Steamworks SDK for the DLC ownership verification are supported. Hence, if a game's installation directory does not contain any steam_api.dll or steam_api64.dll files then it's definitely not supported. Even if a game uses Steamworks DLL, it's not guaranteed to be supported because each game might implement additional custom verification checks. Therefore, you have to first research the game's topic, to see if it supports unlocking.

Additionally, there are several points to bear in mind when it comes to unlocking DLCs with SmokeAPI:

  • SmokeAPI most definitely will not work with games that use 3rd party DRM, such as games from Ubisoft, Rockstar, etc.
  • SmokeAPI most likely will not work with games that use Denuvo SecureDLC.
  • SmokeAPI is unlikely to unlock anything in Free-To-Play games since they typically store all player data on the corresponding game server and hence all the checks are server-side.
  • SmokeAPI will not work with games that employ additional ownership protection or if the game is using alternative DLC verification mechanism.
  • SmokeAPI is unlikely to work with games that use an anti-cheat, since they typically detect any DLL/EXE that has been tampered with. Sometimes it is possible to disable an anti-cheat, but that typically entails the loss of online capabilities. Search in the respective game topic for more information about how to disable anti-cheat.
  • Some games include DLC files in their base game, regardless of whether you own the DLC or not. However, some games download additional DLC files only after a user has bought the corresponding DLC. In this case, not only will you need to install SmokeAPI, but you also have to get the additional DLC files from somewhere else and put them into the game folder. Up-to-date DLC files often can be found in corresponding game topics.
  • Some games don't use any DRM at all, in which case SmokeAPI is useless. All you need to do is to download the DLC files and place them in the game folder.

:shipit: Usage

Warning

Please proceed with usage at your own risk. Usage of this unlocker entails breaking one or more terms of service, which might result in a permanent loss of your account.

To use SmokeAPI, you need to install it into the game folder following the instructions below. Once installed, SmokeAPI is automatically loaded by a game every time you launch the game. SmokeAPI supports 2 installation modes: Hook mode and Proxy mode.

↔️ Mode comparison

πŸͺ Hook mode

  • Advantages:
    • Persists after game updates
    • Can be loaded by other injectors
    • Can sometimes bypass DLL integrity checks
  • Disadvantages:
    • Might need an additional DLL to get injected (like Koaloader)

πŸ”€ Proxy mode

  • Advantages:
    • Guaranteed to load
  • Disadvantages:
    • Might need reinstallation aftera game update

My advice is to try installing the unlocker in hook mode first. If it doesn't work, try installing it in proxy mode instead. If that didn't work, refer to the Troubleshooting section below.

πŸ›  Installation instructions (πŸͺŸ Windows)

Note

To determine the bitness of a game you can open Task Manager, navigate to Details tab, right-click on the column headers, click Select columns, tick checkbox next to Platform and click OK. This will allow you to see a game's bitness in the Details tab while a game is running.

πŸͺ Hook mode

Hook mode itself has two sub-modes: Self-Hook and Hook with injector.

πŸͺ Self-Hook mode

In self-hook mode SmokeAPI is injected automatically without the help of third-party injectors. It works best when a game doesn't have any protections against DLL injection. The main advantage of this mode is its minimal setup, which adds only 1 new DLL to the game folder.

  • Download the latest SmokeAPI release zip.
  • From this downloaded zip extract smoke_api32.dll or smoke_api64.dll, depending on a game's bitness.
  • Rename the unzipped DLL to version.dll or winhttp.dll or winmm.dll.
  • Place this version.dll or winhttp.dll or winmm.dll next to the game's .exe file.

πŸͺ Hook mode with Koaloader

If a game doesn't load version.dll or winhttp.dll or winmm.dll, you can use an alternative injector to load SmokeAPI into the game process. One such injector is Koaloader, which supports different DLLs that a typical game might load. For example, assuming that the game loads d3d11.dll:

  • Install Koaloader:
    • Download the latest Koaloader release zip.
    • From this downloaded zip extract d3d11.dll from d3d11-32 or d3d11-64, depending on a game's bitness.
    • Place d3d11.dll next to the game's .exe file.
  • Install SmokeAPI
    • Download the latest SmokeAPI release zip.
    • From this downloaded zip extract smoke_api32.dll or smoke_api64.dll, depending on a game's bitness.
    • Place smoke_api32.dll or smoke_api64.dll next to the game's .exe file.

πŸͺ Hook mode with Special K

There are games which have extra protections that break hook mode. In such cases, it might be worth trying Special K, which can inject SmokeAPI as a custom plugin.


πŸ”€ Proxy mode

  • Find a steam_api.dll or steam_api64.dll file in game directory, and rename it to steam_api_o.dll or steam_api64_o.dll.
  • Download the latest SmokeAPI release zip.
  • From this downloaded zip extract smoke_api32.dll or smoke_api64.dll, depending on a game's bitness.
  • Rename this extracted DLL to steam_api.dll or steam_api64.dll, depending on a game's bitness.
  • Place this renamed unlocker DLL next to the steam_api_o.dll or steam_api64_o.dll file.

πŸ›  Installation instructions (🐧 Linux)

Just like on Windows, SmokeAPI features 32 and 64-bit Linux builds. In release archive they are named as libsmoke_api32.so or libsmoke_api64.so respectively.

πŸͺ Hook mode (🐧 Linux)

Linux doesn't have the same easily exploitable library injection mechanism that Windows has. However, it is possible to force any Linux executable to load any library by using the LD_PRELOAD environment variable. For example:

  1. Extract and paste the libsmoke_api32.so or libsmoke_api64.so next to the game's executable.
  2. In Steam Library open game's Properties, switch to the General tab, and set the following LAUNCH OPTIONS:
Bitness Launch Options
32-bit LD_PRELOAD=./libsmoke_api32.so ./GameExecutable.x86
64-bit LD_PRELOAD=./libsmoke_api64.so ./GameExecutable.x86_64 %command%

Naturally, the exact options might change depending on how files are located on your filesystem or depending on other environment variables you might have configured. If you have other environment variables, and you don't know how to correctly combine them, then please make heavy use of search engines and LLMs for guidance examples instead of the official forum topic.

πŸ”€ Proxy mode (🐧 Linux)

Same as on Windows:

  1. Rename the original libsteam_api.so to libsteam_api.so
  2. Extract and paste the libsmoke_api32.so or libsmoke_api64.so to the same directory, renaming it to libsteam_api.so.

βš™ Configuration

SmokeAPI does not require any manual configuration. By default, it uses the most reasonable options and tries to unlock all DLCs that it can. However, there might be circumstances in which you need more custom-tailored behaviour, such as disabling certain DLCs, or selectively enabling just a few of them. In this case you can use a configuration file SmokeAPI.config.json that you can find here in this repository or in the release zip. To use it, simply place it next to the SmokeAPI DLL. It will be read upon each launch of a game.

The config file is expected to conform to the JSON standard. It is recommended to use a text editor with JSON schema supports. This greatly assists with editing since it warns not just about syntax errors, but also about invalid values. One such editor is Visual Studio Code.

VS Code demo

This example showcases how VS code highlights an invalid value and displays a list of valid values that are accepted. VS Code demo

Below you can find the detailed description of each available config option. In the absence of the config file, default values specified below will be used.

Option Description Type Default Valid values
logging Enables logging to SmokeAPI.log.log file. Boolean false true or false.
log_steam_http Toggles logging of SteamHTTP traffic Boolean false true or false.
default_app_status Specifies default DLC status. String "unlocked" "unlocked" or "locked" or "original".
override_app_status Overrides the status of all DLCs that belong to a specified app ID. Object {} An object with "key": "value" pairs, where key is App ID and value is App status.
override_dlc_status Overrides the status of individual DLCs, regardless of the corresponding app status. Object {} An object with "key": "value" pairs, where key is DLC ID and value is DLC status.
auto_inject_inventory Specifies whether SmokeAPI should automatically inject a list of all registered inventory items, when a game queries user inventory Boolean true true or false.
extra_inventory_items A list of inventory item IDs that will be added in addition to the automatically injected items. Array [] An array of integer App IDs.
extra_dlcs See Extra info to understand the use case for this option. Object {} An object with "key": "value", where the key is App ID and value is an object with "dlcs" property. See the complete example for more.
Advanced options

NOTE: These options do not affect the unlocker, and should be left unmodified. They serve as utilities for text or GUI editors.

Option Description Type Default Valid values
$schema URL of a JSON Schema that corresponds to this config. String SmokeAPI.schema.json URL to a valid SmokeAPI config JSON schema.
$version Reserved for use by tools like GUI config editors. Integer 4 Integer numbers from 1 and beyond.

Below you can find an example config where nearly every option has been customized.

Complete example
{
  "$schema": "https://raw.githubusercontent.com/acidicoala/SmokeAPI/refs/tags/v3.1.6/res/SmokeAPI.schema.json",
  "$version": 4,
  "logging": true,
  "log_steam_http": true,
  "default_app_status": "unlocked",
  "override_app_status": {
    "1234": "original",
    "4321": "unlocked"
  },
  "override_dlc_status": {
    "1234": "original",
    "4321": "unlocked",
    "5678": "locked"
  },
  "auto_inject_inventory": true,
  "extra_inventory_items": [
    9876,
    8765,
    7654
  ],
  "extra_dlcs": {
    "1234": {
      "dlcs": {
        "56789": "Example DLC 1"
      }
    },
    "4321": {
      "dlcs": {
        "98765": "Example DLC 2",
        "98766": "Example DLC 3"
      }
    }
  }
}

πŸŽ“ Extra info

πŸ”‘ How SmokeAPI works in games with large number of DLCs

Some the games that have a large number of DLCs begin ownership verification by querying the Steamworks API for a list of all available DLCs. Once the game receives the list, it will go over each item and check the ownership. The issue arises from the fact that response from Steamworks SDK may max out at 64, depending on how much unowned DLCs the user has. To alleviate this issue, SmokeAPI will make a web request to Steam API for a full list of DLCs, which works well most of the time. Unfortunately, even the web API does not solve all of our problems, because it will return only DLCs that are available in Steam store. This means that DLCs without a dedicated store offer, such as pre-order DLCs will be left out. That's where the extra_dlcs config option comes into play. You can specify those missing DLC IDs there, and SmokeAPI will make them available to the game. However, this introduces the need for manual configuration, which goes against the ideals of this project. To remedy this issue SmokeAPI will also fetch a manually maintained list of extra DLCs stored in a GitHub repository. The purpose of that JSON file is to contain all the DLC IDs that are lacking a Steam store page. This enables SmokeAPI to unlock all DLCs without any config file at all. Feel free to report in the {forum-topic} games that have more than 64 DLCs, and have DLCs without a dedicated store page. They will be added to the list of missing DLC IDs to facilitate config-less operation.

πŸ”§ Troubleshooting

πŸ” DLCs are not unlocked

There are many reasons why the DLCs remain locked. In some games DLC unlocking is inherently impossible because of online-only state, profile, etc. In other cases it may be possible, but only after dealing with custom game checks. To learn about the specifics, consult the corresponding game topic in the forum.

If you are sure that DLC unlocking in a targeted game is inherently possible, then you have to verify that installation was successful. To do that, add the unlocker's config file next to the unlocker DLL and enable logging in it. You should see a *.log file being generated upon the game launch, which could provide insight into what went wrong. Use this log file when requesting support in the forum. If after launching the game no *.log file was generated, then it means that installation was not performed correctly.

If you installed the unlocker via proxy mode, then make sure that you have renamed the unlocker DLL exactly like the original DLL and placed it exactly in its place. Also verify that the original DLL was renamed by adding _o at the end of the filename. Notice that the second symbol is a literal o (short for original), not a numeral zero 0.

If you installed the unlocker via hook mode, then make sure that you have picked a compatible Koaloader DLL. Not all games will try to load version.dll, hence you need will need to try another. You can use Process Monitor to find out which Koaloader DLL is supported by a game, and where to place it. Click on the cyan funnel icon on the top to open filter editor, and add 3 filters (Process name, Result, and Path), as shown in the screenshot below. Launch the game with the Process Monitor active, and you should see DLLs that a game was trying to load from its directory.

Process Monitor screenshot

Process Monitor

If you have made sure that you picked the right DLL for Koaloader, then try adding Koaloader's config file and enable logging in it. The log file from Koaloader can show if it was able to successfully load the unlocker DLL.

πŸ’₯ The game is crashing

If the game is crashing or not opening as expected after installing an unlocker, then try to download and install the Latest supported Visual C++ Redistributable version

Download page screenshot

Download page

πŸ—οΈ Building from source

βœ”οΈ Requirements

  • CMake v3.24 or newer (Make sure that cmake is available from powershell)
  • Visual Studio Build Tools 2022 with Desktop Development for C++ workload installed
    • Tested on Windows 11 SDK (10.0.26100.4188)

πŸ‘¨β€πŸ’» Commands

Build the project

.\build.ps1 $arch $config

where

Variable Valid values
$arch 32 or 64
$config Debug or Release

For example:

.\build.ps1 64 Release

πŸ“š Acknowledgments

This project makes use of the following open source projects:

πŸ“„ License

This software is licensed under the Unlicense, terms of which are available in UNLICENSE.txt.