# h4r：重建 Heroes of Might and Magic IV 引擎

> h4r 使用玩家本地安装的数据，以 Rust 重建 Heroes of Might and Magic IV 引擎。它解析 .h4r 归档和 .h4c 地图，呈现冒险地图原型并重建部分移动与战斗规则；另有工具将若干规则结果与原始可执行程序对照。

- 类型：案例
- 目标：游戏
- 类别：独立重建案例
- 关联：独立重建项目
- 来源复核于：2026-11-06
- 收录于：2026-11-08
- 原始资源：<https://github.com/demen1n/h4r>
- 一手来源：<https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/h4r-case/>
- 记录 JSON：<https://awesomerea.org/resources/h4r-case/record.json>
- 英文版：[English](https://awesomerea.org/resources/h4r-case/index.md)

## 使用条件与局限

- **前提条件：**需要用户自己的 Heroes of Might and Magic IV 安装文件；仓库不包含游戏资源。
- **前提条件：**需要 Rust 和 Cargo；当前开发使用 Rust 1.99.1。
- **局限：**原型尚不能完成一局游戏；战斗没有可操作战场，也没有 AI、存档和声音。
- **许可：**GPL-3.0-or-later 许可证。

## 一手来源

1. <https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/README.md>
2. <https://github.com/demen1n/h4r/blob/24a3ff5f10856b2347499f107f266949ef0bf8a3/tools/testbench/README.md>

## 同分区更多条目：游戏

- [Harold：面向浏览器重建 Fallout 2 引擎](https://awesomerea.org/zh/resources/harold-fallout-2-case/index.md) · 案例
- [Hazard: Revenge：使用 SDL 重建《Hazard》引擎](https://awesomerea.org/zh/resources/hazard-revenge-case/index.md) · 案例
- [Helion：重建兼容 Doom 的游戏引擎](https://awesomerea.org/zh/resources/helion-doom-engine-case/index.md) · 案例
- [HERCULAN Engine：从零售版程序重建《Earthsiege 2》](https://awesomerea.org/zh/resources/herculan-earthsiege-2-case/index.md) · 案例
- [hercules-native：在 Apple 芯片上重建 Disney's Hercules Action Game](https://awesomerea.org/zh/resources/hercules-native-case/index.md) · 案例
- [Heroes of Jin Yong：重实现 DOS 游戏《金庸群侠传》](https://awesomerea.org/zh/resources/heroes-of-jinyong/index.md) · 案例

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
