Results 1 to 12 of 12

Thread: AI using generals

  1. #1

    Default AI using generals

    Hi guys, would you mind to share if you have any information or knowledge how to make AI using generals in its armies in a smarter way? I was trying to modify the campaign_ai for SSHIP and I noticed that sometimes armies appeared that are only led by captains, while some others are led by 2,3 or more generals? EB is well developed in many aspect, I hope maybe somebody will know the answer?

  2. #2

    Default Re: AI using generals

    RTR8 gave its generals the skirmishing behavior, which immediately prevented them from blindly charging into the player's frontlines. However, it also made it a pain to chase those generals down. This may be a good thing though - you can no longer guarantee a win just by killing the general whether it's through AI stupidity or player swarming.

    Edit: I read the question wrong, but my answer could still be useful if you want smarter battle AI.

  3. #3

    Default Re: AI using generals

    Disable the rebelling armies in the descr_strat first thing. The ai used to lose a lot of troops this way, and it is also kinda unrealistic that entire armies go rogue just for the sake of it. As for generals, i think the ai behaviour is somewhat hardcoded you can't change it, sometimes they lead armies with generals sometimes they don't. If you don't like kamikaze generals go to the export_descr_unit and change all bodyguards from " heavy cavalry " to skirmish or light cav... this way generals last longer in the battlemap.

  4. #4

    Default Re: AI using generals

    Ok, thank you for your replies! I found in the forum some information about this, two points that may be relevant to the problem:
    1. Lowering the generals second hit points variable in EDU is could work as help for ai to consider generals as weaker unit and give them some additional units for protection.
    2. Maybe lowering the price of the bodyguard unit will make ai adopting more generals and sending them with the armies instead of keeping in settlements..
    I will test these two variables, maybe will find out something.

  5. #5
    Roma_Victrix's Avatar Call me Ishmael
    Join Date
    Sep 2010
    Location
    Virginia, USA
    Posts
    15,240

    Default Re: AI using generals

    Quote Originally Posted by Shoebopp View Post
    RTR8 gave its generals the skirmishing behavior, which immediately prevented them from blindly charging into the player's frontlines. However, it also made it a pain to chase those generals down. This may be a good thing though - you can no longer guarantee a win just by killing the general whether it's through AI stupidity or player swarming.

    Edit: I read the question wrong, but my answer could still be useful if you want smarter battle AI.
    Quote Originally Posted by randy_cat View Post
    Disable the rebelling armies in the descr_strat first thing. The ai used to lose a lot of troops this way, and it is also kinda unrealistic that entire armies go rogue just for the sake of it. As for generals, i think the ai behaviour is somewhat hardcoded you can't change it, sometimes they lead armies with generals sometimes they don't. If you don't like kamikaze generals go to the export_descr_unit and change all bodyguards from " heavy cavalry " to skirmish or light cav... this way generals last longer in the battlemap.
    Awesome! I didn't realize this was an option for making bodyguard units more cautious as AI units on the battlefield, and hence having a greater chance to survive longer or flee the battle altogether. Thanks for sharing and +1 rep to each of you.

  6. #6

    Default Re: AI using generals

    Quote Originally Posted by Macaras View Post
    2. Maybe lowering the price of the bodyguard unit will make ai adopting more generals and sending them with the armies instead of keeping in settlements..
    This won't do anything, the mechanics of creating new named characters are completely separate.

  7. #7
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI using generals

    Merge algorithm is broken for the AI, there's no real fix afaik. We tried many things in EBII, maybe you will find something but we never did.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  8. #8

    Default Re: AI using generals

    Ok, guys, thank you for answering ! You are right being skeptical about this.. I changed the prices and hitpoints of the bodyguard units just to test a little, but I don't see any difference. Many settlements are still with just one general and no other accompanying units.
    The situation is not very bad, though, many armies, especially if the ai has some time in peace to prepare the invasion, are full stacks with generals. I just thought that there is some way of improving, making most of the big armies having generals.
    Last edited by Macaras; May 10, 2022 at 06:01 PM.

  9. #9

    Default Re: AI using generals

    Quote Originally Posted by Macaras View Post
    Ok, guys, thank you for answering ! You are right being skeptical about this.. I changed the prices and hitpoints of the bodyguard units just to test a little, but I don't see any difference. Many settlements are still with just one general and no other accompanying units.
    The situation is not very bad, though, many armies, especially if the ai has some time in peace to prepare the invasion, are full stacks with generals. I just thought that there is some way of improving, making most of the big armies having generals.
    Named characters aren't recruitable in EBII, so changing their price isn't going to have any effect whatsoever.

  10. #10
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,434

    Default Re: AI using generals

    Quote Originally Posted by QuintusSertorius View Post
    Named characters aren't recruitable in EBII, so changing their price isn't going to have any effect whatsoever.
    We're actually just hesistating whether to switch recruitment of the generals off for the AI. The reason to keep it in is to make the AI field more generals. However, maybe it doesn't make sense (eg. because the AI gets adoption proposals in the same way the player does).
    Can you elaborate a bit on the reasons to make named characters (Bodyguard units) not recruitable?
    JoC
    Mod leader of the SSHIP: traits, ancillaries, scripts, buildings, geography, economy.
    ..............................................................................................................................................................................
    If you want to play a historical mod in the medieval setting the best are:
    Stainless Steel Historical Improvement Project and Broken Crescent.
    Recently, Tsardoms and TGC look also very good. Read my opinions on the other mods here.
    ..............................................................................................................................................................................
    Reviews of the mods (all made in 2018): SSHIP, Wrath of the Norsemen, Broken Crescent.
    Follow home rules for playing a game without exploiting the M2TW engine deficiencies.
    Hints for Medieval 2 moders: forts, merchants, AT-NGB bug, trade fleets.
    Thrones of Britannia: review, opinion on the battles, ideas for modding. Shieldwall is promising!
    Dominant strategy in Rome2, Attila, ToB and Troy: “Sniping groups of armies”. Still there, alas!

  11. #11

    Default Re: AI using generals

    Quote Originally Posted by Jurand of Cracow View Post
    We're actually just hesistating whether to switch recruitment of the generals off for the AI. The reason to keep it in is to make the AI field more generals. However, maybe it doesn't make sense (eg. because the AI gets adoption proposals in the same way the player does).
    Can you elaborate a bit on the reasons to make named characters (Bodyguard units) not recruitable?
    JoC
    It breaks any dynastic system being used by the AI (we have enough trouble with the heir wandering a long way from the historical line already) for one, and I think it messes with the games own characters-to-regions ratio as well.

  12. #12

    Default Re: AI using generals

    Quote Originally Posted by randy_cat View Post
    Disable the rebelling armies in the descr_strat first thing. The ai used to lose a lot of troops this way, and it is also kinda unrealistic that entire armies go rogue just for the sake of it.
    How to do this please?
    Furthermore I believe capitalism must be destroyed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •