How can I force AI units to attack certain location?

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

How can I force AI units to attack certain location?

Post by Bogdan »

Hi there! I'm trying to make a scenario with AI attacking some territories. It wasn't important to me to script some precise attack routes, so I'm simply using this:

Code: Select all

   GiveAttackBasePreference(2, "Attack1_Area", 10.0);
   GiveAttackBasePreference(2, "Attack2_Area", 10.0);
   GiveAttackBasePreference(2, "Attack3_Area", 10.0);
   GiveAttackBasePreference(2, "East_Constantinople_Area", 9.0);
   GiveAttackBasePreference(3, "Village_Area", 10.0);
   GiveAttackBasePreference(3, "West_Constantinople_Area", 10.0);
   GiveCaptureTerritoryPreference (2, "tx_terr_greek_2", 10.0);
   GiveCaptureTerritoryPreference (2, "tx_terr_greek_10", 10.0);
   GiveCaptureTerritoryPreference (2, "tx_terr_greek_15", 9.0);
Unfortunately, after some activity from AI (AI do capture 1-2 territories and attack 1-2 areas), it fixes all of the forces available in some location and then like "turns off". I'm not okay with it so I have to ask for help. Is there any way to force AI armies to consecutively attack some areas one by one? Also, can these attacks be fixed to the specific time, for example 2:00 minute of the game?

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How can I force AI units to attack certain location?

Post by Dr.MonaLisa »

Unfortunately, I won't be able to help in this case. Never played with AI behavior by .ies scripts.
However, for timings it can be simply done with other rules that terminate previous.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

Re: How can I force AI units to attack certain location?

Post by Bogdan »

So there are no commands that allow to choose AI units and manage them?
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: How can I force AI units to attack certain location?

Post by Dr.MonaLisa »

Depends if they're present in the scripting document or not.

Let's see if someone else knows it. Maybe Loew or Grouch would know more.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Post Reply

Return to “Questions”