1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

I've trained AI to use fighters against ground units

Discussion in 'Civ6 - General Discussions' started by FearSunn, Nov 29, 2018.

  1. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    272
    Gender:
    Male
    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)
     
  2. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    1,934
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Intriguing development @FearSunn , hope to get further info.
     
  3. Aristos

    Aristos Lightseeker

    Joined:
    Dec 11, 2001
    Messages:
    3,575
    Gender:
    Male
    Location:
    Deep inside...
    @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?
     
  4. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    272
    Gender:
    Male
    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.
     
    Icicle likes this.
  5. Aristos

    Aristos Lightseeker

    Joined:
    Dec 11, 2001
    Messages:
    3,575
    Gender:
    Male
    Location:
    Deep inside...
    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...
     
  6. Trav'ling Canuck

    Trav'ling Canuck Warlord Supporter

    Joined:
    Feb 7, 2018
    Messages:
    2,864
    Gender:
    Male
    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 ...
     
    679x, Bosque, Socrates99 and 2 others like this.
  7. Aristos

    Aristos Lightseeker

    Joined:
    Dec 11, 2001
    Messages:
    3,575
    Gender:
    Male
    Location:
    Deep inside...
    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).
     
  8. Tomice

    Tomice Passionate Smart-Ass

    Joined:
    Oct 5, 2009
    Messages:
    2,296
    Location:
    Austria, EU, no kangaroos ;)
    I hope you succeed in creating a mod with this feature!
     
  9. Patine

    Patine Warlord

    Joined:
    Feb 14, 2011
    Messages:
    3,978
    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...
     
  10. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    272
    Gender:
    Male
    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.
     
    nzcamel and chrisgatt7 like this.
  11. Aristos

    Aristos Lightseeker

    Joined:
    Dec 11, 2001
    Messages:
    3,575
    Gender:
    Male
    Location:
    Deep inside...
    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.
     
  12. Tomice

    Tomice Passionate Smart-Ass

    Joined:
    Oct 5, 2009
    Messages:
    2,296
    Location:
    Austria, EU, no kangaroos ;)
    They are really slow about fixing bugs and even worse when it comes to questionable design decisions (chopping overflow as most glaring example).
     
    bumpyglint likes this.
  13. bumpyglint

    bumpyglint Chieftain

    Joined:
    Aug 19, 2016
    Messages:
    60
    Nice job! But I didn't understand if you created a Mod with this feature or not, are you working on it?
     
  14. Bate1999

    Bate1999 Chieftain

    Joined:
    Dec 22, 2010
    Messages:
    72
    @FearSunn: Nice! Can you look at making the AI players try to use Aircraft Carriers too, please?
     
  15. chrisgatt7

    chrisgatt7 Chieftain

    Joined:
    Mar 26, 2013
    Messages:
    327
    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
     

    Attached Files:

    Last edited by a moderator: Dec 1, 2018
  16. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,822
    Gender:
    Male
    Location:
    Hungary
    FearSunn, pls don't wait for FXS to release a patch before GS - just give us this Christmas present AI fix :)
     
    DemonMaster likes this.
  17. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    272
    Gender:
    Male
    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?
     
  18. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,649
    Location:
    France
    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.
     
  19. FearSunn

    FearSunn Chieftain

    Joined:
    Dec 10, 2017
    Messages:
    272
    Gender:
    Male
    My tests are made with R&F. Havent played vanilla since RF release. Never seen unmodded fighters attack ground units with RF.
     
  20. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    8,649
    Location:
    France
    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.
     
    Infixo and Laurana Kanan like this.

Share This Page