From 36e820308ff2add71c374d4f1dcee744b6944703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 14 Mar 2013 10:48:36 +0100 Subject: [PATCH] AI support power activation needs to go through order manager fixes a desync whenever it will do so only on the host +island map AI which will only build navy / air force to test it and have a suitable bot for those map types (fixes pathfinder eating up all CPU because it can't reach you with ground units) --- OpenRA.Mods.RA/AI/HackyAI.cs | 3 ++- mods/ra/rules/system.yaml | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index c80d4bffff..f2b6cfe53b 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -1318,7 +1318,8 @@ namespace OpenRA.Mods.RA.AI { var attackLocation = FindAttackLocationToSupportPower(5); if (attackLocation == null) return; - sp.Activate(new Order() { TargetLocation = attackLocation.Value }); + + world.IssueOrder(new Order(sp.Info.OrderName, supportPowerMngr.self, false) { TargetLocation = attackLocation.Value }); } } } diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 6b2f3ae00b..e31a1b2b44 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -293,6 +293,56 @@ Player: ca: 8% pt: 8% SquadSize: 10 + HackyAI@IslandMapAI: + Name:Island Map AI + BuildingCommonNames: + ConstructionYard: fact + Refinery: proc + Power: powr,apwr + Silo: silo + UnitsCommonNames: + Mcv: mcv + BuildingLimits: + proc: 4 + dome: 1 + spen: 1 + syrd: 1 + hpad: 8 + afld: 8 + weap: 1 + atek: 1 + stek: 1 + BuildingFractions: + proc: 29% + powr: 1% + apwr: 24% + dome: 1% + weap: 1% + hpad: 20% + afld: 20% + atek: 1% + stek: 1% + spen: 1% + syrd: 1% + pbox.e1: 12% + gun: 12% + ftur: 12% + tsla: 12% + agun: 5% + sam: 5% + mslo: 1% + UnitsToBuild: + harv: 1% + heli: 30% + hind: 30% + mig: 30% + yak: 30% + ss: 10% + msub: 30% + dd: 30% + ca: 20% + pt: 10% + SquadSize: 1 HackyAI@OptiAI: Name:Eisenhower AI BuildingCommonNames: