Company of Heroes 3

Company of Heroes 3

444 ratings
Advanced AI
24
14
6
7
9
4
2
7
6
5
5
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
443.817 KB
5 Mar, 2023 @ 10:06am
11 Sep @ 10:37am
82 Change Notes ( view )

Subscribe to download
Advanced AI

Description
Fully custom script-based AI replacement for a more challenging and human-like AI.

Join the discord server to discuss the mod, get notifications about new updates, see development progress!
https://discord.gg/Xx8XGBgJpq

List of main features:
  • An option to play the game where AI controls player units and the player is only responsible for purchasing tech, units and using battlegroup abilities.
  • AI personality selection, altering the way AI makes some of its decisions.
  • Extra game mode for fully customizing AI bonuses.
  • Fully custom AI economy:
    • Ability to counter enemy team's unit composition.
    • Timing-based purchase priorities.
    • Full usage of battlegroup abilities and call-ins.
    • Emplacement and mine usage.
    • Sandbag and barbed wire usage.
  • Full control of all AI units:
    • Custom large-scale movement logic.
    • Custom capture logic.
    • Different movement logic for different kinds of units.
    • Ability to pick up dropped weapons, supply crates, recrew team weapons.
  • Close-in logic for assault units, including avoidance of MG arcs, shot blockers.
  • Custom cover taking logic, including avoidance of MG arcs, shot blockers.
  • Custom logic for all abilities.
  • Unblob functionality.
  • Vehicles will stay away from anti-tank.
  • Vehicles will attempt to face the enemy properly.
  • Vehicles can dive.
  • Vehicles will retreat for repairs.
  • Control of barrage units - smoke barrages, flares, general barrages.
  • Special logic for HMG, AT, sniper units.
  • Custom and complex retreat logic for all units.
  • Danger avoidance, especially for non-combat units.
  • Ability avoidance.
  • "Attention" system, AI will make more mistakes if multiple go on at once.
  • Action speed setting which adjusts AI overall attention and responsiveness.
  • "Pullback" system, AI is more likely to attack concentrations of enemy in waves.
  • Full use of USF veterancy.
  • Many more smaller features.

Source code available here: https://gitlab.com/AGameAnx/coh3-advanced-ai

This mod is based on a long standing COH1 project - Back to Basics mod.

Special thanks: Quicksilver, YouMoMCallME, Janne252, Garbhus
Popular Discussions View All (5)
11
1
28 Oct @ 2:59pm
PINNED: AI bonuses
AGameAnx
2
21 Apr, 2023 @ 12:19pm
AI use of mines and entrenchments
15267
0
20 Oct @ 4:09pm
AI Repair Logic
The Onyx Tiger
1,150 Comments
AGameAnx  [author] 21 Oct @ 7:58am 
As far as I know the only vehicles getting stuck problem is related to maps which have very big pathable "pockets". AI receives vehicle commands in a few steps, and if one of the steps leads to a complete dead end, it might fail to drive out of this dead end before getting the same orders reissued and driving straight back into the dead end. There are a few systems to avoid this, but I guess it still isn't bulletproof. Still, as far as I know it would take a really weird map for this to happen. Again, I'd love to see replays, I can probably glean a lot more from viewing it happening than from any description.

You can use discord for more frequent feedback as well. I dunno if I want a ton of feedback going to DMs heh.
AGameAnx  [author] 21 Oct @ 7:58am 
There isn't functionality to go towards repair stations, it simply chooses retreat directions sometimes towards areas where there are friendly units as it considers them safer.

There is functionality to stop if AI sees any nearby engineers trying to repair, as far as I know it should work for repair stations, the issue is probably that vehicles drive past before ever getting an update.
The Onyx Tiger 20 Oct @ 2:50pm 
Update 2:
Playing the same map I was playing when I said the AI were competently repairing their vehicles, I noticed that as soon as I began building Forward Repair Assemblies as the British the AI would send their damaged vehicles towards them but got stuck.

The AI doesn't seem to have logic to stop moving when within the radius of a FRA. I can sort of see what they're doing, though.. It's like when playing a shooter or something - you just don't stop moving otherwise you're a sitting duck. That's what the vehicles seem to be doing but within the radius of a repair station. However, the FRA does not have the ability to repair vehicles that are moving.

I'll need to try the U.S. with their version of a FRA on territory points to see if that works. If not, I'll try their Mechanized upgrade to make it an aura.

Finally I sent a friend request as to not spam the comments. :P I could also, instead, make a thread.
The Onyx Tiger 20 Oct @ 11:33am 
Update:
Playing another large map and the AI is competently repairing their vehicles. I think it may have been the map I was playing. It was a modded map and the AI vehicles would sometimes get stuck in weird places and just move around. I was going to post yesterday but wanted to test more.

The match I was just playing was also a modded map but behaved fine. About three hours in length and no hiccups.

However, I would like to point out another issue I noticed. Twice so far; first on an official map and second on a modded map. When an HQ building is destroyed, the AI won't repair it. On the official map we got one of the AI bases and they never wound up repairing it. Second was during this current match where they got my ally's HQ (just the HQ) and didn't repair it. I had to.

Still having fun with this mod. :D
The Onyx Tiger 19 Oct @ 8:56am 
I notice that the AI did have a bunch of Engineers, and yeah there's the wall of AT. The match I mentioned in my other post that was two and a half hours, the stalemate? My ally had a ton of AT teams. haha

This match was about an hour and a half and there were still lots of vehicles on both teams. It was a tug of war until my AI didn't have any combat-ready vehicles left and the enemy began winning because they had freshly built tanks. Once I began repairing all my allied tanks we began pushing back lost ground.

Currently, I didn't notice the AI actually stopping in the repair zones. They'd go to them and keep moving around, making it impossible for my FRSs to repair them, since they require the vehicles to be stationary.

The U.S. Mechanized upgrade to turn theirs into auras may work that way but not the British Heavy Armour.
AGameAnx  [author] 19 Oct @ 8:48am 
I wouldn't mind checking out replays where these issues occur specifically because right now I really just need to guess.

I suppose I could try to make it more smart about it too, make it actually consider how often vehicles are in need of repairs, not just the amount of armor overall on the field.
AGameAnx  [author] 19 Oct @ 8:48am 
Well, I'll try to address it more. Been trying since a long time ago.

I think in my testing I just never reach games that are that long or with that many vehicles.

It's not easy to make it go to repair stations, currently it just stops near them if it starts getting repaired by them.

The amount of repair units it buys is supposed to scale with amount of vehicles it has (if custom economy is enabled of course), and as far as I see in testing it really gets a lot of engineers towards the later stages.

I'm guessing the real issue here is that at some point vehicles also stop accomplishing much and just end up driving into a wall of AT over and over, so they basically need a repair crew on them non-stop...
The Onyx Tiger 19 Oct @ 6:18am 
Hey, so in prolonged matches, the AI neglects to repair their vehicles/tanks and the battle somewhat grinds to a halt, or rather it slows down.

In my match last night my three allies had clustered all their damaged vehicles/tanks in one location and I was forced to use five Royal Engineer sections to repair their vehicles to get back into the action. Yes, I saw the AI repair their own vehicles but not fast enough to account for the amount of damaged ones. Also, I kept having to chase the vehicles to repair them but idk if that's something that can be altered.

Is it possible to alter the repair script? Have vehicles actively seek out Forward Repair Stations, Repair Bunkers, and that U.S. Repair Zone? One of the areas the AI grouped their damaged tanks in is where I built a FRS but, because the AI kept moving their vehicles they wouldn't get repaired.
AGameAnx  [author] 18 Oct @ 6:22am 
@The Onyx Tiger, @HabitualCloud
Thank you, glad you are enjoying it!

@Gen. Eisenhower
It means there was a scar error during loading. It's possible that your mod isn't updated, try going in-game and deleting it, then resubscribing. If that doesn't help, please send me your warnings.log after an issue occurs. It can be found in C:\Users\_\Documents\My Games\Company of Heroes 3
Gen. Eisenhower 18 Oct @ 5:14am 
I have an issue with loading.

After I start the game and technically it is loaded, it will not go into the game. It just stays in loading screen. Last time I played this mod few months ago and this problem was appearing only when i set up AI personality. When I stopped doing that everything was fine. I came back lately to this mod, made set up that worked and this time it will not get me into the game. Someone know how to fix this?