Page 2 of 2

Re: Scenario creation guide part 4 (AI Teams and Orders)

Posted: Fri May 01, 2020 12:37 am
by desicat
If I have a unit is defending a hex (aggression AI 4), and I only want them to consider attacking if the enemy becomes adjacent and the attack odds were favorable, what would the aggression code be?

4 + 8? =12; or 4 + 256? = 260; or 4 + (256 +512)? = 772; or something else, or not possible to define to that level of detail?

I don't want them to leave the position unless the attack is favorable, otherwise hold.

Re: Scenario creation guide part 4 (AI Teams and Orders)

Posted: Fri May 01, 2020 6:52 am
by rbodleyscott
The AI automatically avoids attacking at unfavourable odds (most of the time), but I think you are asking too much of the editor based AI code system. We normally put such units on Agg 64 and then script the conditions under which they will "activate".

Re: Scenario creation guide part 4 (AI Teams and Orders)

Posted: Fri May 01, 2020 7:53 pm
by desicat
rbodleyscott wrote: Fri May 01, 2020 6:52 am The AI automatically avoids attacking at unfavourable odds (most of the time), but I think you are asking too much of the editor based AI code system. We normally put such units on Agg 64 and then script the conditions under which they will "activate".
Thank you, that was what I was doing with the "breaking the line causing a counter attack" script. Just seeing if there was another way. Appreciate the reply and assistance.

Re: Scenario creation guide part 4 (AI Teams and Orders)

Posted: Tue Feb 21, 2023 11:46 pm
by CharlesdeBatz
Hi all,

I am currently trying to create a scenario in the editor; however, I am unsure as to how I can designate player-controlled units as being part of a team (in the same way that AI-controlled units would be). The purpose of this is to enable a trigger based on units from a particular group entering certain map squares.

Should this designation work in the same way for both sides in the editor?

Re: Scenario creation guide part 4 (AI Teams and Orders)

Posted: Wed Feb 22, 2023 7:18 am
by rbodleyscott
CharlesdeBatz wrote: Tue Feb 21, 2023 11:46 pm Hi all,

I am currently trying to create a scenario in the editor; however, I am unsure as to how I can designate player-controlled units as being part of a team (in the same way that AI-controlled units would be). The purpose of this is to enable a trigger based on units from a particular group entering certain map squares.

Should this designation work in the same way for both sides in the editor?
It does, except you have to hold down the CTRL key to assign teams to side 0 units.