From 9e64d298fc7993348e2ad9d3397a19efa27b0bdd Mon Sep 17 00:00:00 2001 From: Zhengchen Tao Date: Wed, 20 May 2026 10:33:28 +0800 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=E5=8A=A0=20i18n=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=20+=20=E6=96=B0=E5=A2=9E=E8=8B=B1=E6=96=87=E7=89=88?= =?UTF-8?q?=20+=20Releases=20=E7=BB=9F=E4=B8=80=E6=8C=87=E5=90=91=20Gitea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 顶部加'简体中文 | English'切换 header - 下载链路统一指 Gitea Releases:Gitea 是 source of truth(推 GitHub 靠 push mirror 兜底),不再列 GitHub Releases 让外部读者多一跳 - 自行构建段如实写'GitHub Actions 构建 → Gitea API 同步发布':build 在 windows-latest 跑 PyInstaller,然后由 sync step 把 artifact 推到 Gitea Releases(.github/workflows/release.yml + .gitea /workflows/release.yml noop 占位) - 新增 README.en.md --- README.en.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 9 +++--- 2 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..57cac31 --- /dev/null +++ b/README.en.md @@ -0,0 +1,78 @@ +# df-scope-hold + +[简体中文](README.md) | English + +Auto-hold-breath helper for Delta Force — while you hold the right mouse +button, the tool presses a configurable key (default `F12`) and releases it +when you let go. Aim with right-click only; no extra key press needed. + +## How it works + +Pure local mouse→keyboard mapping. The script listens for right-mouse-button +events and presses/releases your configured "hold breath" key in sync. It +activates only while the game process is running. **No game memory is read, +no game files are modified, no game-server traffic is involved** — the +behavior is equivalent to a hardware mouse macro. + +The in-game "hold breath" binding must be set to **hold mode**, not toggle +mode, or the simulated key release on right-mouse-up will get out of sync +with the game's scope state. + +## Usage + +1. **Bind "hold breath" in-game** to a key that does not conflict with other + actions (e.g. `F12`). +2. **Download** the latest `df-scope-hold-vX.X.X.zip` from [Gitea Releases](https://git.zhengchentao.win/zhengchen.tao/df-scope-hold/releases) and unzip anywhere. +3. **Edit `config.ini`** so `key` matches the in-game binding. +4. **Run `df-scope-hold.exe`**. UAC will prompt for admin privileges — accept, + as the anti-cheat-protected game process is otherwise undetectable. + +```ini +[config] +key = f12 ; must match in-game binding +delay_press = 5 ; ms between RMB-down and simulated key-down +program_running = DeltaForceClient-Win64-Shipping.exe ; game process name (case-sensitive) +``` + +Press `Ctrl+C` in the console to exit. + +## Runtime + +Single Windows `.exe` (~10 MB), built with PyInstaller — bundles the Python +runtime and dependencies (`pynput`, `psutil`). No Python install required. + +Verified on Windows only (the Delta Force client is Windows-exclusive). + +## From source + +```bash +pip install -r requirements.txt +python script.py +``` + +Requires Python 3.10+. For day-to-day use, just download a release. + +## Build + +```bash +pip install -r requirements.txt +pyinstaller --onefile --uac-admin --console --name df-scope-hold script.py +``` + +Output at `dist/df-scope-hold.exe`. GitHub Actions builds on `windows-latest` +(see `.github/workflows/release.yml`) when you push a `v*` tag, then syncs +the artifact to [Gitea Releases](https://git.zhengchentao.win/zhengchen.tao/df-scope-hold/releases) +via the Gitea API — no local build needed. + +## Disclaimer + +- This is a purely local mouse→keyboard mapping tool, functionally identical + to the macro feature of any gaming mouse. +- That said, the game publisher's policy on third-party input tools may + change. **Any consequences from using this tool (including but not limited + to account bans) are at the user's own risk.** +- For personal use and learning only. Do not use in ranked / competitive play. + +## License + +MIT diff --git a/README.md b/README.md index f73ddb4..f896ce8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # df-scope-hold +简体中文 | [English](README.en.md) + 三角洲行动(Delta Force)开镜自动屏息小工具——按住鼠标右键时自动按下指定按键(默认 `F12`),松开时释放。让你只用右键瞄准就能稳枪,不必再额外按一个键。 ## 工作原理 @@ -18,10 +20,7 @@ ### 2. 下载并解压 -下载最新的 `df-scope-hold-vX.X.X.zip`,解压到任意目录。两个下载渠道任选其一: - -- **Gitea**(国内推荐): -- **GitHub**: +到 [Gitea Releases](https://git.zhengchentao.win/zhengchen.tao/df-scope-hold/releases) 下载最新的 `df-scope-hold-vX.X.X.zip`,解压到任意目录。 zip 内含: @@ -76,7 +75,7 @@ pip install -r requirements.txt pyinstaller --onefile --uac-admin --console --name df-scope-hold script.py ``` -产物在 `dist/df-scope-hold.exe`。仓库已配置 GitHub / Gitea Actions,推 `v*` tag 后自动构建并发布到 Releases,无需本地操作。 +产物在 `dist/df-scope-hold.exe`。仓库已配置 GitHub Actions(windows-latest 跑 PyInstaller,详见 `.github/workflows/release.yml`),推 `v*` tag 后自动构建,再通过 Gitea API 同步发布到 [Gitea Releases](https://git.zhengchentao.win/zhengchen.tao/df-scope-hold/releases),无需本地操作。 ## 免责声明