ra: 开局自动托管给传统人机(Bot Takeover)
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled

背景

- OpenRA 的 Player 默认按‘人类’设计:不自动执行建造/展开/生产等,需要玩家输入。

- 为了实现全人机阵营交锋(后续再叠加 LLM 增强),需要在开局就把本地玩家控制权交还给传统人机。

改动

- 新增 BotTakeoverManager(Player trait):WorldLoaded 后自动为本地人类玩家激活传统 ModularBot(normal),并授予 nable-normal-ai,确保传统 AI 全链路模块从开局开始运行。

- 将右下角托管按钮逻辑改为切换 BotTakeoverManager,用于随时取消/恢复托管(避免直接激活 LLM bot 导致双 bot 并行与性能风险)。

- RA UI 增加托管按钮与中文提示文案。

影响

- 开局无需等待/点击即可展开 MCV 并开始传统 AI 运营;同时仍可通过按钮取消托管恢复手动操作。
This commit is contained in:
let5sne.win10
2026-01-11 20:52:14 +08:00
parent 2d5e58d5ce
commit ec3107e6e7
5 changed files with 282 additions and 0 deletions

View File

@@ -285,6 +285,20 @@ Container@PLAYER_WIDGETS:
Y: 5
ImageCollection: stance-icons
ImageName: hold-fire
Container@LLM_TAKEOVER_BAR:
Logic: LLMTakeoverLogic
X: 440
Y: WINDOW_HEIGHT - HEIGHT - 14
Width: 80
Height: 26
Children:
Button@LLM_TAKEOVER:
Width: 80
Height: 26
Font: Bold
Text: LLM AI
TooltipText: button-llm-takeover.tooltip
TooltipContainer: TOOLTIP_CONTAINER
Container@MUTE_INDICATOR:
Logic: MuteIndicatorLogic
X: WINDOW_WIDTH - WIDTH - 260

View File

@@ -190,3 +190,13 @@ button-production-types-aircraft-tooltip = 飞机
button-production-types-naval-tooltip = 海军
button-production-types-scroll-up-tooltip = 向上滚动
button-production-types-scroll-down-tooltip = 向下滚动
## LLM Takeover
button-llm-takeover =
.tooltip = AI托管
.tooltipdesc =
启用AI托管模式默认使用传统人机AI
AI将自动控制你的所有单位和建筑
包括建造、生产、战斗和资源管理。
再次点击可取消托管,恢复手动控制。

View File

@@ -185,3 +185,8 @@ Player:
PlayerExperience:
GameSaveViewportManager:
PlayerRadarTerrain:
BotTakeoverManager:
AutoActivate: true
AutoActivateDelayTicks: 1
BotType: normal
GrantConditions: enable-normal-ai