Files
OpenRA/README.md
let5sne.win10 d00ffa28f3 docs: 中文 README 并记录托管实现
将 README.md 翻译为中文,并补充本分支关键实现:开局交还控制权给传统人机(BotTakeoverManager)与托管时镜头防守热点跟随(BotTakeoverCameraFollower),同时给出相关入口/配置文件路径。
2026-01-11 23:39:03 +08:00

84 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenRA中文
OpenRA 是一个自由/开源的即时战略RTS游戏引擎支持早期 Westwood 经典作品的重制与扩展。
- 官网https://www.openra.net
- 交流Libera 上的 `#openra`[web](https://web.libera.chat/#openra))或 [Discord](https://discord.openra.net)
- 上游仓库https://github.com/OpenRA/OpenRA
请先阅读 Wiki 中的 [FAQ](https://github.com/OpenRA/OpenRA/wiki/FAQ) 与开发文档,并在上游 Issues 反馈引擎问题https://github.com/OpenRA/OpenRA/issues
也可加入论坛讨论https://forum.openra.net/
## 本仓库/本分支的关键实现记录
本分支围绕“开局将本地人类玩家控制权交还给传统人机Classic Bot并让比赛以人机 vs 人机方式运转”,以及“托管时镜头自动跟随防守热点”做了增强。
- 开局自动托管给传统人机:`OpenRA.Mods.Common/Traits/Player/BotTakeoverManager.cs`
- 作为 Player Trait`WorldLoaded` 后为“本地人类玩家LocalPlayer”自动激活经典 `ModularBot(normal)`
- 仅在主机侧生效,并避免在回放中启用(防止非权威端/回放污染世界状态)。
- 当前在 `mods/ra/rules/player.yaml` 默认开启:`BotTakeoverManager: AutoActivate: true`
- 托管时镜头自动跟随(默认偏“防守保家”):`OpenRA.Mods.Common/Traits/Player/BotTakeoverCameraFollower.cs`
- 通过 `INotifyDamage`/`INotifyBuildingPlaced` 收集“热点”(受击位置、建造落点等),按权重+时间衰减选取最佳焦点。
- 默认优先级:基地/MCV/矿车/矿厂受击 > 其它建筑受击 > 单位受击 > 新建筑落点。
- 多处战斗会使用“最短驻留时间 + 切换阈值”避免镜头频繁抖动;切换焦点可选择瞬移或限速平滑移动。
- 当前在 `mods/ra/rules/player.yaml` 默认开启,并且只在托管激活时生效(`RequireTakeoverActive: true`)。
- 游戏内托管开关按钮(用于取消/恢复托管):
- UI`mods/ra/chrome/ingame-player.yaml``Button@LLM_TAKEOVER`
- 逻辑:`OpenRA.Mods.Common/Widgets/Logic/Ingame/LLMTakeoverLogic.cs`
## 游玩
发行的内置模组包含对以下经典 RTS 的重制:
- Command & Conquer: Red Alert红色警戒
- Command & Conquer: Tiberian Dawn泰伯利亚黎明
- Dune 2000沙丘 2000
EA 未背书且不支持本产品。
多人对战入门可参考:[Playing the Game](https://github.com/OpenRA/OpenRA/wiki/Playing-the-game)
## 编译与运行Windows
- 编译(推荐):`.\make.cmd all`
- 快速启动红色警戒模组(本仓库提供脚本):`.\start-ra.cmd`
更多开发环境配置请阅读:
- [INSTALL.md](https://github.com/OpenRA/OpenRA/blob/bleed/INSTALL.md)
- Wiki: [Compiling](https://github.com/OpenRA/OpenRA/wiki/Compiling)
## 贡献
- 请阅读并遵守:[Code of Conduct](https://github.com/OpenRA/OpenRA/blob/bleed/CODE_OF_CONDUCT.md)
- 提交补丁请遵循:[CONTRIBUTING.md](https://github.com/OpenRA/OpenRA/blob/bleed/CONTRIBUTING.md)
- 引擎架构概览(可能已过时):[Hacking](https://github.com/OpenRA/OpenRA/wiki/Hacking)
## 地图制作Mapping
- 教程:[Mapping](https://github.com/OpenRA/OpenRA/wiki/Mapping)
- Lua 脚本任务相关:[Lua API](https://docs.openra.net/en/release/lua/)
- 分享地图OpenRA Resource Centerhttps://resource.openra.net
## 模组开发Modding
- Mod SDKhttps://github.com/OpenRA/OpenRAModSDK
- 指南:[Modding Guide](https://github.com/OpenRA/OpenRA/wiki/Modding-Guide)
- Traits 文档自动生成https://docs.openra.net/en/latest/release/traits/
- 像素美术提示:[Pixelart](https://github.com/OpenRA/OpenRA/wiki/Pixelart)
- 发布大型模组Total Conversionhttps://www.moddb.com/games/openra/mods
## 支持
- 赞助镜像下载服务器: https://github.com/OpenRA/OpenRAWebsiteV3/tree/master/packages
- 搭建专用服务器:[Dedicated Server](https://github.com/OpenRA/OpenRA/wiki/Dedicated-Server)
## 许可证
Copyright (c) OpenRA Developers and Contributors
OpenRA 使用 GNU GPLv3或更高版本授权发布详见 [COPYING](https://github.com/OpenRA/OpenRA/blob/bleed/COPYING)。
## 赞助方
Windows 平台的免费代码签名由 [SignPath.io](https://about.signpath.io/) 提供,证书来自 [SignPath Foundation](https://signpath.org/)。