Edit the AI for a single player game or a game with friends

Good afternoon, everyone!
(I am writing with the help of a translator)

Background: my friends and I sometimes play for fun against the hardest AI: we build cities, build fortifications, trade, etc. Sometimes the AI can start to blunt and will endlessly send a small number of troops to their deaths, after which it is too easy to defeat, which makes the complexity of the game in the style of “big massacre” boring. And for larger scale wars I use truce.

I would like to ask for your help in editing the standard AI
I was able to find the file
**:steamapps\common\AoE2DE\resources_common\ai “AI (HD version)”

I would like to play against an AI that will form certain meaningful units of troops to its limit. Almost the same as the old AI, only the old AI is limited to a population of 200 people and makes too small squads (we play with a limit of 500 population)

Relatively, it’s not that hard to figure out the AI .per file, but damn it, I’m not that good at it and I don’t have that much time to spend days on it. So I decided to ask for help (in style, do everything for me)

I was looking for new AIs on the Internet, but because of one of them the game was constantly lagging, and the second was doing something unclear, for example, sending his peasants to harvest wood on the territory of an ally, which was located on the other side of the map, from which he was losing a lot of time. At the same time, there was constant spam in the chat, which made it uncomfortable.

I understand that now it will probably sound arrogant, as if I have a custom menu in a restaurant here, but…
Can any of you help? Edit the scripts of the standard .per AI-HD file so that it:

  1. Used his army more meaningfully
  • For example, he saw a fortification and began to form meaningful units to destroy this fortification, and not just endless spam of troops (Attack in waves, not one warrior at a time)
  • In case of heavy losses, he will retreat for a few minutes to build up the army again for the next massive offensive
  • (Not necessary if it is difficult to do) It would be very cool if the AI started building castles and towers next to the fortifications at a safe distance, rather than sending peasants straight to my base, where they would be killed by castles and knights
  1. So that the AI can build a good defense of its town, with castles, towers and most importantly walls

  2. (Not necessary if it is difficult to do) So that the AI can ferry troops across rivers and straits if it cannot get to my base or in order to carry out sabotage

But if one of you could tell me which scripts could be used to make AI attack in waves, maybe I could figure it out. And I would be very grateful for your help :smiley:

Hey! Go here

https://aok.heavengames.com/university/other/world-of-ai-scripting-chapter-1/

And then check the resources here

1 Like