# 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 Center:https://resource.openra.net ## 模组开发(Modding) - Mod SDK:https://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 Conversion):https://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/)。