AI and Walls

The AI does not seem to build walls around its main base very often. Where can I change this? I would like the AI to use walls in every skirmish.

I found some values that I think the AI uses to prioritize which buildings should be built first. For example: if the AI thinks it needs to build a house, but it also needs to build a wall, the house has a higher priority and will get built first. There is actually a fairly complicated formula that takes into account the materials needed to build the house and the wall, time to construct, … I changed the priority of walls and gates to see if maybe this would result in the AI building walls more often. It did not. I tested my changes by playing on a revealed map with max starting resources and starting in Age 4. So the quantity of resources was and technology level were not factors. In 3 out of 10 games the AI built walls. I set my changes back to default values and 4 out of 10 games the AI build walls or partially built walls.

I also found some values in attributes\tuning_ai\tuning_ai\wall. I can not clone tuning_ai though, so I can not make any changes to it.

Any help would be appreciated. Thanks in advance.

1 Like

you can actually clone tuning_ai by manually adding the file to your mod, but compatibility with future patches isn’t guaranteed.

As for walls, I think they’re pretty much hard-coded and the only thing that will trigger them to do it noticeably more often is to have excess resources.

I’ve been trying to figure out what caused and prevented them from making walls.

Here is what I’ve noticed in gameplay:

  • If AI is rushed early, they will build walls.
  • If AI is rushed late, they will build keeps and towers.
  • If AI is given more stone, they will focus on keeps and TC.
  • If AI is given more command points, they will focus more on villagers and units.

I have tried to change their “personality”, they still ignore the rules added. I do not know if the rules listed in numerical order cahnges their priorities.
I have no tried to give AI only defensive personalities. I’ll try that some time in the future.

But from the given basic settings, I do not think we have the power to change that.
There is even sections that allow you to change the priorities specifcally in the attributes but it is also not available for us to edit.

I don’t mod, but all the AI Rus I fight wall off super early. Maybe it’s more civ specific?

It could be, I know civs have different priorities, but most things in the editor is behind closed walls which pretty much have access to those said priorities.