i have set my hastati to be like skirmishers(i removed the PREC attribute from the edu) because i have read about a way to disable skirmish mode on AI formations...

So i write this formation modifying one of darth vader
begin_formation ai_maniple_line3

;;; purpose flags
attack ; can use this for anything
defend
ai_priority 0.05
supported_factions romans_julii,britons,slave





;; First line of infantry
begin_block 0
min_units 3
unit_type light infantry 0.9
unit_type heavy infantry 0.7
default_melee_state fire_at_will
unit_formation square, testudo, wedge, phalanx
;unit_formation square, testudo
;unit_density loose, close
max_unit_width 20
block_formation line
block_relative_pos 0 0.0 0.0
inter_unit_spacing 20.0
priority 1.0
end_block

;; second line of infantry
begin_block 1
min_units 3
unit_type heavy infantry 1.0
unit_type light infantry 0.1
default_melee_state fire_at_will
unit_formation square, testudo, wedge, phalanx
;unit_formation square, testudo
;unit_density loose, close
max_unit_width 20
block_formation line
block_relative_pos 0 0.0 -12.0
inter_unit_spacing 20.0
priority 1.0
end_block

;; 3rd line of infantry(going to the triarii!)
begin_block 2
max_units 4
unit_type spearmen 1.0
unit_type light infantry 0.6
unit_type heavy infantry 0.6
default_melee_state fire_at_will
unit_formation square, testudo, wedge, phalanx
;unit_formation square, testudo
;unit_density loose, close
max_unit_width 20
block_formation line
block_relative_pos 1 0.0 -12.0
inter_unit_spacing 20.0
priority 1.0
end_block

;; Archers behind
begin_block 3
unit_type ranged_missile_infantry 1.0
unit_type light infantry 0.4
unit_type heavy infantry 0.4
unit_type spearmen 0.8
unit_type any 0.0
default_melee_state fire_at_will
unit_formation square, testudo, wedge, phalanx
;unit_formation square, testudo
;unit_density loose, close
block_formation line
block_relative_pos 2 0.0 -12.0
inter_unit_spacing 0.2
priority 1.0
end_block
Now it takes all my hastati on manipolar formation but they run away anyway.
Any idea...