Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

Commit c036265

Browse files
committed
update README.md
1 parent a225e75 commit c036265

1 file changed

Lines changed: 111 additions & 72 deletions

File tree

README.md

Lines changed: 111 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,78 +2,101 @@
22

33
# steamlayer
44

5-
Patches Steam games to run through the [Goldberg emulator](https://github.com/Detanup01/gbe_fork).
6-
Finds the AppID, grabs DLC info, swaps the DLLs, backs up the originals. One command.
7-
8-
[![PyPI version](https://img.shields.io/pypi/v/steamlayer.svg?style=flat-square)](https://pypi.org/project/steamlayer/)
9-
![Python 3.13+](https://img.shields.io/badge/python-3.13%2B-blue?style=flat-square)
10-
![Windows Only](https://img.shields.io/badge/platform-Windows-lightgrey?style=flat-square)
11-
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT)
12-
13-
<a href="https://raw.githubusercontent.com/layeredtools/steamlayer/main/Animation.gif">
14-
<img src="https://raw.githubusercontent.com/layeredtools/steamlayer/main/Animation.gif" width="800" alt="steamlayer demo">
15-
</a>
5+
Patches Steam games to run through the [Goldberg emulator](https://github.com/Detanup01/gbe_fork).
6+
Finds the AppID, grabs DLC info, swaps the DLLs, backs up the originals. One command.
7+
8+
<p>
9+
<a href="https://pypi.org/project/steamlayer/"><img src="https://img.shields.io/pypi/v/steamlayer?style=for-the-badge&color=blue" alt="PyPI version"></a>
10+
<a href="https://github.com/layeredtools/steamlayer/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/layeredtools/steamlayer/ci.yml?branch=main&style=for-the-badge" alt="Build Status"></a>
11+
<a href="https://pypi.org/project/steamlayer/"><img src="https://img.shields.io/pypi/pyversions/steamlayer?style=for-the-badge" alt="Python Versions"></a>
12+
<a href="https://github.com/layeredtools/steamlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/layeredtools/steamlayer?style=for-the-badge" alt="License"></a>
13+
</p>
14+
15+
<br>
16+
17+
<a href="https://raw.githubusercontent.com/layeredtools/steamlayer/main/Animation.gif">
18+
<img src="https://raw.githubusercontent.com/layeredtools/steamlayer/main/Animation.gif" width="750" alt="steamlayer demo">
19+
</a>
1620
</div>
1721

18-
---
19-
20-
## What it does
21-
22+
<br>
23+
24+
> [!TIP]
25+
> Point it at a game folder. It figures out the AppID, pulls DLC metadata, backs up the original `steam_api.dll` files, drops in Goldberg's replacements, and strips SteamStub DRM automatically.
26+
27+
## 📋 Table of Contents
28+
- [🚀 What it does](#-what-it-does)
29+
- [📦 Installation](#-installation)
30+
- [🛠️ Usage](#️-usage)
31+
- [⚙️ How it works](#️-how-it-works)
32+
- [🔍 AppID detection](#-appid-detection)
33+
- [📦 DLC metadata](#-dlc-metadata)
34+
- [🛡️ SteamStub detection](#️-steamstub-detection)
35+
- [🛠️ Patching](#️-patching)
36+
- [🩹 Restore](#-restore)
37+
- [📂 Storage & Caching](#-storage--caching)
38+
- [🛠️ Troubleshooting](#️-troubleshooting)
39+
- [💻 Development](#-development)
40+
- [⚖️ Disclaimer](#️-disclaimer)
41+
42+
## 🚀 What it does
2243
`steamlayer` automates the tedious manual work of setting up game environments. It handles AppID discovery, DLC metadata fetching, DLL swapping, and SteamStub stripping in a single pass—all while keeping your original files safe in a managed vault.
2344

45+
* 🔍 **Smart Discovery:** Automatically filters out release tags (FitGirl, RUNE, etc.) and version numbers to find the correct AppID.
46+
* 📦 **DLC Support:** Automatically generates DLC lists for the emulator.
47+
* 🛡️ **SteamStub Stripping:** Detects and unwraps DRM using Steamless.
48+
* 🔒 **Safe-by-Design:** Atomic restores ensure your game files can always be returned to their original state.
49+
2450
> [!WARNING]
2551
> steamlayer is under active development and not yet production-ready. Expect rough edges, and always keep `--restore` in mind.
2652
2753

28-
## Installation
29-
30-
```bash
31-
pip install steamlayer
32-
```
33-
34-
Or with pipx if you want it isolated:
35-
36-
```bash
37-
pipx install steamlayer
38-
```
39-
54+
## 📦 Installation
4055
**Requirements:**
4156
* Python 3.13+
4257
* Windows
4358
* 7-Zip somewhere on your system for the very first run (after that steamlayer manages its own copy).
4459

45-
## Usage
46-
4760
```bash
48-
steamlayer "C:\Games\Portal 2"
61+
pip install steamlayer
4962
```
5063

51-
That's the common case. It'll do everything automatically. If AppID detection gets it wrong, pass it explicitly:
64+
## 🛠️ Usage
5265

53-
```bash
54-
steamlayer "C:\Games\Portal 2" --appid 620
55-
```
66+
<details>
67+
<summary><b>📋 View All CLI Options</b></summary>
5668

57-
Not sure what it's going to do? Run with `--dry-run` first:
69+
| Flag | Description |
70+
|---|---|
71+
| `-a`, `--appid <id>` | Skip auto-detection and use this AppID |
72+
| `-d`, `--dry-run` | Show what would happen, don't touch anything |
73+
| `-n`, `--no-network` | Use cached data only, no requests |
74+
| `-r`, `--restore` | Put the original DLLs back and clean up |
75+
| `-u`, `--unpack` | Auto-strip SteamStub DRM via Steamless before patching |
76+
| `-y`, `--yolo` | Accept lower-confidence AppID matches |
77+
| `-v` / `-vv` | More output (`-v` = info, `-vv` = debug) |
78+
| `--cache-dir <path>` | Override the cache location (default: `~/.steamlayer/.cache`) |
79+
| `--no-defender-check` | Skip the Defender warning |
80+
| `--version` | Print the version and exit |
81+
</details>
82+
<br>
5883

5984
```bash
60-
steamlayer "C:\Games\Portal 2" --dry-run
61-
```
85+
# Standard automatic patch
86+
steamlayer "C:\Games\Portal 2"
6287

63-
Game uses SteamStub DRM? Let steamlayer strip it automatically:
88+
# Explicit AppID if auto-detection fails
89+
steamlayer "C:\Games\Portal 2" --appid 620
6490

65-
```bash
91+
# Strip SteamStub DRM automatically
6692
steamlayer "C:\Games\Portal 2" --unpack
67-
```
6893

69-
Something broke, want your files back:
70-
71-
```bash
94+
# Undo everything cleanly
7295
steamlayer "C:\Games\Portal 2" --restore
7396
```
7497

98+
## 🛡️ Windows Defender
7599
> [!IMPORTANT]
76-
> ## Windows Defender
77100
> If real-time protection is on, add a folder exclusion before running:
78101
>
79102
> **Windows Security → Virus & threat protection → Manage settings → Exclusions → Add an exclusion → Folder**
@@ -83,53 +106,69 @@ steamlayer "C:\Games\Portal 2" --restore
83106
> ```
84107
> Swapping Steam DLLs looks suspicious enough that Defender will sometimes quarantine Goldberg's or Steamless's files mid-download. The exclusion keeps that from happening. It only covers this one folder, nothing else on your system.
85108
109+
## ⚙️ How it works
110+
### 🔍 AppID detection
111+
checks for `steam_appid.txt` or `.acf` manifest files in the game folder first. If nothing's there, it searches a locally-cached community index, then falls back to the Steam store API. If two results look equally likely, it asks you to pick. Pass `--yolo` to lower the confidence threshold (useful for sequels or non-standard folder names).
112+
86113
---
87114
88-
### All options
115+
### 📦 DLC metadata
116+
fetches the DLC list from the Steam API and resolves names using the same community index. Anything missing from the index gets looked up individually. Results are cached for a week so repeat runs are fast. ⚡
89117
90-
| Flag | Description |
91-
|---|---|
92-
| `-a`, `--appid <id>` | Skip auto-detection and use this AppID |
93-
| `-d`, `--dry-run` | Show what would happen, don't touch anything |
94-
| `-n`, `--no-network` | Use cached data only, no requests |
95-
| `-r`, `--restore` | Put the original DLLs back and clean up |
96-
| `-u`, `--unpack` | Auto-strip SteamStub DRM via Steamless before patching |
97-
| `-y`, `--yolo` | Accept lower-confidence AppID matches |
98-
| `-v` / `-vv` | More output (`-v` = info, `-vv` = debug) |
99-
| `--cache-dir <path>` | Override the cache location (default: `~/.steamlayer/.cache`) |
100-
| `--no-defender-check` | Skip the Defender warning |
101-
| `--version` | Print the version and exit |
118+
---
119+
120+
### 🛡️ SteamStub detection
121+
before patching, steamlayer scans every `.exe` in each DLL's directory for SteamStub DRM. It recognises v1.x (via `SteamDRMP.dll` import) and v3.x (via the `0xCAFEDEAD` header magic in the `.bind` section). If wrapped executables are found and `--unpack` wasn't passed, it warns you. With `--unpack`, Steamless strips the DRM automatically and the original executable is vaulted alongside the DLLs.
122+
123+
---
124+
125+
### 🛠️ Patching
126+
finds every `steam_api.dll` and `steam_api64.dll` in the game tree, vaults the originals to `<game>/__original_files__/`, and copies in the right Goldberg DLL (x32 or x64). Config files go in a `steam_settings/` folder next to each DLL, plus a `steam_appid.txt` at the game root. 🏗️
102127
103128
---
104129
105-
## How it works
130+
### 🩹 Restore
131+
moves the vaulted DLLs (and any vaulted executables) back, deletes the `steam_settings/` directories, cleans up loose config files, and removes the vault once it's empty. Safe to re-run if it fails partway through. 🔄
106132
107-
**AppID detection** — checks for `steam_appid.txt` or `.acf` manifest files in the game folder first. If nothing's there, it searches a locally-cached community index, then falls back to the Steam store API. If two results look equally likely, it asks you to pick. Pass `--yolo` to lower the confidence threshold (useful for sequels or non-standard folder names).
133+
---
108134
109-
**DLC metadata** — fetches the DLC list from the Steam API and resolves names using the same community index. Anything missing from the index gets looked up individually. Results are cached for a week so repeat runs are fast.
135+
### 📂 Storage & Caching
136+
Confines all downloaded tools and caches to `~/.steamlayer/`.
110137
111-
**SteamStub detection** — before patching, steamlayer scans every `.exe` in each DLL's directory for SteamStub DRM. It recognises v1.x (via `SteamDRMP.dll` import) and v3.x (via the `0xCAFEDEAD` header magic in the `.bind` section). If wrapped executables are found and `--unpack` wasn't passed, it warns you. With `--unpack`, Steamless strips the DRM automatically and the original executable is vaulted alongside the DLLs.
138+
`vendors/`: Managed portable installations of 7-Zip, Goldberg, and Steamless. 📥
112139
113-
**Patching** — finds every `steam_api.dll` and `steam_api64.dll` in the game tree, vaults the originals to `<game>/__original_files__/`, and copies in the right Goldberg DLL (x32 or x64). Config files go in a `steam_settings/` folder next to each DLL, plus a `steam_appid.txt` at the game root.
140+
`.cache/`: Stores Steam DLC metadata (7-day TTL) for instantaneous repeat runs. 🏎️
114141
115-
**Restore** — moves the vaulted DLLs (and any vaulted executables) back, deletes the `steam_settings/` directories, cleans up loose config files, and removes the vault once it's empty. Safe to re-run if it fails partway through.
116142
117-
---
143+
## 💻 Development
144+
This project uses `uv` for dependency management.
145+
```bash
146+
# 📂 Clone the repository
147+
git clone https://github.com/layeredtools/steamlayer.git
148+
cd steamlayer
149+
150+
# 🛠️ Install dependencies and setup environment
151+
uv sync --all-groups
118152
119-
## Troubleshooting
153+
# 🧪 Run the test suite
154+
uv run pytest
120155
121-
**7-Zip bootstrap fails** — steamlayer needs an existing `7z.exe` to pull in its own copy. Make sure it's in `PATH` or installed at the default location (`C:\Program Files\7-Zip\`).
156+
# 🧹 Lint and format code
157+
uv run ruff check .
158+
uv run ruff format .
159+
```
122160
123-
**Wrong game detected** — use `--appid`. You can find the right ID on [SteamDB](https://www.steamdb.info) or in the store URL.
161+
## 🛠️ Troubleshooting
124162

125-
**Defender quarantined something mid-install** — add the exclusion above and re-run. steamlayer will re-download and retry cleanly.
163+
📦 **7-Zip bootstrap fails**steamlayer needs an existing `7z.exe` to pull in its own copy. Make sure it's in `PATH` or installed at the default location (`C:\Program Files\7-Zip\`).
126164

127-
**SteamStub warning at runtime** — the game executable is wrapped with SteamDRM. Re-run with `--unpack` to strip it automatically, or unpack manually with [Steamless](https://github.com/atom0s/Steamless) first.
165+
🔍 **Wrong game detected**use `--appid`. You can find the right ID on [SteamDB](https://www.steamdb.info) or in the store URL.
128166

129-
**Game broken after patching** — run `--restore`. If that also fails partway through, run it again — it picks up where it left off.
167+
🛡️ **Defender quarantined something mid-install**add the exclusion above and re-run. steamlayer will re-download and retry cleanly.
130168

131-
---
169+
🔐 **SteamStub warning at runtime** — the game executable is wrapped with SteamDRM. Re-run with `--unpack` to strip it automatically, or unpack manually with [Steamless](https://github.com/atom0s/Steamless) first.
132170

133-
## Disclaimer
171+
🩹 **Game broken after patching** — run `--restore`. If that also fails partway through, run it again — it picks up where it left off.
134172

173+
## ⚖️ Disclaimer
135174
This tool is intended for use with software you legitimately own. Use responsibly.

0 commit comments

Comments
 (0)