Jakcie A.I (Actual AI improvements)

Hi @JakcieChan1178 just a question as someone modding the ai for my zombie mod. I have trouble getting ai to attack after about 30 min of game time and i suspect it is because it thinks it cant win any battles.

Any workarounds to have the ai keep attacking regardless of the advantage they have? Below are things i have tried.

  • Changed fallback value to -1
  • Disabled reinforcements
  • Added ‘dummy’ units with high damage but unable to attack to trick ai to think it has the advantage
  • Set limits to villagers and non military units

None of the above works. They keep units loitering around TC late game. Can you hint on the right direction? Thanks!!!

@JakcieChan1178
Here is a thread with the new AI bugs I found . I hope this will help you when you update your mod :slight_smile:
(New patch 12.0.1974 AI bugs)

Hey everyone. Just saying I just updated the mod to support the new update, enjoy.

2 Likes

There are a ton of things that influence ai attacks. A few files come to mind to me that can help you.

ai_settings’s combat_eval could be a good variable to change since the vanilla ai would highly prefer battles where they stomp the enemy instead.

You can try to tweak ai_statemodel_tunings’ skirmish_arttack_default and/or skirmish_difficulty files to try and make fallbacks as hard to do as possible (skirmish_arttack_default affects all skirmish_attack files so its not as tedious as it seems)

I don’t know if it will fix your problem but maybe it’ll work

4 Likes

Did you find any new hidden AI improvements that were not described in the new patch ?
Thanks again for the updates !

1 Like

A new patch has been released

Thanks for all the hard work, @JakcieChan1178 .Do you have a Discord community for discussing your mod? I know it’s not possible to edit your Tuning pack in the content editor, and it’s also not possible to run two tuning packs at the same time. Is there any way to share or access your mod files?

1 Like

@JakcieChan1178 I have noticed that lategame one big problem with AI behaviour

They really want to capture and defend sacred sites even when their homes are attacked and the sacred site victory condition is off

Do you think if it is possible to either lower the sacred site priority or remove all sacred site capturing from AI

1 Like

Hey everyone, it has been awhile since I have updated the mod and all of that. I won’t lie, I have not been at my main computer where the mod is a lot of the time recently so im not able to really update it.

I am paying attention to aoe4 news and would 100% be on top of updating the mod for next season.

For being able to access the source “code” (its xml files im not inflating my ego lol), I would love to actually set it up as a github, at least when I update the mod for the next big update.

Stay tuned for now I guess and thank you for following after almost 2 years!

6 Likes

Hello everyone.

Here it is! I dumped the mod uncompiled onto github. For any mod devs that want to add this into their own mod or anybody who wants to edit the mod for themselves,

This could also be a way to follow updates to the mod. Hope I can be able to update this at least every once in a while.

10 Likes

Oh, that’s just great!

Can you make the AI build walls please?

Also, is it possible to mod the AI so that it stops retreating all the time? I’ve also seen them have armies just standing still when under attack and not doing anything.

3 Likes

Yes AI with walls….liven if they aren’t perfect I love it and so much more fun to bulldoze down with my elephants or siege

1 Like

Hello everyone,

I made one last update before the new DLC to try and further fix the AI.

For one, I hope I found the source of the retreating AI, basically I made it so t hat the requirements to retreat are that the enemy needs an even bigger army than before.

Walls are a bigger problem though. Since an update soon after the Sultans Ascend DLC, I swear the AI has its wall building disabled and I could not for the life of me get it to build one ever again. Granted their wall building was super bad, so bad that the first AI to build a wall in a 1v1 was the AI that will lose. It was simply too simple, they will spend hundreds of stone to build a circle instead of wood to block a choke like a player could, wasting resources. If I could reenable it I would and it is “enabled” in this update but no guarantees.

Also im pretty sure I can’t get an update immediately after the DLC, maybe this weekend. At the very least im pretty sure the non DLC civs will still work with this update.

Enjoy.

5 Likes

Thanks for the update !
Really looking forward to it :slight_smile:

1 Like

Man the new update is very good, AI def play way way better, but still retreats lol. AI don’t know how to counter full siege tho. In a match I did yesterday, I had 20 bombards, the AI arrive with 50 cataphracts, I shoot like 2 or 3 times and they retreat lol, it’s insane, if you go full siege they literally don’t know what to do. Apart from this, AI works very great, like a Gold 3 imo (Using AGS with force to build landmark and force ai to attack)

1 Like

@JakcieChan1178
Some new AI bugs in the new patch that I’ve discovered so far…
Knights Templar AI:
AI is not using new technology Lettre de Change
AI is not using new technology Treasure Towers
AI does not upgrate Templar Brother to Elite level

Holy Roman Empire AI
For some reason, the AI isn’t using Black Rider.

All AI Civilization
AI doesn’t upgrade Cupellation technology

UPD For some reason Knights Templar AI became much worse to play after the last small patch
AI often ignores the transition to the next epoch also AI does not use pilgrims and for some reason builds a lot of barracks in the first epoch. In short Knights Templar AI is broken :frowning:

UPD The AI uses Point of Interest (in certain situations) but if the map size is large the AI does not capture Point of Interest far from its base . Although it often happens that the AI may not capture a point like Merchant Camp even near its base.
AI does not use Lost Ronin fully AI captures this point but does not use Ronin.
AI never destroys Wolf Den for gold
AI rarely captures (accidentally when most likely leading its troops near the point) Forgotten Ruins and never uses villager to mine Relic.
The AI rarely captures (randomly when it is most likely to lead its troops near a point) Abandoned Outpost and does not use this point.

P.s the only point the AI uses is Merchant Camp and it captures it more often to get additional resources.

2 Likes


Today while trying the new Knight Templars I was playing against Hard A.I. and after an early (Around 10/15 mins) aggression the AI walled up, put stone wall towers on walls and even built Great Wall Gatehouse on them! I’ve literally never seen Gatehouse as a Landmark against AI because they can’t even build walls normally, let alone a landmark on it. First of all, AI play way better than before, I can’t wait to have your mod with this AI on hardest to see what the AI is truly capable of, and I’d love if the AI would wall up at least 50% of games, it was beautiful to siege up a city with trebs and all

++Now AI seemingly goes also pure siege, they attacked me several times with like 10NOB and 6 bombards all together absolutely crushing my army of 60 lol

All of this was played with vanilla AI, idk if you mod is compatible atm

4 Likes

This is so cool! Wall building looks good too. I don’t care if the wall building is not the best. I’d rather play against crappy walls than no walls…specially seeing how to AI deals with putting walls up on nomad mega random

2 Likes

Hey guys, im back and I finally updated the mod to be compatible with the new civs.

Since it includes a lot of changes to the AI in terms of new units, civs, etc and the structure of the files and mod tools messes me up. I got rid of most of my previous work to make it compatible. Don’t worry, I will slowly reintegrate my old changes. That also means that my “base” of what I work with, at least for economy is based off of this patch rather than the release of Sultans Ascend, which I used before this patch. This is good by the way, at least in the long run. In fact, some problems unique to this mod are solved by this switch.

I already added some missing techs and the new HRE unit (at least they should be built, I didnt test it). I also added a few additions and fixes, especially to the templars being broken. They should at least age up to 2 properly.

Enjoy

4 Likes