Results 1 to 30 of 31

Thread: default_melee_state

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: default_melee_state

    these are the only open battle formations in my formations_ai file;

    Code:
    begin_formation ai_cavalry_attack
    ;;; purpose flags
            attack
    	ai_priority			3.0
    
    	begin_dummy_block 0
    		spacer			0.0 0.0 120 30
    	end_dummy_block
    
    	;; Dumb-behind way of deploying, temporary hack!!!
    	begin_block 1
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_type		any				0.01
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	0 0.0 -18.0
    		inter_unit_spacing	120.0
    		priority		0.9
    	end_block
    
    end_formation
    
    begin_formation ai_precursor_defend
    ;;; purpose flags
    	defend
    	ai_priority			3.0
    
    	begin_dummy_block 0
    		spacer			0.0 0.0 240 30
    	end_dummy_block
    
    	;; First line of infantry
    	begin_block 1
    		min_units		3
    		max_units		5
    		unit_type		light_pilum_infantry		1.0
    		unit_type		heavy_pilum_infantry		0.9
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	0 0.0 -18.0
    		inter_unit_spacing	12.0
    		priority		1.0
    	end_block
    
    	;; First Cohorts in second line
    	begin_block 2
    		min_units		2
    		max_units		3
    		unit_type		skirmish infantry		1.0
    		unit_type		heavy_pilum_infantry		0.2
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	1 0.0 -12.0
    		inter_unit_spacing	10.0
    		priority		1.0
    	end_block
    
    	;; Second line of infantry left
    	begin_block 3
    		max_units		1
    		unit_type		heavy_pilum_infantry		0.9
    		unit_type		light_pilum_infantry		0.1
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	2 -12.0 0.0
    		inter_unit_spacing	12.0
    		priority		0.8
    	end_block
    
    	;; Second line of infantry right
    	begin_block 4
    		max_units		1
    		unit_type		heavy_pilum_infantry		0.9
    		unit_type		light_pilum_infantry		0.1
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	2 12.0 0.0
    		inter_unit_spacing	12.0
    		priority		0.8
    	end_block
    
    	;; Spearmen
    	begin_block 5
    		max_units		4
    		unit_type		spearmen			1.0
    		unit_density			close
    		block_formation			line
    		block_relative_pos	2 0.0 -12.0
    		inter_unit_spacing	18.0
    		priority		1.0
    	end_block
    
    	;; Achers behind the other infantry
    	begin_block 6
    		max_units		5
    		unit_type		ranged_missile_infantry		1.0
    		default_melee_state		fire_at_will_and_skirmish
    		unit_density			close
    		block_formation			line
    		block_relative_pos	5 0.0 -12.0
    		inter_unit_spacing	3.0
    		priority		1.0
    	end_block
    
    	;; Elephants
    	begin_block 7
    		unit_type		elephants			1.0
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	6 0.0 -12.0
    		inter_unit_spacing	12.0
    		priority		0.8
    	end_block
    
    	begin_dummy_block 8
    		spans  1 2 3 4 5 6 7
    	end_dummy_block
    
    	;; Siege equipment
    	begin_block 9
    		unit_type		siege				1.0
    		unit_type		any				0.01
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	8 0.0 -12.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Cavalry on inner left wing
    	begin_block 10
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_density			close
    		block_formation			line
    		block_relative_pos	8 -24.0 -6.0
    		inter_unit_spacing	2.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on inner right wing
    	begin_block 11
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_density			close
    		block_formation			line
    		block_relative_pos	8 24.0 -6.0
    		inter_unit_spacing	2.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on outer left wing
    	begin_block 12
    		unit_type		light cavalry			1.0
    		unit_type		heavy cavalry			0.8
    		unit_density			close
    		block_formation			line
    		block_relative_pos	10 15.0 -6.0
    		inter_unit_spacing	2.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on outer wing
    	begin_block 13
    		unit_type		light cavalry			1.0
    		unit_type		heavy cavalry			0.8
    		unit_density			close
    		block_formation			line
    		block_relative_pos	11 -15.0 -6.0
    		inter_unit_spacing	2.0
    		priority		0.9
    	end_block
    
    	begin_dummy_block 14
    		spans 10 12
    	end_dummy_block
    
    	begin_dummy_block 15
    		spans 11 13
    	end_dummy_block
    
    	begin_dummy_block 16
    		spans 8 9 14 15
    	end_dummy_block
    
    	;; Generals unit
    	begin_block 17
    		min_units		1
    		unit_type		general_unit			1.0
    		unit_density			close
    		block_formation			line
    		block_relative_pos	16 0.0 -12.0
    		inter_unit_spacing	12.0
    		priority		1.0
    	end_block
    
    end_formation
    
    begin_formation ai_precursor_attack
    ;;; purpose flags
            attack
    	ai_priority			3.0
    
    	begin_dummy_block 0
    		spacer			0.0 0.0 240 30
    	end_dummy_block
    
    	;; First line of infantry
    	begin_block 1
    		min_units		3
    		max_units		5
    		unit_type		light_pilum_infantry		1.0
    		unit_type		heavy_pilum_infantry		0.9
    		default_melee_state		fire_at_will
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	0 0.0 -18.0
    		inter_unit_spacing	24.0
    		priority		1.0
    	end_block
    
    	;; First Cohorts in second line
    	begin_block 2
    		min_units		2
    		max_units		3
    		unit_type		skirmish infantry		1.0
    		unit_type		heavy_pilum_infantry		0.2
    		default_melee_state		fire_at_will
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	1 0.0 -12.0
    		inter_unit_spacing	24.0
    		priority		1.0
    	end_block
    
    	;; Second line of infantry left
    	begin_block 3
    		max_units		1
    		unit_type		heavy_pilum_infantry		0.9
    		unit_type		light_pilum_infantry		0.1
    		default_melee_state		fire_at_will
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	2 -24.0 0.0
    		inter_unit_spacing	24.0
    		priority		0.8
    	end_block
    
    	;; Second line of infantry right
    	begin_block 4
    		max_units		1
    		unit_type		heavy_pilum_infantry		0.9
    		unit_type		light_pilum_infantry		0.1
    		default_melee_state		fire_at_will
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	2 24.0 0.0
    		inter_unit_spacing	24.0
    		priority		0.8
    	end_block
    
    	;; Spearmen
    	begin_block 5
    		max_units		4
    		unit_type		spearmen			1.0
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	2 0.0 -24.0
    		inter_unit_spacing	32.0
    		priority		1.0
    	end_block
    
    	;; Achers behind the other infantry
    	begin_block 6
    		max_units		5
    		unit_type		ranged_missile_infantry		1.0
    		default_melee_state		fire_at_will_and_skirmish
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	5 0.0 -12.0
    		inter_unit_spacing	0.2
    		priority		1.0
    	end_block
    
    	;; Elephants
    	begin_block 7
    		unit_type		elephants			1.0
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	6 0.0 -12.0
    		inter_unit_spacing	18.0
    		priority		0.8
    	end_block
    
    	begin_dummy_block 8
    		spans  1 2 3 4 5 6 7
    	end_dummy_block
    
    	;; Siege equipment
    	begin_block 9
    		unit_type		siege				1.0
    		unit_type		any				0.01
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	8 0.0 -18.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Cavalry on inner left wing
    	begin_block 10
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	8 -24.0 -18.0
    		inter_unit_spacing	3.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on inner right wing
    	begin_block 11
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	8 24.0 -18.0
    		inter_unit_spacing	3.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on outer left wing
    	begin_block 12
    		unit_type		light cavalry			1.0
    		unit_type		heavy cavalry			0.8
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	10 5.0 -6.0
    		inter_unit_spacing	3.0
    		priority		0.9
    	end_block
    
    	;; Cavalry on outer wing
    	begin_block 13
    		unit_type		light cavalry			1.0
    		unit_type		heavy cavalry			0.8
    		unit_density			loose
    		block_formation			line
    		block_relative_pos	11 -5.0 -6.0
    		inter_unit_spacing	3.0
    		priority		0.9
    	end_block
    
    	begin_dummy_block 14
    		spans 10 12
    	end_dummy_block
    
    	begin_dummy_block 15
    		spans 11 13
    	end_dummy_block
    
    	begin_dummy_block 16
    		spans 8 9 14 15
    	end_dummy_block
    
    	;; Generals unit
    	begin_block 17
    		min_units		1
    		unit_type		general_unit			1.0
    		unit_density			close
    		block_formation			line
    		block_relative_pos	16 0.0 -24.0
    		inter_unit_spacing	12.0
    		priority		1.0
    	end_block
    
    end_formation
    
    begin_formation ai_precursor_reinforcements
    ;;; purpose flags
            attack
    	defend
    	ai_priority			0.2
    the last formation is currently just a copy of the defend formation just in order to make the game happy ... havent played around with reinforcements yet

    Edit;
    Just rechecking my findings I started testing some other variantions

    The dummy-block in front of formation helps the formation but its not the cause of the additional behaviour, it does do much good, like it in this formation seems to prevent the AI from moving its cavalry into diff. groups when switching formations and prevents the AI from ignoring skirmish/precursor units(I'm currently going to stick with it ...)
    It seems that the formation itself simply provides the engine with what it needs, no tricks or whatever just a proper formation that isnt to changing from defence to attack (the above formation is too active already!), basicly what I'd call normal battle characteristics are the key, meaning try to make the formation so the AI isnt regrouping its units as it tends to do so when just coming in archer-range and get cut up if they dare to move their shield from in front of them, keep spear back enough so prec. units can pila-charge and take the enemies pila's and not so the spearmen end up attacking before the prec. units (currently still a flaw in the above formation)


    G
    Last edited by Red Spot; 12-05-2007 at 17:25.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO