Results 1 to 6 of 6

Thread: Formations_ai and Elephants

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

    Default Formations_ai and Elephants

    Have made a (crude) line of cavalry formations, currently they are untweaked and rather weak but they work just fine ....
    Untill I deploy elephants, if I remove only the cavalry formations the game loads just fine but when I deploy elephants when the cavalty-formations are present the game "freezes" (I once have been able to force the game to load wich made the camera deploy outside the battle-map and cause and immediate CTD ...

    I cant seem to get my head around it, removing all but one cavalry formation and use that to test things out still presents the same problem though I cant spot any mistake in the actual formation (expect for that its not "AI-tweaked")

    anyway the first defend, and currently only, cavalry defend formation is the following;
    Code:
    ;*******	Cavalry	14-20 units	****************************************
    ;*******************************************************************************
    begin_formation ai_large_cavalry_defend
            defend
    	ai_priority			3.0
    
    	begin_dummy_block 0
    		spacer			0.0 0.0 120 30
    	end_dummy_block
    
    	;; Lead Cavalry
    	begin_block 1
    		min_units		6
    		max_units		8
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.9
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	0 0.0 -18.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Cavalry left
    	begin_block 2
    		min_units		3
    		max_units		4
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			1.0
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	1 -18.0 -6.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Cavalry right
    	begin_block 3
    		min_units		3
    		max_units		4
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			1.0
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	1 18.0 -6.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Cavalry back
    	begin_block 4
    		min_units		2
    		max_units		4
    		unit_type		heavy cavalry			1.0
    		unit_type		light cavalry			0.8
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	1 0.0 -12.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Family back
    	begin_block 5
    		unit_type		skirmish cavalry		1.0
    		unit_type		any				0.1
    		unit_density			close
    		min_unit_width			16
    		max_unit_width			22
    		block_formation			line
    		block_relative_pos	4 0.0 -12.0
    		inter_unit_spacing	0.2
    		priority		1.0
    	end_block
    
    	;; Siege behind the army left
    	begin_block 6
    		unit_type		siege				1.0
    		unit_type		any				0.1
    		default_melee_state		fire_at_will
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	5 -12.0 -6.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Siege behind the army right
    	begin_block 7
    		unit_type		siege				1.0
    		unit_type		any				0.1
    		default_melee_state		fire_at_will
    		unit_density			close
    		min_unit_width			20
    		max_unit_width			20
    		block_formation			line
    		block_relative_pos	5 12.0 -6.0
    		inter_unit_spacing	6.0
    		priority		1.0
    	end_block
    
    	;; Elephants left
    	begin_block 8
    		unit_type		elephants			1.0
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	6 -18.0 -12.0
    		inter_unit_spacing	12.0
    		priority		1.0
    	end_block
    
    	;; Elephants right
    	begin_block 9
    		unit_type		elephants			1.0
    		default_melee_state		fire_at_will
    		unit_density			close
    		block_formation			line
    		block_relative_pos	7 18.0 -12.0
    		inter_unit_spacing	12.0
    		priority		1.0
    	end_block
    
    end_formation
    skirmish cavalry are family-members (they always deploy in their own battle-group at the rear of the formation)

    it seems that in an other infantry formation that doesnt have any elephants the elephants just deploy in the group for heavy cavalry(wich they are classed as)

    going to try and see what happens if I make elephants missile cavalry and give them a group of their own (in such way they can no longer be assigned a position for heavy cavalry), but its kind of just "trying stuff" ... :(

    has anyone perhaps have a clue whats going on or similair experiances they managed to work around? This joke already has costed me a day ....

    Edit;
    Forgat to mention that I did try the formation with and without unit_density and default_melee_state, wich makes no diff.


    G
    Last edited by Red Spot; 12-06-2007 at 19:59.

  2. #2
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Formations_ai and Elephants

    Interesting beasts ...

    Seems that why I couldnt figure out what was going on because I stumbled upon several issues at once ...

    When you over-deploy an army (eg; the formation is big for the deployment square) it doesnt seem to be of an issue for at least loading the battle ...
    It is when it comes to elephants, when I deploy 2 lines of 6 elephants (1 on each side of the general) I get a freeze or CTD on the odd chance it actually loads, deploy 2*5 and no problem at all where the outer units barelly stay within the deployment zone.

    An other thing is that the game doesnt seem to discriminate between regular heavy cavalry and elephants, at least not without mentioning the elephants with high prio. towards mentioning heavy cavalry (wich makes playing with cav. deployment all the harder)

    Anyway I've taken the easy way out and made elephants missile cav. that arent used in my formations so they always default to their elephant position, and am going to come up with some other system to prevent elephant overflow ...


    G

  3. #3
    Indiana Jones of Modding! Member Patrizius's Avatar
    Join Date
    Oct 2007
    Posts
    103

    Default Re: Formations_ai and Elephants

    Same poblem.elphants in Formation_ai seems to cause CDT also in campaign map battles,when you siege a city and try to fight a battle...
    Ideator,Scripter and Team Leader of RES BELLICAE modding project.Come visit us on http://www.twcenter.net/forums/forumdisplay.php?f=603

  4. #4
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Formations_ai and Elephants

    change the entry of your elephants to like skirmish or missile cavalry in EDU, see if they may get assigned diff. positions ... unlikelly but it may work ...

    else you could try adding a square of elephants behind every formation with very high prio. so any elephants get assigned to a square behind the rest of army, hopefully staying within the deployment borders

    I'm currently redoing the entire way elephants deploy as even though its unlikelly to find an army with lots of elephants it can happen ....


    G

  5. #5

    Default Re: Formations_ai and Elephants

    AFAIK the same issue can happen with chariots. Sometimes they can overflow the deployment zone and that can cause some ugly things to happen, like camera frezes or CTDs.
    Best to set a large block behind everybody else and assign only elephants there with very high priority. Or you could try taking the beasties to the sides and set "block formation = square/column" and see if that saves you enough space.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  6. #6
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

    Default Re: Formations_ai and Elephants

    Funny thing ..

    I more or less overcame the problem to afterwards remove elephants from my game .... (already had no chariots)

    still nice to know :)


    G

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