Decision events Do not play well with AI events (Devs Please Help)

User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Lothos »

Hubert Cater wrote: Wed Oct 19, 2022 3:41 pm A) What the AI will do is if the Ampibious or Transport plan is without waypoints, it will look for available units amphbs or transports without plans within range of the desired coastal landing position. The range is within the range of the maximum distance of any naval unit associated with that particular country. It is a general calculation to assign a reasonable range to consider.

This is typically a shorter range plan, e.g. like D-Day, or like like the ones for the default 1943 campaign that has the AI already with Amphbious Transports at sea for the Allies at the start of the campaign to invade Sicily from North Africa.

B) If the Amphibious or Transport plan has waypoints, this is typically a longer range plan, the AI will look for any available Amphibs or Transports within the same range as described/calculated in A) but from the first FRIENDLY_POSITION, and yes it will scan outwards towards the sea from that position even though it is a land position.

* * *

The reason for the difference between how a longer range plan and a shorter range plan is handled when it comes to abandoned transports is that an amphibious plan will not unload until 50% of transports are in range of coastal position, and from testing it was found that to collect abandoned transports near the original FRIENDLY_POSITION, presumably where more friendly transports will join, just worked out better overall.
I know you said you are not really doing enhancements anymore and that is fine but when you decide to make your next Strategic Command iteration I would recommend a third alternative to trying to retrieve the units back. Perhaps allowing fleet AI to have a specific unit ID command to pull the Transports and AVL to a central location and they would then unload.

The solution above, although really good, does not resolve many issues as I do see in many simulated games lost transports and AVLs
User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Lothos »

Hubert Cater wrote: Wed Oct 19, 2022 3:45 pm
Having a decision to drop the garrison unit in the hex and then move the unit that invaded back to Japan would work. I just hate having the AI cheat, however that solves allot of the problem. The one thing is how to make the decision that would do this fire for only an AI Japan. I guess it would be AI=1 so it fires for an Axis AI in single player games but I guess it would not fire if it is a single player game but the human player is playing Germany only or do I need AI=3?

Wish their was an AI parameter that says if the COUNTRY_ID the event is tied to is AI controlled then fire and not have the AI tied to a specific side.
AI=1 will work as it will only be for AI games and for the Axis AI. AI=3 would be if you wanted it for AI and multiplayer games, which is what you do not want, but I would suggest AI=5 as that will cover the Axis AI no matter if it is your opponent AI and for those times that players will have Japan on their side but wish to have it controlled by the AI. This way the friendly controlled AI will work the same way.
What is AI= 5?

I see nothing in the documentation about it. I only see a 1 - 4 description.
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Hubert Cater »

I believe the UNIT event template and campaign files have been updated, perhaps not in your campaign if you started with an older set of information header notes.

Here they are here:

; #AI= Values range [0, 6]
; 0 = Event fires whenever all fields are satisfied for any game type
; 1 = Event fires whenever all fields are satisfied, for AI games only, and only on the Axis AI turn
; 2 = Event fires whenever all fields are satisfied, for AI games only, and only on the Allied AI turn
; 3 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Axis AI or on the Allied Multiplayer turns
; 4 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Allied AI or on the Axis Multiplayer turns
; 5 = Event fires whenever all fields are satisfied, for AI games only, and only for AI friendly controlled majors on the Axis AI or Axis friendly turns
; 6 = Event fires whenever all fields are satisfied, for AI games only, and only for AI friendly controlled majors on the Allied AI or Allied friendly turns
User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Lothos »

Hubert Cater wrote: Wed Oct 19, 2022 3:57 pm I believe the UNIT event template and campaign files have been updated, perhaps not in your campaign if you started with an older set of information header notes.

Here they are here:

; #AI= Values range [0, 6]
; 0 = Event fires whenever all fields are satisfied for any game type
; 1 = Event fires whenever all fields are satisfied, for AI games only, and only on the Axis AI turn
; 2 = Event fires whenever all fields are satisfied, for AI games only, and only on the Allied AI turn
; 3 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Axis AI or on the Allied Multiplayer turns
; 4 = Event fires whenever all fields are satisfied, for AI and Multiplayer games only, and only on the Allied AI or on the Axis Multiplayer turns
; 5 = Event fires whenever all fields are satisfied, for AI games only, and only for AI friendly controlled majors on the Axis AI or Axis friendly turns
; 6 = Event fires whenever all fields are satisfied, for AI games only, and only for AI friendly controlled majors on the Allied AI or Allied friendly turns
Are these 6 AI commands available for all Event and AI files?

I assume 5 is what I was requesting which is the country the event is for and is AI controlled regardless if their side is not AI controlled right?

And 6 is for the Allies while 5 is for the Axis correct?
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Hubert Cater »

The extra two options, e.g. 5 and 6 are just for UNIT events. And you are correct, 6 would be for the Allied AI the same as 5 is for the Axis AI.
User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by Lothos »

Hubert Cater wrote: Wed Oct 19, 2022 6:14 pm The extra two options, e.g. 5 and 6 are just for UNIT events. And you are correct, 6 would be for the Allied AI the same as 5 is for the Axis AI.
Ugh, so that probably wont work either. If it was at a decision level I could tie it into the loop.txt and the unit.txt so I can move the Japanese unit from the hex to Japan and then replace it with a garrison unit. That then leaves me only AI= 1 which wont handle if a human player is playing one country and not all the countries on a specific side.

Ugh :(
User avatar
BillRunacre
Posts: 6828
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Decision events Do not play well with AI events (Devs Please Help)

Post by BillRunacre »

Lothos wrote: Wed Oct 19, 2022 6:18 pm
Hubert Cater wrote: Wed Oct 19, 2022 6:14 pm The extra two options, e.g. 5 and 6 are just for UNIT events. And you are correct, 6 would be for the Allied AI the same as 5 is for the Axis AI.
Ugh, so that probably wont work either. If it was at a decision level I could tie it into the loop.txt and the unit.txt so I can move the Japanese unit from the hex to Japan and then replace it with a garrison unit. That then leaves me only AI= 1 which wont handle if a human player is playing one country and not all the countries on a specific side.

Ugh :(
Don't forget though that a human player can always interfere with their AI controlled AI, so if they notice something is a bit awry, or that their AI colleague has lost a vital island, they may take steps to set things right - which wouldn't be the case in a game where the AI controls all the forces on the Axis side.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
Post Reply

Return to “MODS and Scenarios”