Files
OpenRA/mods/ra/rules/player.yaml
let5sne.win10 ec3107e6e7
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled
ra: 开局自动托管给传统人机(Bot Takeover)
背景

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

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

改动

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

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

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

影响

- 开局无需等待/点击即可展开 MCV 并开始传统 AI 运营;同时仍可通过按钮取消托管恢复手动操作。
2026-01-11 20:52:14 +08:00

193 lines
5.8 KiB
YAML

^BasePlayer:
Shroud:
PlayerResources:
ResourceValues:
Ore: 25
Gems: 50
EditorPlayer:
Inherits: ^BasePlayer
Player:
Inherits: ^BasePlayer
TechTree:
ClassicProductionQueue@Building:
Type: Building
DisplayOrder: 0
LowPowerModifier: 300
ReadyAudio: ConstructionComplete
ReadyTextNotification: notification-construction-complete
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Building
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
ClassicProductionQueue@Defense:
Type: Defense
DisplayOrder: 1
LowPowerModifier: 300
ReadyAudio: ConstructionComplete
ReadyTextNotification: notification-construction-complete
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Building
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
ClassicProductionQueue@Vehicle:
Type: Vehicle
DisplayOrder: 3
LowPowerModifier: 300
ReadyAudio: UnitReady
ReadyTextNotification: notification-unit-ready
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Building
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
BuildTimeSpeedReduction: 100, 75, 60, 50
ClassicProductionQueue@Infantry:
Type: Infantry
DisplayOrder: 2
LowPowerModifier: 300
ReadyAudio: UnitReady
ReadyTextNotification: notification-unit-ready
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Training
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
ClassicProductionQueue@Ship:
Type: Ship
DisplayOrder: 5
LowPowerModifier: 300
ReadyAudio: UnitReady
ReadyTextNotification: notification-unit-ready
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Building
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
ClassicProductionQueue@Aircraft:
Type: Aircraft
DisplayOrder: 4
LowPowerModifier: 300
ReadyAudio: UnitReady
ReadyTextNotification: notification-unit-ready
BlockedAudio: NoBuild
BlockedTextNotification: notification-unable-to-build-more
LimitedAudio: BuildingInProgress
LimitedTextNotification: notification-unable-to-comply-building-in-progress
QueuedAudio: Building
OnHoldAudio: OnHold
CancelledAudio: Cancelled
SpeedUp: True
PlaceBuilding:
NewOptionsNotification: NewOptions
CannotPlaceNotification: BuildingCannotPlaceAudio
NewOptionsTextNotification: notification-new-construction-options
CannotPlaceTextNotification: notification-cannot-deploy-here
SupportPowerManager:
ScriptTriggers:
MissionObjectives:
WinNotification: Win
LoseNotification: Lose
LeaveNotification: Leave
ConquestVictoryConditions:
PowerManager:
SpeechNotification: LowPower
TextNotification: notification-low-power
AllyRepair:
PlayerResources:
InsufficientFundsNotification: InsufficientFunds
InsufficientFundsTextNotification: notification-insufficient-funds
CashTickUpNotification: CashTickUp
CashTickDownNotification: CashTickDown
DeveloperMode:
CheckboxDisplayOrder: 10
GpsWatcher:
Shroud:
FogCheckboxDisplayOrder: 3
LobbyPrerequisiteCheckbox@GLOBALBOUNTY:
ID: bounty
Label: checkbox-kill-bounties.label
Description: checkbox-kill-bounties.description
Enabled: False
DisplayOrder: 8
Prerequisites: global-bounty
LobbyPrerequisiteCheckbox@GLOBALFACTUNDEPLOY:
ID: factundeploy
Label: checkbox-redeployable-mcvs.label
Description: checkbox-redeployable-mcvs.description
Enabled: True
DisplayOrder: 7
Prerequisites: global-factundeploy
LobbyPrerequisiteCheckbox@REUSABLEENGINEERS:
ID: reusable-engineers
Label: checkbox-reusable-engineers.label
Description: checkbox-reusable-engineers.description
Enabled: False
DisplayOrder: 9
Prerequisites: global-reusable-engineers
FrozenActorLayer:
DamageNotifier:
ValidTargets: Structure
Notification: BaseAttack
TextNotification: notification-base-under-attack
AllyTextNotification: notification-ally-under-attack
DamageNotifier@Unit:
InvalidTargets: Structure
NotifyInterval: 10000
PlayerStatistics:
PlaceBeacon:
ProvidesTechPrerequisite@infonly:
Name: options-tech-level.infantry-only
Prerequisites: techlevel.infonly
Id: infantryonly
ProvidesTechPrerequisite@low:
Name: options-tech-level.low
Prerequisites: techlevel.infonly, techlevel.low
Id: low
ProvidesTechPrerequisite@medium:
Name: options-tech-level.medium
Prerequisites: techlevel.infonly, techlevel.low, techlevel.medium
Id: medium
ProvidesTechPrerequisite@high:
Name: options-tech-level.no-superweapons
Prerequisites: techlevel.infonly, techlevel.low, techlevel.medium, techlevel.high
Id: nosuperweapons
ProvidesTechPrerequisite@unrestricted:
Name: options-tech-level.unrestricted
Prerequisites: techlevel.infonly, techlevel.low, techlevel.medium, techlevel.high, techlevel.unrestricted
Id: unrestricted
GrantConditionOnPrerequisiteManager:
EnemyWatcher:
ProductionIconOverlayManager:
Type: Veterancy
Image: iconchevrons
Sequence: veteran
ResourceStorageWarning:
TextNotification: notification-silos-needed
PlayerExperience:
GameSaveViewportManager:
PlayerRadarTerrain:
BotTakeoverManager:
AutoActivate: true
AutoActivateDelayTicks: 1
BotType: normal
GrantConditions: enable-normal-ai