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.
Scenario creation guide part 4 (AI Teams and Orders)
-
- Field of Glory 2
- Posts: 28047
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Scenario creation guide part 4 (AI Teams and Orders)
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".
Richard Bodley Scott
Re: Scenario creation guide part 4 (AI Teams and Orders)
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.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".
-
- Corporal - Strongpoint
- Posts: 53
- Joined: Sun Jul 11, 2021 5:41 pm
Re: Scenario creation guide part 4 (AI Teams and Orders)
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?
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?
-
- Field of Glory 2
- Posts: 28047
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Scenario creation guide part 4 (AI Teams and Orders)
It does, except you have to hold down the CTRL key to assign teams to side 0 units.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?
Richard Bodley Scott