Company of Heroes 2

Company of Heroes 2

Zycat AI
Zycat  [developer] 2 Oct, 2022 @ 5:01am
Source Code
Here's the source code of the entire A.I mod :

https://drive.google.com/file/d/1LFL7faCedR9o5bMR5oUtjP3jtdxaCae2/

Note that Google Drive might limit downloading if it gets too popular.
Disclaimer : Use at your own risk, I shall not be held responsible if something bad happens. Also, expect no support (although I might answer some questions).

Why? AoE4, and I expect to mod CoH3 also. I also expect Real Life(tm) to take significantly more time.
Last edited by Zycat; 2 Oct, 2022 @ 5:08am
< >
Showing 1-11 of 11 comments
Hash_Silencer Li 17 Apr, 2023 @ 9:41am 
Actually, for squad upgrades, for the reasonn unknown
AI loves armor filter even if multiplied by 1
They will still love to buy
So about Mobilize Reserves of Conscript, you don't actually have to split it into two parts
Just give the armor filter multiplied by 1
And the hit the dirt of the ai ability seems to be wrongly set to vheicle crew repair toggle
Zycat  [developer] 17 Apr, 2023 @ 9:56am 
AI overvalues HP and Armor and that's why they love Churchills. I had a hard time convincing the AI to use Comets.

Mobilize Reserves causes bugs with the Conscript squad as the AI still considers them as a 6-man squad. You will start seeing conscript squads that have problems with retreating order if you enable it. Merge and recrewing team weapons will also break the count as well.

I originally intended the AI to have one Conscript squad to act as a "battery" of sorts and reinforce/merge to all other infantry units, retreat, replenish, and repeat. However as you can see it didn't work well so it was scrapped.

Hit the dirt was...no idea. I think I disabled it because it was exploitable by the human players and the way I usually disable things temporarily is to point them to unused abilities/items.
Last edited by Zycat; 17 Apr, 2023 @ 10:25am
Hash_Silencer Li 19 Apr, 2023 @ 4:49am 
I want to ask something by the way
Some of the files in ai_economy have a lot of <null> like "default_clean"
Is this intentional, or is it simply not deleted?
Zycat  [developer] 19 Apr, 2023 @ 5:07am 
do they have <null> or do they have -1 or 0?
-1 means it will derive from the default values, while zero means zero.
with the economy values I need to override Relic's values with -1. For instance if Relic have T34 priority at 100 and I want the AI to derive T34 priority value from the default_squad_priority instead, I have to create an entry for T34 with -1 as their values.
Hash_Silencer Li 19 Apr, 2023 @ 5:16am 
What I mean is really <null>
https://imgur.com/nivH5ai
Hash_Silencer Li 19 Apr, 2023 @ 5:32am 
And pack_howitzer_squad_mp_ai in ai_economy
Repeated quite a few times, it can be seen that pack howitzer is really burning your head
In a situation like this, which utility should the AI actually use?
200 or 125?
https://imgur.com/w7PpA2b
https://imgur.com/8cxVLe6
Zycat  [developer] 19 Apr, 2023 @ 5:35am 
Originally posted by Hash_Silencer Li:
What I mean is really <null>
https://imgur.com/nivH5ai
This is the same as a blank, will not affect the game in any way.


Originally posted by Hash_Silencer Li:
And pack_howitzer_squad_mp_ai in ai_economy
Repeated quite a few times, it can be seen that pack howitzer is really burning your head
In a situation like this, which utility should the AI actually use?
200 or 125?
https://imgur.com/w7PpA2b
https://imgur.com/8cxVLe6

Yea sometimes I forgot to clean up or got doubled lol, my bad. It's not easy to keep track of all of the units.
As for which one, the last entry will override the first.
Hash_Silencer Li 19 Apr, 2023 @ 5:49am 
wait
so it mean could just delete default_clean?
Hash_Silencer Li 19 Apr, 2023 @ 8:07am 
one more thing
wha thingt makes at_gun_mark_target, at_gun_mark_other_targets and mg_mark_target abandon?
Last edited by Hash_Silencer Li; 19 Apr, 2023 @ 8:30am
Zycat  [developer] 19 Apr, 2023 @ 9:49am 
Originally posted by Hash_Silencer Li:
one more thing
wha thingt makes at_gun_mark_target, at_gun_mark_other_targets and mg_mark_target abandon?

Those are my workarounds to make team weapons stay in place for longer, a skill that disables movement for x seconds that's only accessible for the AI.
kernalkrackerz 20 Apr, 2023 @ 10:54am 
thank you for sharing the source code, this is the AI mode i always use because its so well made. now i can try messing around with the AI and see what i can do!
< >
Showing 1-11 of 11 comments
Per page: 1530 50