I've trained AI to use fighters against ground units

FearSunn

Warlord
Joined
Dec 10, 2017
Messages
277
Finally, I've found the way how to mod AI to use fighter class air units to attack ground targets.
In this short video biplanes actively and effectively attack infantry and a tank:
(sorry for video quality and audio seems out of sinc. I am crap at capturing videos)
 
@FearSunn I have another question: would you please pass the lines of code/settings to make those damned planes fly faster, as in your video? What did you modify to achieve that?
 
@FearSunn I have another question: would you please pass the lines of code/settings to make those damned planes fly faster, as in your video? What did you modify to achieve that?
Oh I am sorry. The faster speed you see is something unexpected from video capturing software I used. This actually my first screen capture video I've made in my life :) And probably the last one.
 
Oh I am sorry. The faster speed you see is something unexpected from video capturing software I used. This actually my first screen capture video I've made in my life :) And probably the last one.

Argh! Oh well, looked to good to be true, I have been searching for the stupid lines since forever, as the planes fly in slow motion even with fast movement enabled... anyways, I hope you can really improve the AI use of air units, as they are now, it's just non-existent...
 
Argh! Oh well, looked to good to be true, I have been searching for the stupid lines since forever, as the planes fly in slow motion even with fast movement enabled... anyways, I hope you can really improve the AI use of air units, as they are now, it's just non-existent...

I'm now envisioning a worse case scenario, where the AI starts building and flying planes all over the place, for no particular cause or effect other than to slow down the game as you watch in slow motion as the AI bombs an enemy city with 0 health for the 14th turn in a row ...
 
I'm now envisioning a worse case scenario, where the AI starts building and flying planes all over the place, for no particular cause or effect other than to slow down the game as you watch in slow motion as the AI bombs an enemy city with 0 health for the 14th turn in a row ...

The slow motion with fast movement enabled is just another bug that will never be addressed by FXS, and to make things worse, they seem to have made the speed variables hidden this time (for civ 5, the code was accessible, I have a little personal mod that makes the planes zoom around to avoid this problem, and there is also a public mod for the same).
 
Finally, I've found the way how to mod AI to use fighter class air units to attack ground targets.
In this short video biplanes actively and effectively attack infantry and a tank:
(sorry for video quality and audio seems out of sinc. I am crap at capturing videos)
Now you've taught the Civ VI AI to do what every other iteration of Civ game AI has long been trained in, and that some - like Civ II, notoriously, make such "locust cloud" raids of fighter units against land armies ad nauseum if they're in stock. Such a slow learner Civ VI is...
 
I hope you succeed in creating a mod with this feature!
My expectation is Firaxis is also working on the issue to fix it with pre-expansion update. In that case this modification will not be needed.
At least until then I am not making it public.
 
Nice job! But I didn't understand if you created a Mod with this feature or not, are you working on it?
 
@FearSunn: Nice! Can you look at making the AI players try to use Aircraft Carriers too, please?

I second this !!! Airacft carriers are key in global defense !!

I know this is a bomber but ... the AI bomber was positioned next to my tank for 25+ turns of pure war did it decide to attack
 

Attachments

  • 6DAD8CF0-7FB7-41D2-90CA-4E6F47B48040.jpeg
    6DAD8CF0-7FB7-41D2-90CA-4E6F47B48040.jpeg
    2 MB · Views: 193
Last edited by a moderator:
Now THAT is a very high expectation... I used to have it for the first 6 months after release. Now I don't have any, anymore.
It would be outrageous if air combat issues (fighter class AI, carriers) is not touched with upcoming update. I just cant imagine this glaring AI holes could be further ignored by devs.
Anyway I will proceed with testing current modifications and will report here about the progress. The problem with testing AI is that it requires a brand new game to be started to take effect. Probably game engine cashes all AI data on creation and ignores further changes.
Btw could anyone suggest me ingame screen capturing software for better video results?
 
In my simple tests vanilla fighters (and modded bombers with the "UNITTYPE_AIR" <AiType> added) do attack your units, but I don't have R&F, is this an issue with the expansion only ?

Personally I use OBS for video capture.
 
In my simple tests vanilla fighters (and modded bombers with the "UNITTYPE_AIR" <AiType> added) do attack your units, but I don't have R&F, is this an issue with the expansion only ?

Personally I use OBS for video capture.
My tests are made with R&F. Havent played vanilla since RF release. Never seen unmodded fighters attack ground units with RF.
 
quick test, Civ6 without R&F:

only change to units being:
Code:
INSERT OR REPLACE INTO UnitAiInfos
            (UnitType,        AiType)
    SELECT    UnitType,     'UNITTYPE_AIR'
    FROM UnitAiInfos WHERE AiType ='UNITTYPE_AIR_SIEGE';

else the bomber would not attack.
 
Top Bottom