Page 1 of 1

How does "Autoattack" work?

PostPosted: 02 Oct 2014, 19:18
by Strangelove
In the new RCs you can choose Autoattack for the AI. But how does it work exactly? Does the AI attack randomly (timewise and unitwise) or does it wait till all attackpositions are "filled" and than attacks with all units? And what target do they attack?

Re: How does "Autoattack" work?

PostPosted: 02 Oct 2014, 19:59
by dicsoupcan
they attack you when you get in their attack range. for example when your auto attack is set on 10 the ai will attack you when you are 10 tiles form their units. this prevents sneaking into cities.

Re: How does "Autoattack" work?

PostPosted: 02 Oct 2014, 20:06
by Strangelove
What you mean is "Auto attack range". I was talking about "Autoattack". :P

Re: How does "Autoattack" work?

PostPosted: 02 Oct 2014, 20:11
by Michalpl
Auto attack is AI auto attacking abillity it will launch attack when it will have enough soldiers
Now its limited to closest building

Re: How does "Autoattack" work?

PostPosted: 03 Oct 2014, 03:02
by Lewin
Auto attack is quite primitive at the moment. The AI will attack the closest building once about 50% of their current backline defence positions are full. This seemed to work well in my tests on multiplayer maps. If you have auto defence enabled then the number of defence positions can change as the AI expands their territory, so auto attack updates the number of soldiers required based on these changes.

Re: How does "Autoattack" work?

PostPosted: 04 Oct 2014, 18:52
by Strangelove
Auto attack is quite primitive at the moment. The AI will attack the closest building once about 50% of their current backline defence positions are full. This seemed to work well in my tests on multiplayer maps. If you have auto defence enabled then the number of defence positions can change as the AI expands their territory, so auto attack updates the number of soldiers required based on these changes.
Awww, I see. I had hope that it takes a random amount of Units and attacks a random target. The AI just seems too predictable when I set the attacks in the map-editor. I am ofc talking about singleplayer-maps, where the AI does not really build stuff by itself.

Re: How does "Autoattack" work?

PostPosted: 05 Oct 2014, 10:07
by The Dark Lord
As far as I know, the only way to make the AI do 'random' stuff is with dynamic scripts...

Re: How does "Autoattack" work?

PostPosted: 05 Oct 2014, 13:20
by Strangelove
As far as I know, the only way to make the AI do 'random' stuff is with dynamic scripts...
I thought so... I mean, I am not that bad with scripts, but it's too much of a hassle to completely code the AI attacks, when that AI should have defence positions as well. I am not sure if that wouldn't get in conflict with that. If there would be a Actions.AIAttack or something, it would be much easier. I hope there will be a way to add AI attacks with a single command. Like you can add defence positions and stuff now.
Till then, I guess I will have to use the one, that is built into the map-editor.