Scenario creation guide part 4 (AI Teams and Orders)

desicat
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 141
Joined: Sun Feb 09, 2020 3:02 pm

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

Post 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.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28047
Joined: Sun Dec 04, 2005 6:25 pm

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

Post 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".
Richard Bodley Scott

Image
desicat
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 141
Joined: Sun Feb 09, 2020 3:02 pm

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

Post 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.
CharlesdeBatz
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Sun Jul 11, 2021 5:41 pm

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

Post 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?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28047
Joined: Sun Dec 04, 2005 6:25 pm

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

Post 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.
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Scenario Design”