I hope you are doing well and getting through the summer. At the moment I’m creating new things in terms of AI from time to time. The focus is on attack priorities for teams.

It’s pretty simple to understand and apply, but it can become a relatively big effort. Short explanation:

What about?
The different buildings and units can be evaluated individually or grouped in lists. These attack priorities can then be applied to teams. These teams then prioritize their enemy targets according to their assigned attack priorities.

Why customize?
It can be done even better. For example, I hope drones are less likely to distract QuadCannons. Or U.S. transport aircraft less likely to distract during attacks. There is a lot of room for maneuver here. And it can easily be added to and applied to existing maps and scripts.

How do I apply the attack priorities to teams?

  • Create object lists
  • Create attack priorities with your object lists and single units (sometimes better)
  • Create application scripts and assign them to teams automatically or conditionally by an event.

Automatic assignment can be done by a “Behavior” or “Generic” script. This only needs to be set for the team in the team builder. But be careful with the subroutine scripts here. Generic scripts trigger the trigger every frame again, if no deactivation is done on success.

How do I proceed?
I started with a new object list. Clever grouping can save a few lines of code later. This I just renewed and added.

In the beginning there were some problems with applying the prios to the teams. It was because guard scripts suspend attack prios, and only hunt scripts can be affected accordingly.

Right now I am revising the values of my table again. Vertical column corresponds to attack priority for a team. The difficulty is to imagine how the team will act after it. If the team meets a mixed group of enemy units and has different values to the different units, then really all units are destroyed according to their type and its priority.

I thought I’d share this here with you guys. Maybe someone else is interested in it. Later I will share my files, if I can finish it. I want to create a kind of a retro-fit script package.

In case you wanna step in here… I can share my current Default Attack Priority Set for Generals:

Level 1
Object Lists
Level 2
Object Lists
Unique
Unit
Default
Priority
AirAir AuroraAmericaJetAurorax
AirAir CopterAmericaVehicleComanchex
AirAir Generals PowersAmericaJetA10Thunderboltx
AirAir Generals PowersAmericaJetB52x
AirAir Generals PowersChinaJetCargoPlanex
AirAir Generals PowersGLAJetCargoPlanex
AirAir JetAmericaJetRaptorx
AirAir JetAmericaJetStealthFighterx
AirAir JetChinaJetMIGx
ChinookChinookAmericaVehicleChinookx
BaseBase CenterAmericaCommandCenter27
BaseBase CenterChinaCommandCenter27
BaseBase CenterGLACommandCenter27
BaseBase CenterGLAHoleCommandCenter27
BaseBase DefenseAmericaPatriotBattery27
BaseBase DefenseChinaBunker27
BaseBase DefenseChinaGattlingCannon27
BaseBase DefenseChinaSpeakerTower27
BaseBase DefenseGLADemoTrap27
BaseBase DefenseGLAHoleStingerSite27
BaseBase DefenseGLAHoleTunnelNetwork27
BaseBase DefenseGLAStingerSite27
BaseBase DefenseGLAStingerSiteNoHole27
BaseBase DefenseGLATunnelNetwork27
BaseBase DefenseGLATunnelNetworkNoSpawn27
BaseBase HoleGLAHoleArmsDealer25
BaseBase HoleGLAHoleBarracks25
BaseBase HoleGLAHoleBlackMarket25
BaseBase HoleGLAHolePalace25
BaseBase HoleGLAHoleScudStorm25
BaseBase HoleGLAHoleSupplyStash25
BaseBase PowerAmericaPowerPlant27
BaseBase PowerChinaPowerPlant27
BaseBase ProductionAmericaAirfield26
BaseBase ProductionAmericaBarracks26
BaseBase ProductionAmericaWarfactory26
BaseBase ProductionChinaAirfield26
BaseBase ProductionChinaBarracks26
BaseBase ProductionChinaWarFactory26
BaseBase ProductionGLAArmsDealer26
BaseBase ProductionGLABarracks26
BaseBase SupplyAmericaSupplyCenter26
BaseBase SupplyAmericaSupplyDropZone26
BaseBase SupplyChinaSupplyCenter26
BaseBase SupplyGLABlackMarket26
BaseBase SupplyGLASupplyStash26
BaseBase SWAmericaParticleUplinkCannon28
BaseBase SWChinaNuclearMissileLauncher28
BaseBase SWGLAScudStorm28
BaseBase TechAmericaDetentionCamp27
BaseBase TechAmericaStategyCenter27
BaseBase TechChinaPropagandaCenter27
BaseBase TechGLAPalace27
DroneDrone-BattleAmericaVehicleBattleDronex
DroneDrone-SpyAmericaVehicleScoutDronex
DroneDrone-SpyAmericaVehicleSpyDronex
InfantryInfantry HackerChinaInfantryHacker27
InfantryInfantry MobGLAInfantryAngryMobMolotov0226
InfantryInfantry MobGLAInfantryAngryMobPistol0126
InfantryInfantry MobGLAInfantryAngryMobPistol0326
InfantryInfantry MobGLAInfantryAngryMobPistol0526
InfantryInfantry MobGLAInfantryAngryMobRock0226
InfantryInfantry MobGLAInfantryAngryMobRock0426
InfantryInfantry RocketAmericaInfantryMissileDefender27
InfantryInfantry RocketChinaInfantryTankHunter27
InfantryInfantry RocketGLAInfantryTunnelDefender27
InfantryInfantry SoldiersAmericaInfantryPilot26
InfantryInfantry SoldiersAmericaInfantryRanger26
InfantryInfantry SoldiersChinaInfantryRedguard26
InfantryInfantry SoldiersGLAInfantryRebel26
InfantryInfantry StealthAmericaInfantryColonelBurton28
InfantryInfantry StealthAmericaInfantryPathfinder28
InfantryInfantry StealthChinaInfantryBlackLotus28
InfantryInfantry StealthGLAInfantryHijacker28
InfantryInfantry StealthGLAInfantryJarmenKell28
InfantryInfantry StingerGLAInfantryStingerSoldier27
InfantryInfantry TerroristGLAInfantryTerrorist27
InfantryInfantry WorkerGLAInfantryWorker27
JetCargoJetCargoAmericaJetCargox
TankTank AirAmericaVehicleHumvee27
TankTank AirChinaTankGattling27
TankTank AirGLAVehicleQuadCannon27
TankTank ArtilleryAmericaVehicleTomahawk28
TankTank ArtilleryChinaVehicleInfernoCannon28
TankTank ArtilleryChinaVehicleNukeLauncher28
TankTank ArtilleryGLAVehicleRocketBuggy28
TankTank ArtilleryGLAVehicleScudLauncher28
TankTank GroundAmericaTankCrusader27
TankTank GroundAmericaTankPaladin27
TankTank GroundAmericaVehicleMedic27
TankTank GroundChinaTankBattleMaster27
TankTank GroundChinaTankDragon27
TankTank GroundGLATankMarauder27
TankTank GroundGLATankScorpion27
TankTank GroundGLAVehicleBombTruck27
TankTank GroundGLAVehicleTechnicalChassisOnce27
TankTank GroundGLAVehicleTechnicalChassisThree27
TankTank GroundGLAVehicleTechnicalChassisTwo27
TankTank GroundGLAVehicleToxinTruck27
TankTank OverlordChinaTankOverlord27
TankTank SpyChinaVehicleTroopCrawler27
TankTank SpyChinaVehicleTroopCrawlerEmpty27
Tech BuildingsTech BuildingsTechHospitalx
Tech BuildingsTech BuildingsTechOilDerrickx
Tech BuildingsTech BuildingsTechOilRefineryx
VehicleVehicle DozerAmericaVehicleDozer27
VehicleVehicle DozerChinaVehicleDozer27
VehicleVehicle RadarGLAVehicleRadarVan27
VehicleVehicle SupplyChinaVehicleSupplyTruck26
Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.