Results 1 to 7 of 7

Thread: Disable battle AI possible?

  1. #1

    Default Disable battle AI possible?

    Hello,

    is there a way to disable/halt the enemy AI during battles or make them at least extremely passive?
    I'm trying to modify some units and weapons and for testing the results of my changes it would be very helpful if the AI troops were just idling around, not moving, attacking, retreating etc.

    I've tried playing around with the config_ai_battle.xml and battle_config.xml files, but so far the changes I've done haven't had much effect at all. Am I even looking in the right files? Any help much appreciated. Thanks.

  2. #2

    Default Re: Disable battle AI possible?

    Ok, I found a workaround for this. I'm using M2 Kingdoms, so that makes it possible to use the move_speed_mod line in the export_descr_unit.txt.

    I added "move_speed_mod 0.001" to the unit of my choice (in this case peasants), so they're now completely immobile and can be used as static targets. "0.0" works as well, but the units become invisible when zooming in. With "0.001" this doesn't happen.

  3. #3
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Disable battle AI possible?

    I've seen it done but didn't know how. Thanks for sharing your solution.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: Disable battle AI possible?

    Slowing down individual units will be the only solution - doing it via actual AI programming is close to impossible from what I know about it. Not sure if 'freezing' a faction's AI extends to battles, it certainly will not extend to custom battles as the freeze is via script.










  5. #5

    Default Re: Disable battle AI possible?

    Just for the record: The move_speed_mod line presumably needs to be placed right under the attributes line. Placing it elsewhere (e.g. at the very end, below recruit_priority_offset) crashed the game for me.

    Code:
    [...]
    banner holy      crusade
    soldier          EE_Peasants, 60, 0, 0.8
    attributes       sea_faring, hide_forest, can_withdraw, is_peasant, peasant
    move_speed_mod   X.XXX
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         3, 0, no, 0, 0, melee, melee_simple, piercing, spear, 25, 0.6
     [...]

    Quote Originally Posted by Gigantus View Post
    [...]Not sure if 'freezing' a faction's AI extends to battles, it certainly will not extend to custom battles as the freeze is via script.
    Yeah, I tried it in campaign mode with the disable_ai console command, however that did not affect battles in any way.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: Disable battle AI possible?

    Placement of 'move' line is indeed fixed. It may not be present but it may not be in a different place.










  7. #7
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: Disable battle AI possible?

    Quote Originally Posted by Gigantus View Post
    Slowing down individual units will be the only solution - doing it via actual AI programming is close to impossible from what I know about it. Not sure if 'freezing' a faction's AI extends to battles, it certainly will not extend to custom battles as the freeze is via script.
    Yep, it's not really possible to disable the AI as the basic functions are programmed directly into the exe, not just inside of the various configuration files.
    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)

Posting Permissions

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