Modding AI Files
Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition
Writing the Downfall AI
OK going to write up a few notes of what I did when I wrote the downfall AI v 1.
The first thing to note is doing the AI for a small map scenario is a lot easier than a full campaign one.
The AI depends on ships being in a given loaction to help it form TF's and while it has some teleporting ability its not great.
Key tools when writing AI scripts
1. you will need to run them tweak, run them tweak etc etc.
2. you need to know how to debud the Ai by knowing where the data comes from.
The AI debugger -a$$um3 extension provides the land debug file
1003. - 10th Army - II US Corps, ACTIVE, target Chichi-jima, ds 451202, de 460201, prev 00, bt 611, wait 59, taav 0, tdav 4, side Allied ***************
<<<<< Assault Units >>>>>
5925. - mod 1003, hq 5922, tf 0000, delay 000 <II US> ship 5258, dest none, target Chichi-jima
5927. - mod 1003, hq 5925, tf 0000, delay 000 <II Corps Combat> ship 5260, dest none, target Chichi-jima
5931. - mod 1003, hq 5925, tf 0000, delay 000 <24th (Sep) Infantry> ship 5263, dest none, target Chichi-jima
5932. - mod 1003, hq 5925, tf 0000, delay 000 <37th (Sep) Infantry> ship 5264, dest none, target Chichi-jima
5933. - mod 1003, hq 5925, tf 0000, delay 000 <102nd(Sep) Infantry> ship 5265, dest none, target Chichi-jima
5937. - mod 1003, hq 5922, tf 0000, delay 000 <193rd Tank> ship 5266, dest none, target Chichi-jima
5943. - mod 1003, hq 5925, tf 0000, delay 000 <93rd Infantry> ship 5150, dest none, target Chichi-jima
<<<<< Air Group Units >>>>>
<<<<< Defense Units >>>>>
5958. - mod 1003, hq 104, tf 0000, delay 000 <1st Tac Air Force> loc Kanoya, dest none, sb Kanoya, target Kanoya
5964. - mod 1003, hq 5958, tf 0000, delay 000 <1st RAAF M/W Sqn> loc Amami Oshima, dest none, sb Amami Oshima, target Amami Oshima
5965. - mod 1003, hq 5958, tf 0000, delay 000 <10th RAAF M/W Sqn> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5966. - mod 1003, hq 5958, tf 0000, delay 000 <11th RAAF M/W Sqn> loc Tanegashima, dest none, sb Tanegashima, target Tanegashima
5958. - mod 1003, hq 104, tf 0000, delay 000 <1st Tac Air Force> loc Kanoya, dest none, sb Kanoya, target Kanoya
5959. - mod 1003, hq 5958, tf 0000, delay 000 <1st TAF> loc Kanoya, dest none, sb Kanoya, target Kanoya
5960. - mod 1003, hq 5958, tf 0000, delay 000 <72nd RAAF Wing> loc Amami Oshima, dest none, sb Amami Oshima, target Amami Oshima
5961. - mod 1003, hq 5958, tf 0000, delay 000 <73rd RAAF Wing> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5962. - mod 1003, hq 5958, tf 0000, delay 000 <1st Fgtr RAAF Wing> loc Tanegashima, dest none, sb Tanegashima, target Tanegashima
5971. - mod 1003, hq 5958, tf 0000, delay 000 <32nd Australian Lt> loc Kanoya, dest none, sb Kanoya, target Kanoya
5972. - mod 1003, hq 5958, tf 0000, delay 000 <2nd Australian Hvy> loc Kanoya, dest none, sb Kanoya, target Kanoya
5973. - mod 1003, hq 5958, tf 0000, delay 000 <20th RAAF> loc Kanoya, dest none, sb Kanoya, target Kanoya
5974. - mod 1003, hq 5958, tf 0000, delay 000 <10 RAAF> loc Vigan, dest none, sb Oita, target Oita
5968. - mod 1003, hq 5958, tf 0000, delay 000 <6th RAAF> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5969. - mod 1003, hq 5958, tf 0000, delay 000 <9th RAN> loc Kanoya, dest none, sb Kanoya, target Kanoya
End of Module 1003____________________________________
The output of that looks like the text above.
The second area is to know that when an AI TF is under command of a script the name of the script tells you which AI script has it under command.
Air units in the bottom left on the group screen tells you which AI script a given air group is operating under.
So 1stly work out HOW to find out stuff.
The first thing to note is doing the AI for a small map scenario is a lot easier than a full campaign one.
The AI depends on ships being in a given loaction to help it form TF's and while it has some teleporting ability its not great.
Key tools when writing AI scripts
1. you will need to run them tweak, run them tweak etc etc.
2. you need to know how to debud the Ai by knowing where the data comes from.
The AI debugger -a$$um3 extension provides the land debug file
1003. - 10th Army - II US Corps, ACTIVE, target Chichi-jima, ds 451202, de 460201, prev 00, bt 611, wait 59, taav 0, tdav 4, side Allied ***************
<<<<< Assault Units >>>>>
5925. - mod 1003, hq 5922, tf 0000, delay 000 <II US> ship 5258, dest none, target Chichi-jima
5927. - mod 1003, hq 5925, tf 0000, delay 000 <II Corps Combat> ship 5260, dest none, target Chichi-jima
5931. - mod 1003, hq 5925, tf 0000, delay 000 <24th (Sep) Infantry> ship 5263, dest none, target Chichi-jima
5932. - mod 1003, hq 5925, tf 0000, delay 000 <37th (Sep) Infantry> ship 5264, dest none, target Chichi-jima
5933. - mod 1003, hq 5925, tf 0000, delay 000 <102nd(Sep) Infantry> ship 5265, dest none, target Chichi-jima
5937. - mod 1003, hq 5922, tf 0000, delay 000 <193rd Tank> ship 5266, dest none, target Chichi-jima
5943. - mod 1003, hq 5925, tf 0000, delay 000 <93rd Infantry> ship 5150, dest none, target Chichi-jima
<<<<< Air Group Units >>>>>
<<<<< Defense Units >>>>>
5958. - mod 1003, hq 104, tf 0000, delay 000 <1st Tac Air Force> loc Kanoya, dest none, sb Kanoya, target Kanoya
5964. - mod 1003, hq 5958, tf 0000, delay 000 <1st RAAF M/W Sqn> loc Amami Oshima, dest none, sb Amami Oshima, target Amami Oshima
5965. - mod 1003, hq 5958, tf 0000, delay 000 <10th RAAF M/W Sqn> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5966. - mod 1003, hq 5958, tf 0000, delay 000 <11th RAAF M/W Sqn> loc Tanegashima, dest none, sb Tanegashima, target Tanegashima
5958. - mod 1003, hq 104, tf 0000, delay 000 <1st Tac Air Force> loc Kanoya, dest none, sb Kanoya, target Kanoya
5959. - mod 1003, hq 5958, tf 0000, delay 000 <1st TAF> loc Kanoya, dest none, sb Kanoya, target Kanoya
5960. - mod 1003, hq 5958, tf 0000, delay 000 <72nd RAAF Wing> loc Amami Oshima, dest none, sb Amami Oshima, target Amami Oshima
5961. - mod 1003, hq 5958, tf 0000, delay 000 <73rd RAAF Wing> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5962. - mod 1003, hq 5958, tf 0000, delay 000 <1st Fgtr RAAF Wing> loc Tanegashima, dest none, sb Tanegashima, target Tanegashima
5971. - mod 1003, hq 5958, tf 0000, delay 000 <32nd Australian Lt> loc Kanoya, dest none, sb Kanoya, target Kanoya
5972. - mod 1003, hq 5958, tf 0000, delay 000 <2nd Australian Hvy> loc Kanoya, dest none, sb Kanoya, target Kanoya
5973. - mod 1003, hq 5958, tf 0000, delay 000 <20th RAAF> loc Kanoya, dest none, sb Kanoya, target Kanoya
5974. - mod 1003, hq 5958, tf 0000, delay 000 <10 RAAF> loc Vigan, dest none, sb Oita, target Oita
5968. - mod 1003, hq 5958, tf 0000, delay 000 <6th RAAF> loc Daito Shoto, dest none, sb Daito Shoto, target Daito Shoto
5969. - mod 1003, hq 5958, tf 0000, delay 000 <9th RAN> loc Kanoya, dest none, sb Kanoya, target Kanoya
End of Module 1003____________________________________
The output of that looks like the text above.
The second area is to know that when an AI TF is under command of a script the name of the script tells you which AI script has it under command.
Air units in the bottom left on the group screen tells you which AI script a given air group is operating under.
So 1stly work out HOW to find out stuff.
RE: Writing the Downfall AI
OK when looking at Downfall I had to decide what I wanted the AI to do.
My objectives were.
Allied AI
1. Invade Kyushu with 1 Army of 4 Corps
2. Redeploy air power to allow air assault on the HI
3. Invade Honshu with 2 Armies of 10 Corps
4. Put in place appropriate support scripts including naval and CAS scripts.
Japanese AI
1. React to Allied Invasions
2. Concentrate forces from China and Korea back into the HI
3. Retain some qualified pilots for the final confrontation
Andy
My objectives were.
Allied AI
1. Invade Kyushu with 1 Army of 4 Corps
2. Redeploy air power to allow air assault on the HI
3. Invade Honshu with 2 Armies of 10 Corps
4. Put in place appropriate support scripts including naval and CAS scripts.
Japanese AI
1. React to Allied Invasions
2. Concentrate forces from China and Korea back into the HI
3. Retain some qualified pilots for the final confrontation
Andy
RE: Writing the Downfall AI - p.s. there will spoilers
As I wanted to start on getting the allied attack ok I decided to start building up Allied Air Scripts
Ok I decided to do an easy one I set up the Tiger Force Script
The RAF provides two Bomber Groups to the Attack on the HI - I decided to set them up to operate from Manila
5 RAF at Appari and 6 RCAF at Laong.
So what do I do is I set up a chain of bases starting at Pearl Harbour all the way to those bases via Midway, Guam as an air bridge and then allocated those air sqns to the appropriate bases.
lastly I went through the LCU's allocated to those air groups making sure that each base has HQ, Cnstruction unit, base force and aviation regts to allow the Groups to operate
Because I dont care that the script ends it has no end date

Ok I decided to do an easy one I set up the Tiger Force Script
The RAF provides two Bomber Groups to the Attack on the HI - I decided to set them up to operate from Manila
5 RAF at Appari and 6 RCAF at Laong.
So what do I do is I set up a chain of bases starting at Pearl Harbour all the way to those bases via Midway, Guam as an air bridge and then allocated those air sqns to the appropriate bases.
lastly I went through the LCU's allocated to those air groups making sure that each base has HQ, Cnstruction unit, base force and aviation regts to allow the Groups to operate
Because I dont care that the script ends it has no end date

- Attachments
-
- Tiger.jpg (148.6 KiB) Viewed 473 times
RE: Writing the Downfall AI - p.s. there will spoilers
I then thought ok the AI is a moron it will need some bases near to the HI and some fighters there to help the carriers with fighter cover because the AI will be slow to bring in LBA to support its landing
(The AI will not bring in fighters until the base has an operational airport and some Av Support - a player would either bring some av support along on iots invasion but not at the expense of assault units or fly in fighters anyway and air tran in av support to follow - the AI will do NEITHER of these things av support in invasion scruipts is a very bad idea as the AI has a habit of assault loading the base Force and leaving the Div behind - this means the AI WILL be slower to bring up LBA than a human would be it is thereofre more important for a player to have nearby AF'as operational before the main event)
Because the Ai is slow take precautions
In this case I set up a script to take a few AF's of the coast of Kyushu on behalf of 1st TAF so that Australian and NZ F$U's and P51's can support the invasion beaches.
I use these forces as they are not critical tot he main event - if it works it works if it fails the AI is not depending on those air units
i.e. build in redundancy to major operations.
(The AI will not bring in fighters until the base has an operational airport and some Av Support - a player would either bring some av support along on iots invasion but not at the expense of assault units or fly in fighters anyway and air tran in av support to follow - the AI will do NEITHER of these things av support in invasion scruipts is a very bad idea as the AI has a habit of assault loading the base Force and leaving the Div behind - this means the AI WILL be slower to bring up LBA than a human would be it is thereofre more important for a player to have nearby AF'as operational before the main event)
Because the Ai is slow take precautions
In this case I set up a script to take a few AF's of the coast of Kyushu on behalf of 1st TAF so that Australian and NZ F$U's and P51's can support the invasion beaches.
I use these forces as they are not critical tot he main event - if it works it works if it fails the AI is not depending on those air units
i.e. build in redundancy to major operations.
RE: Writing the Downfall AI - p.s. there will spoilers
So the next script was the 1 TAF script that does three things.
1. Attack and take minor japanese islands.
2. Garrison those bases
3. Forward deploy Fighters and Light Bombers in support of further operations.
So at this stage I hgad two scripts neither touching the HI both all about prep moves with support formations.
I then looked at US 10th Army what is its role in the scenario
Basically it doesnt have one its their to garrison rear area bases does it need all its OOB for than - no ok what can I use those forces for.
Well a human player is likely to be sneaky and Wake and marcus are on my LOC as is the rest of the Bonins - its a complication I cannot adjust for in the scripts so the easiest way to deal with it is to neutralise the threat - therefore I pulled about 4 Divs out of tenth army for clearing operations - these forces will run round taking out of the way dangerous bawses with a few CVE's for cover.
And thats the end of the prelude scripts
1. Attack and take minor japanese islands.
2. Garrison those bases
3. Forward deploy Fighters and Light Bombers in support of further operations.
So at this stage I hgad two scripts neither touching the HI both all about prep moves with support formations.
I then looked at US 10th Army what is its role in the scenario
Basically it doesnt have one its their to garrison rear area bases does it need all its OOB for than - no ok what can I use those forces for.
Well a human player is likely to be sneaky and Wake and marcus are on my LOC as is the rest of the Bonins - its a complication I cannot adjust for in the scripts so the easiest way to deal with it is to neutralise the threat - therefore I pulled about 4 Divs out of tenth army for clearing operations - these forces will run round taking out of the way dangerous bawses with a few CVE's for cover.
And thats the end of the prelude scripts
RE: Writing the Downfall AI - p.s. there will spoilers
OK I then turn to Olympic
The first thing to work out is where is the best place for the AI to land
Actually this is normally the best place for a player to land on Kyushu the best locations are Kanoya, Oita, Kagoshima, Kumamoto and Kurume
They all have advantages and disadvantages but I chose for script variant 1 to land at Kanoya
OK so whats next
The lead assault echelon has to be the Marine Corps as assault echelon of Sixth Army - this is both the correct historical and in game choice for the AI.
Now the AI tricks
I want the lead supporting TF to be a bombardment TF set as Amphib lead (which means all TF's in this script will congregate to this lead TF) and it will use the current target from the base list
Set to follow this TF are two max size large CVE TF's to provide local air support.
The LCU's I set at the top of the list the best LCU's DONT put an HQ at the top of the list put your biggest nastiest LCU the AI works down the list so get your asault echelon at the top (Often its best to put arty base forces etc in a follow up TF to avoid any grief)
Now this assault force has two base in its list and when the second base is taken I want this script to end to rfree up the supporting ships. Until the script ends the ships are tied to it I could have said end the script when Kanoya falls but because of the delay to local air support I gave it a little more time to allow more chance for the Ai to bring in fighters.

The first thing to work out is where is the best place for the AI to land
Actually this is normally the best place for a player to land on Kyushu the best locations are Kanoya, Oita, Kagoshima, Kumamoto and Kurume
They all have advantages and disadvantages but I chose for script variant 1 to land at Kanoya
OK so whats next
The lead assault echelon has to be the Marine Corps as assault echelon of Sixth Army - this is both the correct historical and in game choice for the AI.
Now the AI tricks
I want the lead supporting TF to be a bombardment TF set as Amphib lead (which means all TF's in this script will congregate to this lead TF) and it will use the current target from the base list
Set to follow this TF are two max size large CVE TF's to provide local air support.
The LCU's I set at the top of the list the best LCU's DONT put an HQ at the top of the list put your biggest nastiest LCU the AI works down the list so get your asault echelon at the top (Often its best to put arty base forces etc in a follow up TF to avoid any grief)
Now this assault force has two base in its list and when the second base is taken I want this script to end to rfree up the supporting ships. Until the script ends the ships are tied to it I could have said end the script when Kanoya falls but because of the delay to local air support I gave it a little more time to allow more chance for the Ai to bring in fighters.

- Attachments
-
- VAmphib.jpg (129.93 KiB) Viewed 473 times
RE: Writing the Downfall AI - p.s. there will spoilers
Very interesting....suscribed !!!
RE: Writing the Downfall AI - p.s. there will spoilers
Because I want the Amphib Corps to go in whole its the only Corps in the first echelon.
IX Corps script is set to follow on into kanoya 6 days later with the same size escort. Samer rules Divs first int he list.
then 6 days after that I Corps and then lastl XI Corps
I Corps and XI Corps are ordered to land at another base in case a player manages to stop the initial assault.
Int total this phase has 13 Divs assault loaded and landing over 18 days supported by 4 heavy surface TF's and 8 Big CVE's
This will be the biggest and best organsised amphib assault int he scenario so its also the one mostlikely to succeed.
Each of these scripts has a reasonable end date as backstop, heavy naval support and a trigger base when captured that will end the script.
Now CVE's are all well and good but you need 3rd Fleet to really cover the assault.
The TF below has the covering scripts - the first two are 6 Max Strength CV TF's, set to patrol off the shore of Kyushu, a 3rd set of TF's including 2 CV and 1 CVE TF from the BPF at Peliau and lastly a fleet train set of TF's (2 CVE and 1 Replenishment TF)
So total 12 supporting TF's each one with 2 - 5 CV or CVE's so thats the majority of the allied CV's committed to this operation.
I also wanted to specify a Sub patrol and not leave it to the auto sub system for the AI so I set up about 24 Sub TF's via the USN Sub scripts to form picket lines covering likely approaches

IX Corps script is set to follow on into kanoya 6 days later with the same size escort. Samer rules Divs first int he list.
then 6 days after that I Corps and then lastl XI Corps
I Corps and XI Corps are ordered to land at another base in case a player manages to stop the initial assault.
Int total this phase has 13 Divs assault loaded and landing over 18 days supported by 4 heavy surface TF's and 8 Big CVE's
This will be the biggest and best organsised amphib assault int he scenario so its also the one mostlikely to succeed.
Each of these scripts has a reasonable end date as backstop, heavy naval support and a trigger base when captured that will end the script.
Now CVE's are all well and good but you need 3rd Fleet to really cover the assault.
The TF below has the covering scripts - the first two are 6 Max Strength CV TF's, set to patrol off the shore of Kyushu, a 3rd set of TF's including 2 CV and 1 CVE TF from the BPF at Peliau and lastly a fleet train set of TF's (2 CVE and 1 Replenishment TF)
So total 12 supporting TF's each one with 2 - 5 CV or CVE's so thats the majority of the allied CV's committed to this operation.
I also wanted to specify a Sub patrol and not leave it to the auto sub system for the AI so I set up about 24 Sub TF's via the USN Sub scripts to form picket lines covering likely approaches

- Attachments
-
- Support.jpg (114.73 KiB) Viewed 474 times
RE: Writing the Downfall AI - p.s. there will spoilers
OK the next phase is the exploitation scripts fior 6th Army
They all chain off the preceeding script for that Corps and have a series of axis of advance - now the terrain in Kyushu is nasty and the whole objective is only to get fighter airfields so I dont want the AI committing to a fight to the finish in the mountains not when other battles await.
So 1 Corps is sent towards Fukuoka via the west route and 3 via the eastern route.
Because I want to ensure more weight is given to achiving at lease some of these objectives a further 10 Divs from 14th Army are set to come in as support if halfway objectives are not achieved
Add in I Aus Corps of 10th Army and in total the allies will commit up to 25 Divisions to the Kyushu fight.
The follow on scripts have some integral air so the Marine Corps will move to support I amphib corps.
After 4 months I expect I Amphib to be a shadow so I have recycled it back to manila for 2 months rest and retraining where it will be used to support follow on echelons of Coronet.
Its replaced in the line on Kyushu by 10th Army forces.
This is a weak spot a player could exploit when the Ai is pulling back out of Kyushu a full corps
They all chain off the preceeding script for that Corps and have a series of axis of advance - now the terrain in Kyushu is nasty and the whole objective is only to get fighter airfields so I dont want the AI committing to a fight to the finish in the mountains not when other battles await.
So 1 Corps is sent towards Fukuoka via the west route and 3 via the eastern route.
Because I want to ensure more weight is given to achiving at lease some of these objectives a further 10 Divs from 14th Army are set to come in as support if halfway objectives are not achieved
Add in I Aus Corps of 10th Army and in total the allies will commit up to 25 Divisions to the Kyushu fight.
The follow on scripts have some integral air so the Marine Corps will move to support I amphib corps.
After 4 months I expect I Amphib to be a shadow so I have recycled it back to manila for 2 months rest and retraining where it will be used to support follow on echelons of Coronet.
Its replaced in the line on Kyushu by 10th Army forces.
This is a weak spot a player could exploit when the Ai is pulling back out of Kyushu a full corps
RE: Writing the Downfall AI - p.s. there will spoilers
Maybe this thread should be stickied?
RE: Writing the Downfall AI - p.s. there will spoilers
Andy, I looked a bit more in detail through your scripting of scen1 in order to get a better understanding of how you organized things, and how you got most out of it! Really complex what you produced, and I only am beginning to understand... But I have a couple of questions for you, or any dev who can answer. That would help me to get started with AI scripting. Thanks!
- You said that assigned AI air units will pick bases in the sequence in the list: Does this mean if they will not pick out the ones that are in range of the enemy (and best out of range of his assets), but populate them in sequence, i.e. it is possible that squadrons will end up useless if there is a base on the list that is out of range? (for simplicity: tm.asp?m=2274569#)
- How will AI behave, if two scripts are active at a given point that both will request the same (a) LCU, air unit, or (b) say both try to set of a large-max 4 CV TF (assuming there are only 4 available)? Will it be simply the first script in the scripting list gets them, but the 2nd hijacks them and puts them elsewhere? Or does the first reserve them, and the 2nd simply quit since it is not finding enough forces? Or does AI do some risk-gain assessment to assign them to the most useful of both scripts?
- Ending scripts: I would like to create a script that goes "dead" or "defense" not upon fall of a base, or a on certain end date, but that can get stopped also by losses (air/naval/LCU) or lack of supply? Or ideally, also but counting enemy at the assault base(s) (say "dead" if > threshold number of planes)? Can you improvise something like that within the present scripting language? Or will this be a case for the wish-list?
- Also, if I understand correctly "chaining scripts" only works for a one-to-one link, right? There is no way that one script may depend on more than 1 previous one? But more then 1 next script may depend on the same previous one, right? So I could use one "status script", that could control (start or not) more than 1 follow up (kind of a supervising instance for a set of campaign scripts)?
- Starting scripts: Is there a way to add scripts, that have a random starting probability (but defined date)? For example take "Midway", and give it only a certain chance to start (and cancel other scripts that may interfere/request same units)? Can this be done, or is the only random here the variant AI picks at scenario start?
- You said that assigned AI air units will pick bases in the sequence in the list: Does this mean if they will not pick out the ones that are in range of the enemy (and best out of range of his assets), but populate them in sequence, i.e. it is possible that squadrons will end up useless if there is a base on the list that is out of range? (for simplicity: tm.asp?m=2274569#)
- How will AI behave, if two scripts are active at a given point that both will request the same (a) LCU, air unit, or (b) say both try to set of a large-max 4 CV TF (assuming there are only 4 available)? Will it be simply the first script in the scripting list gets them, but the 2nd hijacks them and puts them elsewhere? Or does the first reserve them, and the 2nd simply quit since it is not finding enough forces? Or does AI do some risk-gain assessment to assign them to the most useful of both scripts?
- Ending scripts: I would like to create a script that goes "dead" or "defense" not upon fall of a base, or a on certain end date, but that can get stopped also by losses (air/naval/LCU) or lack of supply? Or ideally, also but counting enemy at the assault base(s) (say "dead" if > threshold number of planes)? Can you improvise something like that within the present scripting language? Or will this be a case for the wish-list?
- Also, if I understand correctly "chaining scripts" only works for a one-to-one link, right? There is no way that one script may depend on more than 1 previous one? But more then 1 next script may depend on the same previous one, right? So I could use one "status script", that could control (start or not) more than 1 follow up (kind of a supervising instance for a set of campaign scripts)?
- Starting scripts: Is there a way to add scripts, that have a random starting probability (but defined date)? For example take "Midway", and give it only a certain chance to start (and cancel other scripts that may interfere/request same units)? Can this be done, or is the only random here the variant AI picks at scenario start?
RE: Writing the Downfall AI - p.s. there will spoilers
ORIGINAL: janh
- You said that assigned AI air units will pick bases in the sequence in the list: Does this mean if they will not pick out the ones that are in range of the enemy (and best out of range of his assets), but populate them in sequence, i.e. it is possible that squadrons will end up useless if there is a base on the list that is out of range? (for simplicity: tm.asp?m=2274569#)
IN SEQUENCE AND YES THEY CAN END UP IN THE WRONG PLACE
- How will AI behave, if two scripts are active at a given point that both will request the same (a) LCU, air unit, or (b) say both try to set of a large-max 4 CV TF (assuming there are only 4 available)? Will it be simply the first script in the scripting list gets them, but the 2nd hijacks them and puts them elsewhere? Or does the first reserve them, and the 2nd simply quit since it is not finding enough forces? Or does AI do some risk-gain assessment to assign them to the most useful of both scripts?
1ST SCRIPT IN LIST WHICH IS WHY A LOT OF THE KB SCRIPTS ARE HIGH ON THE LIST AND A LOT OF LATER SCRIPTS ARE SET TO MIN SIZE - AI DOES NOT RISK/GAIN UNLESS I SET THE CV TF TO BE THE AMPHIB LEAD - IF I DO THAT THEN WITHOUT THE CV TF THE SCRIPT DOES NOT FIRE - I TEND NOT TO USE THAT FOR JAPANESE SCRIPTS BECAUSE THE EARLY WAR OPPOSITION IS USUALLY ACCEPTABLE AND I DONT WANT SCRIPTS TO FAIL AS THE AI MUST BE IN MULTIPLE THEATRES AT THE SAME TIME
- Ending scripts: I would like to create a script that goes "dead" or "defense" not upon fall of a base, or a on certain end date, but that can get stopped also by losses (air/naval/LCU) or lack of supply? Or ideally, also but counting enemy at the assault base(s) (say "dead" if > threshold number of planes)? Can you improvise something like that within the present scripting language? Or will this be a case for the wish-list?
NOT POSSIBLE
- Also, if I understand correctly "chaining scripts" only works for a one-to-one link, right? There is no way that one script may depend on more than 1 previous one? But more then 1 next script may depend on the same previous one, right? So I could use one "status script", that could control (start or not) more than 1 follow up (kind of a supervising instance for a set of campaign scripts)?
1 TO MANY YES - MANY TO 1 NO - I USE TRIGGER SCRIPTS A LOT E.G. IF BASE X FALLS THEN SCRIPT Y ACTIVATES
- Starting scripts: Is there a way to add scripts, that have a random starting probability (but defined date)? For example take "Midway", and give it only a certain chance to start (and cancel other scripts that may interfere/request same units)? Can this be done, or is the only random here the variant AI picks at scenario start?
NO ITS DONE AT THE MACRO LEVEL OF SCRIPTS BEING SELECTED
RE: Writing the Downfall AI - p.s. there will spoilers
????ORIGINAL: Andy Mac
-a$$um3
Andy, can you clarify this just a bit? [:D][:D][:D]
Pax
RE: Writing the Downfall AI - p.s. there will spoilers
Sorry its the AI debug command switch was puting it there si I can find it as I am needing to amend all my shortcuts when I work on the May 42 AI
RE: Writing the Downfall AI - p.s. there will spoilers
This is the AI debugger extension it creates the AI debug file
ORIGINAL: PaxMondo
????ORIGINAL: Andy Mac
-a$$um3
Andy, can you clarify this just a bit? [:D][:D][:D]
RE: Writing the Downfall AI - p.s. there will spoilers
Deleted. Got it figured out. THANKS!!!!! works great. awesome. Huge help in deciphering the AI.
Pax
- Dan Nichols
- Posts: 863
- Joined: Mon Aug 29, 2011 11:32 pm
RE: Writing the Downfall AI - p.s. there will spoilers
ORIGINAL: Andy Mac
This is the AI debugger extension it creates the AI debug fileORIGINAL: PaxMondo
????ORIGINAL: Andy Mac
-a$$um3
Andy, can you clarify this just a bit? [:D][:D][:D]
Where does the AI debugger file end up? Do we use this as a command switch with the WitPAE exe file?
I think that the two obligations you have are to be good at what you do and then to pass on your knowledge to a younger person
