Results 1 to 10 of 10

Thread: Battle formations

  1. #1

    Default Battle formations

    When I start battle, large group of spearmen is on my right and enemies have them on opposite side. Is there some historical reason for this? When we start fighting they have an advantage on one side and me on another and nothing to fight cavalry on other side. I have to realign them before every battle and move to left to make armies face each other.

    Also I wasnt able to make custom battle to fight units one vs one. Enemies attacked center, grouped on one side with other side left undefended for flanking by my free first line infantry. I had to replace decr_formations_AI with file from another mod to make that battle. Now armies are aligned correctly, but I have a medieval setting with archers in front and other stuff. I think there might be some mistake in that file.

  2. #2

    Default Re: Battle formations

    Quote Originally Posted by YourMadDoc View Post
    When I start battle, large group of spearmen is on my right and enemies have them on opposite side. Is there some historical reason for this? When we start fighting they have an advantage on one side and me on another and nothing to fight cavalry on other side. I have to realign them before every battle and move to left to make armies face each other.
    AFAIK the right side was reserved to noble/elite regiments in the Hellenic kingdoms and possibly Persia.

  3. #3

    Default Re: Battle formations

    The right wing was under hellenistic armies the wing of honor. So I normally deploy the highest tier troops there while low level or mercenaries are deployed on the left. I think it was similar to a certain degree with the Romans. There I deploy faction troops in the middle, auxiliaries on the wings. But the equites romani and a second FM always on the right.
    For other cultures I don't know and I think the AI deployment reflects this in one way or the other.

  4. #4

    Default Re: Battle formations

    The "infantry on the right" thing, though accurate, is very annoying during sieges if the enemy sallies as you've then got to haul your army halfway across the map to contest it.

  5. #5

    Default Re: Battle formations

    I seem to remember z3n saying the formations file is incredibly buggy, which is why we manipulate it as little as possible.

  6. #6

    Default Re: Battle formations

    Im changing default formation following Darth Vader's turotials here http://forums.totalwar.org/vb/showth...g-Formation-AI ; http://forums.totalwar.org/vb/showth...ion-2%E2%80%9D

    It is not so historical, but it is symmetric and understandable to the AI and armies attack each other in the center. With new formation enemy army stayed for a while on a place, shoot all arrows and then they attacked, before they just attacked. They focused center too much, but it was probably because they had a smaller formation. Still better as having them grouped on one side. https://imgur.com/a/lwSdH

    code
    Spoiler Alert, click show to read: 
    Code:
    begin_formation ai_triple_missiles_in_front
        ;;; purpose flags
        defend                                                ; can use this for anything
        attack
        ai_priority     1.0
       
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        ;;; the infantry units
        begin_block 0 ;core center
            unit_type               phalanx    1.0
            default_melee_state        defend
            unit_formation          phalanx
            unit_density            close
            min_unit_width            30  
            max_unit_width            40  
            block_formation         line
            block_relative_pos      0 0.0 -10
            inter_unit_spacing      0.2
            priority                1
        end_block  
        
              begin_block 1      ; core side (it might have one unit more as other side as it will be filled first)
            max_units               3
            unit_type               heavy infantry      1.0
            unit_type               spearmen infantry      0.9  
            unit_type               light infantry      0.2
    ;        default_melee_state    defend
            unit_density            close
            min_unit_width            20  
            max_unit_width            20
            block_formation         line
            block_relative_pos      0 1.0 0.0
            inter_unit_spacing      3.0
            priority                1.0        
        end_block
        
        begin_block 2    ;core side 2
            max_units               3
            unit_type               heavy infantry      1.0
            unit_type               spearmen infantry      0.9  
            unit_type               light infantry      0.2
            unit_density            close
            min_unit_width            20
            max_unit_width            20
            block_formation         line
            block_relative_pos      0 -1.0 0.0
            inter_unit_spacing      3.0
            priority                1.0        
        end_block
        
        begin_dummy_block 3 , 1 line inf
            spans 0 1 2 
        end_dummy_block
        
        ;;;;;;;;;;;;;;;;;;;;;;;SCREEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        ;;; the missile units
        begin_block 4
            max_units               1
            unit_type               skirmish infantry    1.0
            unit_density            loose
            min_unit_width            20
            max_unit_width            30
            block_formation         line
            block_relative_pos      1 0.0 5.0
            inter_unit_spacing      3.0
            priority                1.0
        end_block
        
        begin_block 5
            max_units               1
            unit_type               skirmish infantry    1.0
            unit_density            loose
            min_unit_width            20
            max_unit_width            30
            block_formation         line
            block_relative_pos      2 0.0 5.0
            inter_unit_spacing      3.0
            priority                0.9
        end_block    
    
    
        begin_dummy_block 6 ; screen
            spans 4 5 
        end_dummy_block
        
              ;;;;;;;;;;;;;;;;;;;;;;; INFANTRY II LINE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        begin_block 7     ;anticav flanker side 2 (it might have one unit more as other side as it will be filled first)
            max_units               2
            unit_type               spearmen infantry      1.0
            unit_density            close
            min_unit_width            25
            max_unit_width            25
            block_formation         line
            block_relative_pos      3 -0.1 -5.0
            inter_unit_spacing      5.0
            priority                0.9        
        end_block
                
        begin_block 8   ;anticav flanker side 
            max_units               2    
            unit_type               spearmen infantry      1.0
            unit_density            close
            min_unit_width            20 
            max_unit_width            20
            block_formation         line
            block_relative_pos      3 0.1 -5.0
            inter_unit_spacing      5.0
            priority                0.9
        end_block
        
        begin_block 9  ;reserves
            max_units               6
            unit_type               skirmish infantry    1
            unit_type               light infantry      0.8
            unit_type               heavy infantry   0.75
            unit_type               spearmen infantry      0.5
        ;default_melee_state    fire_at_will_and_skirmish
            unit_density            close
            min_unit_width            30
            max_unit_width            30
            block_formation         line
            block_relative_pos      3 0.0 -10  
            inter_unit_spacing      0.0
            priority                0.9
        end_block      
    
    
        begin_dummy_block 10 ; 2 line inf
            spans 7 8 9 
        end_dummy_block
        
        begin_dummy_block 11 ; 1 and 2 lines of inf + screen 
            spans 3 6 9
        end_dummy_block
    
    
        ;;;;;;;;;;;;;;;;;;;;;; CAVALRY ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        
        begin_block 12  ; ranged cav side 1 (it might have one unit more as other side as it will be filled first)
            max_units 5
            unit_type               skirmish cavalry    1.0
            unit_type               missile cavalry       1.0
            default_melee_state        fire_at_will_and_skirmish
            unit_density            close
            min_unit_width            20
            max_unit_width            20
            block_formation         line
            block_relative_pos      11 70.0 -5.0
            inter_unit_spacing      10.0
            priority                1.0
        end_block
        begin_block 13 ; ranged cav side 2
            max_units 5
            unit_type               skirmish cavalry    1.0
            unit_type               missile cavalry       1.0
            default_melee_state        fire_at_will_and_skirmish
            unit_density            close
            min_unit_width            20
            max_unit_width            20
            block_formation         line
            block_relative_pos      11 -70.0 -5.0
            inter_unit_spacing      10.0
            priority                1.0
        end_block    
        
        begin_block 14 ; rest of cav side 2 heavy on end  (it might have one unit more as other side as it will be filled first)
            unit_type               heavy cavalry       0.8
            unit_type               spearmen cavalry    0.9
            unit_type               light cavalry       1
            unit_type               skirmish cavalry    1.0
            default_melee_state        fire_at_will_and_skirmish
            unit_density            close
            min_unit_width            20
            max_unit_width            20
            block_formation         line
            block_relative_pos      11 -90.0 -40.0
            inter_unit_spacing      3.0
            priority                0.9
        end_block
        
        begin_block 15 ; rest of cav side 1 heavy on end
            unit_type               heavy cavalry       0.8
            unit_type               spearmen cavalry    0.9
            unit_type               light cavalry       1
            unit_type               skirmish cavalry    1.0
            default_melee_state        fire_at_will_and_skirmish
            unit_density            close
            min_unit_width            20
            max_unit_width            20
            block_formation         line
            block_relative_pos      11 90.0 -40.0
            inter_unit_spacing      10.0
            priority                0.9
        end_block
    
    
       ;;;;;;;;;;;;;;;;;;;;;; REST ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     
        begin_block 16 ; all remaining units will be placed here
            unit_type                   handler             1.0
            unit_type                   siege               1.0
            unit_type                   missile infantry    0.6 
            unit_type                   skirmish infantry   0.5
            unit_type              any                 0.2         
            default_melee_state            fire_at_will_and_skirmish
            min_unit_width                20
            max_unit_width                20
            block_formation             line
            block_relative_pos          11 0.0 -10.0
            inter_unit_spacing          1.0
            priority                    0.2
        end_block
    
    
        ;;; special general block
        begin_block 17
            min_units               1
            max_units               1
            unit_type               general_unit            1.0
            unit_density            close
            block_formation         line
            block_relative_pos      16 0 -1.0
            inter_unit_spacing      1.0
            priority                1.0
        end_block
    
    
        main_line 5
    
    
    end_formation
    Last edited by YourMadDoc; November 09, 2017 at 01:47 AM. Reason: removed second end formation command

  7. #7

    Default Re: Battle formations

    I have done some more adjustments and I had some improvements in Atnigonos vs Pyrrhos battle https://imgur.com/a/lwSdH

    AI for battle formations don't work very well on custom battles and I'm running out of large battles to experiment on. I would be glad if someone shared saves with large battles for testing. Battle with enemy reinforcements with
    phalanx would be perfect as I want to try to combine different battle formations to make AI disable phalanx unit formation on a march.

    Here is the file. I hope it is ok to upload it.
    Attached Files Attached Files

  8. #8

    Default Re: Battle formations

    I have done some changes to default formation again, changed player made group formation to take skirmishers as archers and placed them further from the middle, placed cavalry a bit further from the main army to partially hold initial setup. Reinforcements seem to be a bit less mindless as well. I have found two ai formations in decsr_formations.txt file so I moved them to decsr_formations_ai.txt. One was assault wall formation by Germanicu5 (or it was for his script idk) and other one was anti-cavalry field formation. It is very closed formation so I added defend flag for it and created new wider anti-infantry formation with attack flag. So now ai has three formations to pick from - default, anti-infantry/attack or anitcavalry/defense formation. Unfortunately, they change their picked formation to default after I start playing, but hopefully this is a problem with flags and priority ratios between formations. Examples of formations in the album.
    Last edited by YourMadDoc; November 11, 2017 at 01:09 PM.

  9. #9
    VektorT's Avatar Biarchus
    Join Date
    Oct 2008
    Location
    Brazil
    Posts
    694

    Default Re: Battle formations

    I think your efforts are very valorous and I eager to see how far you can push it, but from my experience in MTW2 as player of multiple mods and submods for some years and occasionally a cheap modder myself, I think you may be banging your head against a brick wall. I saw a lot of different takes on BAI and formations, and while they do improve from vanilla, they never really come closes to anything formidable and the AI always seens to ruin everything as soon it starts to move to engage and really starts to scream "I'M RETAAARDEEED" when the battle actually begin. I played TW from the very first Shogun and I don't think there is a single TW ever with a BAI (or CAI) really serviceable. It is the most underdevelop part of the series by far IMO and there is limited success for any modder trying to do what developer not even coded right.

  10. #10

    Default Re: Battle formations

    I cant do much with BAI, once first melee contact is made they all go for it leaving their formation. However, with proper formations, I can make them engage in the first contact correctly and effectively with the whole formation. When I started testing on Pyrhoss vs Antigonos battle, Pyrhoss attacked me uphill, massed units on my left. Now he places his army on top of a hill and waits for me there. He still sends skirmishers and skirmish cavalry to harass me, and once I engage them in a melee fight, he attacks, but at least he is attacking downhill now. He shouldn't be attacking at all as I am the attacker, even if I have a much weaker army.

Posting Permissions

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