# HD2 Scanner(HD2 扫描器)
**项目地址 / 下载:** https://github.com/junze0910/junze-hd2-lua-mod/releases/latest
## Description · 简介
HD2 Scanner 是一个**前置 / 核心服务 mod**,本身不添加武器、皮肤或游戏内容。
它负责:
1. 在后台按 `LDLD + 版本 + 类型哈希` 定位游戏内存里的数据表;
2. 把表基址通过 `_G.HD2Scanner` 广播给其他 mod;
3. 提供通用全量内存扫描服务 `memscan`,让其他 mod 不必各自重复扫描数 GB 内存;
4. 提供 **AOB 战备表定位**:在 `game.dll` 代码段里解出 `StratagemSettings` 的记录指针数组,
让消费者按 ID 直接取记录(ExoLoadout 的附加战备就是靠它,毫秒级、不用全内存扫)。
## Main features · 主要特性
* **数据表广播**:
* `MountComponentData`
* `HellpodRackComponentData`
* `HellpodPayloadComponentData`
* `WeaponMagazineComponentData`
* `TurretComponentData`
* `ProjectileSettings`
* `ExplosionSettings`
* **通用全量扫描 `memscan`**:
* 对外 API:`scan_request` / `scan_cancel` / `scan_status`
* 256 KB 分块,块间重叠,防止 pattern 跨块漏检
* 默认 8 MB/帧预算,不卡游戏
* 自身 pattern 自动跳过,避免扫到扫描器自己
* 多请求排队,一次只跑一个全量扫描
* 命中只回传地址,由消费者自己做校验和写入
* **AOB 战备表定位**(v0.8.0+):
* 对外 API:`strat_table_request` / `strat_table_status` / `strat_table_base` / `strat_slot` / `strat_rec`
* 在 `game.dll` 代码段里匹配一对固定指令,**要求唯一命中**(多命中直接放弃,不猜)
* 分帧推进(2 MB/帧),解析过程不卡游戏
* 任何一步不成立都返回明确失败原因,由消费者决定回退
* 详见 `Scanner-API.md` §4
* **只读**:Scanner 不写任何游戏数据表;只扫描、只广播
* **自检 11/11**:签名解码器与内存里的 MDL 基准逐位一致
* **稳定扫描**:实机连续多轮 `命中 7`,每轮区段数/表数稳定
* **日志**:`%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`
## How to use · 使用方法
1. 安装 **Bingus Shared Loader v15+(API 1)**,或兼容的 MDL;
2. 用 HD2 mod 管理器导入 `HD2-Scanner-v0.8.0.zip`;
3. 启用并部署;
4. 启动游戏。Scanner 会自己在后台扫描,无需任何操作(界面上那 3 行只在需要排查时才点);
5. 如需检查状态,查看 `HD2Scanner.log`。
> 作为前置 mod,它没有单独的设置页,但在**原生 MODS 页**(需要 `Mod Options Menu`)里注册了 3 行:
> **扫描状态**(点一下 = 立刻扫一轮,右边描述框里是实时状态)· **解析战备表(AOB)** · **写诊断到日志**。
> 请把它和依赖它的 mod 一起启用。
## Requirements · 依赖
* **Helldivers 2**
* **Bingus Shared Loader v15+(API 1)**,或兼容的 MDL
* 一个能导入 zip 的 HD2 mod 管理器(HD2MM / Arsenal 等)
* Windows x64
## Compatibility · 兼容性
* 被其他 mod 作为前置使用;单独启用不会改变游戏内容。
* 只读扫描本机内存;不修改任何游戏文件。
* 游戏启用 nProtect GameGuard,使用第三方工具的风险由使用者自行承担。
## Logs · 日志
```text
%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log
```
# HD2 Scanner
**Download:** https://github.com/junze0910/junze-hd2-lua-mod/releases/latest
## Description
HD2 Scanner is a core / prerequisite service mod. It does not add weapons, skins or gameplay content.
It provides:
1. Background discovery of LDLD data tables in game memory.
2. Table address broadcast to other mods through `_G.HD2Scanner`.
3. A generic full-memory scan service, `memscan`, so other mods do not each rescan several GB of memory.
4. **AOB stratagem-table lookup**: resolves the `StratagemSettings` record pointer array from `game.dll`,
so consumers can read records by id directly (this is how ExoLoadout attaches stratagems - no full scan).
Current consumers:
- AC-8 Rack Backpack
- Guard Dog MG-43 / GuardDogLoadout
- EXO Loadout
## Features
* Data table broadcast:
* MountComponentData
* HellpodRackComponentData
* HellpodPayloadComponentData
* WeaponMagazineComponentData
* TurretComponentData
* ProjectileSettings
* ExplosionSettings
* Generic full-memory scanning via `scan_request` / `scan_cancel` / `scan_status`:
* 256 KB chunks with overlap
* 8 MB per frame budget
* self-pattern skip
* request queue, one scan at a time
* returns only addresses; consumers validate and write
* AOB stratagem-table lookup (v0.8.0+):
* API: `strat_table_request` / `strat_table_status` / `strat_table_base` / `strat_slot` / `strat_rec`
* matches a fixed instruction pair in `game.dll` code, **unique match required** (ambiguous = give up)
* stepped across frames (2 MB/frame), never blocks the game
* every failure returns a reason, so consumers can fall back
* see `Scanner-API.md` section 4
* Read-only: Scanner never writes game data tables
* Registers **3 rows in the native MODS tab** (needs Mod Options Menu):
**scan status** (click = run one round now; the description box shows live state),
**resolve stratagem table (AOB)**, and **write diagnostics to log**
* Self-check 11/11: decoders match the MDL reference bit-for-bit
* Stable scanning: 7 table hits per round in live play
* Log: `%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`
## Usage
1. Install Bingus Shared Loader v15+ (API 1) or compatible MDL.
2. Import `HD2-Scanner-v0.8.0.zip` with your HD2 mod manager.
3. Enable and deploy.
4. Launch the game. Scanner runs in the background; no user action is required.
5. Check `HD2Scanner.log` if needed.
## Requirements
* Helldivers 2
* Bingus Shared Loader v15+ (API 1) or compatible MDL
* HD2 mod manager able to import zip packages (HD2MM / Arsenal)
* Windows x64
## Compatibility
* Used as a prerequisite by other mods; enabling it alone does not change gameplay.
* Read-only memory scanning; no game files are modified.
* Helldivers 2 uses nProtect GameGuard; use third-party tools at your own risk.
## Logs
`%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`
**项目地址 / 下载:** https://github.com/junze0910/junze-hd2-lua-mod/releases/latest
## Description · 简介
HD2 Scanner 是一个**前置 / 核心服务 mod**,本身不添加武器、皮肤或游戏内容。
它负责:
1. 在后台按 `LDLD + 版本 + 类型哈希` 定位游戏内存里的数据表;
2. 把表基址通过 `_G.HD2Scanner` 广播给其他 mod;
3. 提供通用全量内存扫描服务 `memscan`,让其他 mod 不必各自重复扫描数 GB 内存;
4. 提供 **AOB 战备表定位**:在 `game.dll` 代码段里解出 `StratagemSettings` 的记录指针数组,
让消费者按 ID 直接取记录(ExoLoadout 的附加战备就是靠它,毫秒级、不用全内存扫)。
## Main features · 主要特性
* **数据表广播**:
* `MountComponentData`
* `HellpodRackComponentData`
* `HellpodPayloadComponentData`
* `WeaponMagazineComponentData`
* `TurretComponentData`
* `ProjectileSettings`
* `ExplosionSettings`
* **通用全量扫描 `memscan`**:
* 对外 API:`scan_request` / `scan_cancel` / `scan_status`
* 256 KB 分块,块间重叠,防止 pattern 跨块漏检
* 默认 8 MB/帧预算,不卡游戏
* 自身 pattern 自动跳过,避免扫到扫描器自己
* 多请求排队,一次只跑一个全量扫描
* 命中只回传地址,由消费者自己做校验和写入
* **AOB 战备表定位**(v0.8.0+):
* 对外 API:`strat_table_request` / `strat_table_status` / `strat_table_base` / `strat_slot` / `strat_rec`
* 在 `game.dll` 代码段里匹配一对固定指令,**要求唯一命中**(多命中直接放弃,不猜)
* 分帧推进(2 MB/帧),解析过程不卡游戏
* 任何一步不成立都返回明确失败原因,由消费者决定回退
* 详见 `Scanner-API.md` §4
* **只读**:Scanner 不写任何游戏数据表;只扫描、只广播
* **自检 11/11**:签名解码器与内存里的 MDL 基准逐位一致
* **稳定扫描**:实机连续多轮 `命中 7`,每轮区段数/表数稳定
* **日志**:`%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`
## How to use · 使用方法
1. 安装 **Bingus Shared Loader v15+(API 1)**,或兼容的 MDL;
2. 用 HD2 mod 管理器导入 `HD2-Scanner-v0.8.0.zip`;
3. 启用并部署;
4. 启动游戏。Scanner 会自己在后台扫描,无需任何操作(界面上那 3 行只在需要排查时才点);
5. 如需检查状态,查看 `HD2Scanner.log`。
> 作为前置 mod,它没有单独的设置页,但在**原生 MODS 页**(需要 `Mod Options Menu`)里注册了 3 行:
> **扫描状态**(点一下 = 立刻扫一轮,右边描述框里是实时状态)· **解析战备表(AOB)** · **写诊断到日志**。
> 请把它和依赖它的 mod 一起启用。
## Requirements · 依赖
* **Helldivers 2**
* **Bingus Shared Loader v15+(API 1)**,或兼容的 MDL
* 一个能导入 zip 的 HD2 mod 管理器(HD2MM / Arsenal 等)
* Windows x64
## Compatibility · 兼容性
* 被其他 mod 作为前置使用;单独启用不会改变游戏内容。
* 只读扫描本机内存;不修改任何游戏文件。
* 游戏启用 nProtect GameGuard,使用第三方工具的风险由使用者自行承担。
## Logs · 日志
```text
%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log
```
# HD2 Scanner
**Download:** https://github.com/junze0910/junze-hd2-lua-mod/releases/latest
## Description
HD2 Scanner is a core / prerequisite service mod. It does not add weapons, skins or gameplay content.
It provides:
1. Background discovery of LDLD data tables in game memory.
2. Table address broadcast to other mods through `_G.HD2Scanner`.
3. A generic full-memory scan service, `memscan`, so other mods do not each rescan several GB of memory.
4. **AOB stratagem-table lookup**: resolves the `StratagemSettings` record pointer array from `game.dll`,
so consumers can read records by id directly (this is how ExoLoadout attaches stratagems - no full scan).
Current consumers:
- AC-8 Rack Backpack
- Guard Dog MG-43 / GuardDogLoadout
- EXO Loadout
## Features
* Data table broadcast:
* MountComponentData
* HellpodRackComponentData
* HellpodPayloadComponentData
* WeaponMagazineComponentData
* TurretComponentData
* ProjectileSettings
* ExplosionSettings
* Generic full-memory scanning via `scan_request` / `scan_cancel` / `scan_status`:
* 256 KB chunks with overlap
* 8 MB per frame budget
* self-pattern skip
* request queue, one scan at a time
* returns only addresses; consumers validate and write
* AOB stratagem-table lookup (v0.8.0+):
* API: `strat_table_request` / `strat_table_status` / `strat_table_base` / `strat_slot` / `strat_rec`
* matches a fixed instruction pair in `game.dll` code, **unique match required** (ambiguous = give up)
* stepped across frames (2 MB/frame), never blocks the game
* every failure returns a reason, so consumers can fall back
* see `Scanner-API.md` section 4
* Read-only: Scanner never writes game data tables
* Registers **3 rows in the native MODS tab** (needs Mod Options Menu):
**scan status** (click = run one round now; the description box shows live state),
**resolve stratagem table (AOB)**, and **write diagnostics to log**
* Self-check 11/11: decoders match the MDL reference bit-for-bit
* Stable scanning: 7 table hits per round in live play
* Log: `%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`
## Usage
1. Install Bingus Shared Loader v15+ (API 1) or compatible MDL.
2. Import `HD2-Scanner-v0.8.0.zip` with your HD2 mod manager.
3. Enable and deploy.
4. Launch the game. Scanner runs in the background; no user action is required.
5. Check `HD2Scanner.log` if needed.
## Requirements
* Helldivers 2
* Bingus Shared Loader v15+ (API 1) or compatible MDL
* HD2 mod manager able to import zip packages (HD2MM / Arsenal)
* Windows x64
## Compatibility
* Used as a prerequisite by other mods; enabling it alone does not change gameplay.
* Read-only memory scanning; no game files are modified.
* Helldivers 2 uses nProtect GameGuard; use third-party tools at your own risk.
## Logs
`%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\HD2Scanner.log`