Page 1 of 2 12 LastLast
Results 1 to 30 of 31

Thread: default_melee_state

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

    Default default_melee_state

    Been tempering with descr_formations_ai and specially liked to discuss the default_melee_state flag a bit more ..

    There are a few flags that are used in the vanilla files (though not in the _ai version) that actually work;
    -fire_at_will
    -defend
    -skirmish

    and there are flags(to hopefully counter the above mentioned flags) that are used by others that dont seem to work, at least not for me;
    -engage_at_will
    -attack
    -hold_fire

    wich often means formations are bugged cause of settings that are aplied during deployment, wich is in a defensive formation where often flags as "defend" are used, now as there doesnt seem to be any way to disable the defend stance it means the unit will hold its defensive stance in an attack

    Now I dont know perhaps that BI 1.6 doesnt like the user-found flags or I somehow havent used them properly even once, but I simply cant get them to work, they simply wont get a unit out of its defensive stance.
    I also cant seem to find some flag by trying stuff like "attack_at_will" or "engage" and seem to just be able to fill in whatever I want where sometimes the entire command doesnt work because of a incorrect flag and sometimes the command does the correct stuff even though it has an incorrect part.

    So I'm about to give up hope of ever setting the AI in a defensive stance as it does seem to by default make my attack formations buggy no matter how well the AI may use them (attacking with units on defend doesnt work all that well it seems :D)
    Yet I cant ingnore entire lines of mods having adapted the found flags even though I cant get them to work, maybe I missing something here??


    G

  2. #2

    Default Re: default_melee_state

    The engage_at_will command has worked fine for me, it will make the units behave more aggressively when they are close to the enemy.
    If you just lose the 'default_melee_state defend' line for offensive formations, the AI units will be properly functioning in attack. At least this has always been the case with my formations.

    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

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

    Default Re: default_melee_state

    well it isnt the case in my formations, I've also run a few test too see if units actually have the defend flag removed and they do not seem to
    (easy way too test is make 2 player formations and than switch the formation in the deployment fase, nothing happens ... the command does not work ...)

    Do note the units attack just fine, are as agressive with as without "engage_at_will" its just that they dont "swarm around" a unit as they do without the defend flag (something you can even see if paying a bit attention)

    Could you do me a favour and test your formations under human control, by adding the formations to the formations file, I've tested my own and several others and none of the non-vanilla flags work for me in all of these formations (the more testing I do the harder I find it too believe it actually even exists, let alone work ....no offence intended ...)


    G

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

    Default Re: default_melee_state

    did a lot more testing in both BI 1.6 and Rome 1.5 and am pretty convinced the so called discovery of new melee-flags is fiction, it doesnt exist

    just to point this out the "default_melee_state" as it already says, sets a melee state on the unit, something you can "view" as it basicly just pushes one of the melee-state buttons for you, set the defend flag and there is no way to remove it again ....
    (same as density only uses loose or close and you cant just make it say medium or whatever .... even though the engine swallows it)

    Anyway I'm starting my own research from scratch now as I no longer have any faith in the established bit of research as to me its like a placebo(sp?) ....



    G

  5. #5
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: default_melee_state

    you may be interested in bits I wrote up a while ago:
    http://www.twcenter.net/wiki/Descr_formations_ai.txt

    basically on similar theme that that file will swallow inventions....
    I got rather fed up with trying to work out what actually worked though and kept to really simple single melee states in the end.
    Not used mods before? Looking for something small and fun?!
    Download the:

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

    Default Re: default_melee_state

    first of all about the discovery of certain aspects of the formations file ..

    check the player version, little real discoveries have been made, just presenting things that seemingly arent being read by others ...

    anyway personally I've gotten a bit fet up with the whole Darth vs Sinuhet war after I've been reading up on both of their sub-forums and am completelly ignoring their findings as they're like I said above kind of placebo-like .....


    couple of notes on melee state;
    you can change "default melee states"(eg; archer starting with skirmish on normally) by just giving them the skirmish command, than the fire at will mode is toggled off, or set the fire at will mode will toggle of skirmish (wich normally is on on archers)
    you can influence things by setting an other command/state, but there dont seem to be any "enage_at_will" or "attack" or "hold_fire" flags, just the ones that are also used in the player version of formations file

    at least any test or logic I release on this subject provides me with these results (not trying to put down others work, however also wont ignore my findings just cause it might prove someone is or might be wrong)



    G

  7. #7

    Default Re: default_melee_state

    Red Spot accept my gratitude, as you spurred me to investigate this specific matter a bit further than I previosuly had; which was not much, because I had chosen to believe what Darth and Sinuhet had presented as tested and confirmed discoveries. Indeed, things are exactly as you say. Either the AI doesn't know when to use it's "attack" formations or the player-found states are fiction; plus that damn defend button won't reset if once set as pushed. Seems I was another victim to the placebo effect. :)
    Do let us know of what other discoveries you make, though it seems afterall that the file can't take much useful modding.

    Mak, do your simple-melee-state formations work well? Coz it seems I'll have to change some things in our formations...

    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

  8. #8

    Default Re: default_melee_state

    anyway personally I've gotten a bit fet up with the whole Darth vs Sinuhet war after I've been reading up on both of their sub-forums and am completelly ignoring their findings as they're like I said above kind of placebo-like
    Even when I neither liked this "war", I think this do not make justice to the work of Darth (I know less about Sinuhet's work). In fact, Darth already said something similar about the useless of default_melee_state long time ago in his guide "Modifying Formation AI version 2" (there is a link in the TWC wiki attached by Makanyane).
    And he removed this command almost completely from his latest versions. The version 16.2 we are using in lotr-tw do not use default_melee_state except "defend" for phalanxs, and I these formations are working great.
    Last edited by Bardo; 12-04-2007 at 16:57.

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

    Default Re: default_melee_state

    Quote Originally Posted by Aradan
    ...........though it seems afterall that the file can't take much useful modding.................
    not really ... er ... not really able to word this ... yet ...
    (as in it can take a lot of modding, but it means a small tweak can influence the battle-engine ... Darth surelly is correct in his concept)

    but there are .. er .. tricks ...
    (eg; set the generals melee_state to skirmish in an attack-formation and use a formation with a regular-non-skirmish general and the formation may be "forced" into an other attack-formation than priority dictates)


    G

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

    Default Re: default_melee_state

    Quote Originally Posted by Bardo
    Even when I neither liked this "war", I think this do not make justice to the work of Darth (I know less about Sinuhet's work). In fact, Darth already said something similar about the useless of default_melee_state long time ago in his guide "Modifying Formation AI version 2" (there is a link in the TWC wiki attached by Makanyane).

    sorry for this but I started with a great deal of respect for Darths work
    He however starts by flaming and insulting Sinuhet for his flawed melee-state commands, but ... he uses them just as well ....

    his 16.2 .. at least his latest according to his TWC-forum uses the melee-state "attack", wich doesnt exist (next to that with his comments about how to properly test stuff (including insults to others) I'm expecting him to know better!!

    Anyway my advice ... forget all about those tutorials except for the basic formation-modding .... do your own tests ...


    G

  11. #11
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: default_melee_state

    Mak, do your simple-melee-state formations work well? Coz it seems I'll have to change some things in our formations...
    All they do is set-up each main faction in a characteristic formation shape, with one extendible formation, same for defend or attack, have some back row archers on fire_at_will and some shield wall units default to appear in shield_wall formation. On the grounds that they weren't trying to do a lot they succeed in doing it! I suspect there is more that you can do, I just thought I was probably going to get into more trouble if I tried as was already out of depth, and have thought sometimes that adding too many options to it can cause AI to keep re-arranging itself mid-battle.

    Aradan, if you want to look I can send you either file or full beta but formations aren't really advance on vanilla, just re-arranged to suit faction character.
    Not used mods before? Looking for something small and fun?!
    Download the:

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

    Default Re: default_melee_state

    to add to the whole formation modding thing ..

    I've been running a few battles with the same settings as I've been using .. er .. a zillion times :) but now made some crude changes in EDU, like set HP1 to HP2 and 2 to 3, low skill vs high skill etc etc...

    I'm pretty convinced that the most important part of formation modding is eventually the EDU-file ...
    Like with units at HP2 (generals and such at 3) compared to HP1 settings means whoever wins has less casualties

    Unit formations are also rather interesting (infantry 160men, cav 80men)
    Been using a much denser formation as it was with legions and such at 0.8, 1.2 but found that it makes it too easy for the player to have an effective archer-army, putting them on 0.8, 1.2, 1.2, 1.2, 8 leaves the battles lines intackt (same depth of lines) when switching from dense in defense and loose in attack, and it increases the size of the lines as it makes the formation 50% wider as before, getting less cassualties from archers without getting as wide that units get easy pickings for cavalry
    (triarii/spear are set at 0.8, 0.8, 1.0, 1.0, 4 and will grow slightly in depth but with a 4-line unit it doesnt have a real impact on formation but does allow the unit to run a bit easier while keeping formation, archer have 0.8, 1.3, 1.0, 1.5, 3 with their 3-line unit depth is important for them but wont make any impact on the whole formation even if it would it would only puch back siege/cavalry)

    again my cavalry has been set at 1.3, 3.0, 1.5, 3.0, 4 (general 1.2, 3.0, 3-deep), same thing as above, the formations keep its depth as the AI doesnt seem to be very good at growing a formation in depth, though with a bit more space in between men it does allow the cavalry unit to turn around a bit easier without becoming a blur of men ...

    I've also taking Darths lessons on influencing the formation for granted and adapted them
    the formation doesnt try to take a different shape all together though it does move the cavalry to the flanks and general further to the back, trying to get them into the battle after the infantry started melee
    I'm however favouring the aproach of giving at most a very minimalistic increase in formation depth on the go(when switching formations) as the AI at this point seems to often switch units, meaning it may make a 1st line unit go to the 2nd line and an other 2nd line unit to the 1st line, keep diff. formations similair in shape and the AI seems to keep units where they deployed (or change them drasticly to force the AI to reorganise)

    fun thing I found out is that you dont seem to need any attack-formation for an attacking army, if there isnt any usable attack-formation(though there is one in the file) than the army reoganizes into a single line formation eventhough there is no single line formation within the entire formations file ....

    Going to put formation tweaking on hold for a moment as I like to test what diff. settings in EDU may mean in a large formation (I've tweaked my EDU stats in 1vs1 to ~10vs10 battles with vanilla formations and find that they do pretty good on a 1vs1men level but as soon as formations get larger it seems to get too easy for a player-army to run-over or rout a portion of an enemy army and change the battle odds in the players favour)

    Anyway all of this has to do with a bit of flavour and possibly a bit of augmenting the battle-engine, nothing to do with whats there or not there :)


    G

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

    Default Re: default_melee_state

    just a random battle, just trying to show what can be done just by "setting the pieces up correctly" ...

    start of battle;


    the AI just after starting the battle;


    few seconds in battle, AI starting to reform;


    watch my left flank(or the AI's right flank);


    battle-engine doing its thing;


    dont really enjoy heavy cavalry in my rear .....;


    overviewing the battle;


    8 seconds later and the AI launches a mass-assault;


    I'm able to keep my right flank protected with the help of some triarii;


    However the AI has an other surprise for me ... more cavalry ...;


    Like my left flank is doing good, my general routs!;


    This is where I stopped letting the AI call the shots or I most likelly would have lost;


    After a minute I manage to get control over the right flank;


    And am able to get the upper-hand, though the AI still shows some teeth by breaking my left flank ... or whats left of it;


    Victory is sweet ....;




    This was a battle on medium with the exact same army for me as the enemy, where I just say it out and countered the AI steps untill I could no less than act all human in order to win ...
    I cant take any credit for any of this AI-behaviour as its all battle-engine...
    Currently what seems to trigger to .. er .. most fun AI-behaviour is by putting up some dummy blocks in front of army wich changes size when formation changes, wich seems to be the cause of the AI randomly sending its cavalry to my flanks, I've seen it move its entire complement of cavalry circle around me and break me from behind, the AI won a battle from me on medium as I didnt counter them right away but gave them a few seconds being amazed by the "strange" behaviour ....
    (cavalry actually form a formation of its own on my flanks, it is no longer part of the main formation, it seems ....)

    Edit;
    just to show you its not a freak thing, and rightaway show you the AI can commit its entire complement of cavalry to flanking you;




    Edit2;
    Getting somewhere, I've let the AI's cav creep up behind me before I engaged them at wich point the AI launched its assault...
    Not my best of battles, but given this was on medium I'm rather impressed by the end results ... the AI actually won a fight ...




    G
    Last edited by Red Spot; 12-05-2007 at 04:34.

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

    Default Re: default_melee_state

    I'm not BS'ing you here this is a real battle where the AI simply came straight up front ..
    It kind of a freak thing, but again just on medium equal armies and the AI attacking me...









    I tried whatever I could and lasted rather long in the end with nothing but 3 1/2 defeated units of triarii ... but after the AI charged it cavalry into one of triarii and they routed the others did as well ....

    All the *magic* that really seems to invloved is this simple command that is the first in any of current formations .... (yet I have a couple of other idea's to test ....);
    Code:
    	begin_dummy_block 0
    		spacer			0.0 0.0 240 30
    	end_dummy_block

    Edit;
    have been trying many variations to the above including where the 1st unit-block is positioned relative to the dummy-block
    I'm going with a dummy-block like above and one of 120 wide with smaller formations, than put the first line/block ~18 to 30 behind the dummyblock, wich gives me the generally the best AI and the least "lets move the entire formation to the right a bit" behaviour
    Going to try later on what happens when I put a dummy-block between diff. unit types (eg; put a dummy-block between the prec. units and spear so they hopefully end up with a better timed charge)


    Edit2;
    I'm starting to love this game even more .....
    Same settings just running more tests

    AI cavalry creaps up behind me, I launch a counter attack with some cavalry and my general ...
    so my general dies, my cavalry routs ... and the AI probably gets a heroic victory .... I love getting my behing humiliated by the AI :P



    Again I've given the AI the first move, if I would have played "full trottle" they would likelly still have lost, but normally I play on hard and not even come close to loosing on medium, anyway the most important thing imo is that it shows the engine has the capabilities you just need a formation that fits the army
    I'll stop picture-spamming now ... :)


    G
    Last edited by Red Spot; 12-05-2007 at 16:39.

  15. #15
    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.

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

    Default Re: default_melee_state

    after testing a whole line of similair formations with minor tweaks my conclusions about the formations files are rather simple ....

    There is absolutelly nothing special!!

    it all has to do with a proper army formation where linking up some armies may prevent the AI from redistributing armies and sometimes its actually the cause of it ...
    a 1/2 decent formation already has the potential to do wonders in respect to the vanilla files, it just needs to be linked properly, so give the AI formations it wants to use even if its priority is set low (if you make a 3-units formation than the AI tends to select that formation over a formation that has no unit-limits, or if the units match the tag it gets selected over a formation with for instance "infantry" or "all")

    Also what I first liked to believe makes a good impact, the dummy-block in front of a formation, does make no difference at all by default, it however can help a formation stop redistibuting its men ....

    All the commands in the formation file seem to be nothing more than sort of on/off-switches, no hidden features or anything ....

    Edit;
    scrapped last remark, doesnt seem to happen any more ....


    G
    Last edited by Red Spot; 12-06-2007 at 23:03.

  17. #17

    Default Re: default_melee_state

    Indeed simplicity helps sometimes. Apart from the big dummy block, do u think that setting relatively small offsets between blocks of the same line will stop the AI from rearranging units between lines?

    Quote Originally Posted by Makanyane
    Aradan, if you want to look I can send you either file or full beta but formations aren't really advance on vanilla, just re-arranged to suit faction character.
    That's ok, Mak, thx a lot. I will just get EoD and see for myself; sth I should have done a long time ago anyway regardlesss of formations, given the quality of your mod...

    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

  18. #18
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: default_melee_state

    Aradan new formations are only in Lycan Rising which is not released I'll pm you info.

    @RedSpot well done on this, if you can summarise recommendations at the end of testing that would be great.
    Not used mods before? Looking for something small and fun?!
    Download the:

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

    Default Re: default_melee_state

    Quote Originally Posted by Aradan
    Indeed simplicity helps sometimes. Apart from the big dummy block, do u think that setting relatively small offsets between blocks of the same line will stop the AI from rearranging units between lines?

    I'm starting to think the redistributing is a function of the engine ..
    Thinking about the AI having done a battle when an other is waiting it may be coded so it restributes men between lines in a random(remote) effort to get fresh men on the first line ... (and absolutely overshooting its purpose)

    Anyway so I dont think there is a way to totally get rid of redistributing of units, sometimes adding a dummy blok ("spacer" or "spans") can make it less so, sometimes it makes it worse ....
    All you can do is tinker a bit and settle with what works best, or what it least annoying .. ;)


    Mak.

    I hope I get the time ... :D


    G

  20. #20
    The Aspiring God Of War Member Lysander13's Avatar
    Join Date
    Nov 2006
    Location
    Leading the assault against the Gods at Mount Olympos itself.
    Posts
    373

    Default Re: default_melee_state

    As one who also plays around alot with formations, i can't say i agree with some of the things being said in this thread but therein lies the problem with the modding of this peculiar, irritating, and in the end, perhaps not so rewarding area. To me the problem in this area has always been that everything for the most part is done empirically. You deal with very few absolutes here. It's not like adding scripts or traits, either their triggering or there not. It's not like adding additions to the stratmap or adding new units, either you can see them or you can't. In this area, you'll have some who swear the engage_at_will tag works and at the same time some who say it's complete fiction. That's summarizes the problem with modding formations and battlefield AI. In the end were never gonna be completely sure on how the formations themselves interact with the hardcoded AI routines and i seriously doubt at this point, that anyone is going to have some major breakthru in this area. However to call the work of Sinuhet or Darth Vader in this area nothing more than a placebo effect, i think is a bit harsh. As i am of the opinion that the work they produced was clearly better than what was offered in vanilla and considering the limitations one is hampered with when they decide to tackle this area of modding, I think they did an outstanding job all things considered.

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

    Default Re: default_melee_state

    Actually Lysander13 that is exactly the case, its exactly like adding a trait or a unit ....

    Its all normal commands, like with traits, nothing special or hidden there, just tweaking it better may give of a better impression, add a bit to gameplay

    In the end they are all absolutes, as the formation is triggered or not, the unit is assigned or not, like I mentioned before, formations are an "exact" peace of work ..

    Its that seemingly everyone has become biased about "formation-systems" and "melee states" and more stuff that isnt there ... at all .. That perhaps it has given of an impression there is more to it, wich I tought myself as well, and found out those days of research and reading up on some people's work where a BIG waste of my time ....

    Dont get me wrong about Darth's and Sinuhets work, like I also mentioned, I'm not trying to flame their work, at most their biased research ....
    For instance Darths manipuler formation works very nice, but even beter with some adjustments towards what the file does and does not do, in the end my very own medium-infantry formation is loosly based on his formation

    Anyway to qoute you
    In this area, you'll have some who swear the engage_at_will tag works and at the same time some who say it's complete fiction
    Those idea's once born will always remain alive, there are always people that like to ignore hard and repeated tests, they probably wouldnt even believe it if said by CA ...
    All I can say very hard and loud is that you should do your own tests if ever in doubt and if you feel your tests are conclusive enough than you should feel happy in using it
    Than you have the issue that the formations file takes everything, havent been able to do something within formations that caused issues, if forced I can make the entire battlefield revolve around a single formation filled with errors and non-existing tags ... as long as there is 1 unit-block without the crap and the tag "all", so its easy to believe and a lot harder to prove an non-existing discovery because of a few incorrect tests
    (I started out believing the fire_at_will worked as well, like some other things, the reason I started this topic, as I also just happily accepted that the info available was the truth ....)


    G

  22. #22
    The Aspiring God Of War Member Lysander13's Avatar
    Join Date
    Nov 2006
    Location
    Leading the assault against the Gods at Mount Olympos itself.
    Posts
    373

    Default Re: default_melee_state

    Originally Posted by Red Spot
    Actually Lysander13 that is exactly the case, its exactly like adding a trait or a unit ....

    Its all normal commands, like with traits, nothing special or hidden there, just tweaking it better may give of a better impression, add a bit to gameplay

    In the end they are all absolutes, as the formation is triggered or not, the unit is assigned or not, like I mentioned before, formations are an "exact" peace of work ...
    Perhaps we'll disagree over semantics here. Of course formations being triggered or not, or units being assigned to particular blocks within the formations or not are absolutes. My comparison was more geared to the actual default_melee_state flag itself. If we were truly dealing with pure absolutes as it's relative to this flag, then by definition, how could it be possible that this flag excepts fictional code? Don't mistake me here, i'm not making a case for, nor against any line of thinking, like unless i've totally misread this thread, you are. What i am saying is when the only method to confirm or deny something is done purely by observation, such as modding and testing the battlefield AI. Well, results will vary so to speak. What the eyes of one see may not necessarily be what another sees. Compound this with the fact that the compiler could very well have the ability to override meaningless code as it's relative to the battlefield AI, not to mention there may be actual functioning code that may not be fully implemented as it's relative to the AI...Such as that skirmish tag ( as it happens you have a thread over at the scriptorium about it ) and also other things that have been reported by some as having a positive affect on battlefield AI, such as the stat_charge_dist and stat_fire_delay stats in the EDU. However, i'm sure for every one person you'd find that says this definately improves battlefield AI, you'll find one who says the contrary. Modding the formations don't seem to me to be an "exact piece of work" and i don't think it will ever quite be "exact" when taking the whole AI into account...How could this be an exact piece of modding, if we are truly never going to completely understand how the formation_ai file not to mention EDU and other relevant files interact with the hardcoded AI? In the end...depressingly....this is probably the comment i agree with the most....

    Originally Posted By Aradan
    though it seems afterall that the file can't take much useful modding.
    I agree of course it can be tweaked and really that's all i've ever viewed formations as being...just tweaks. Whether they were full blown formation mods, or my own that i worked on, or anyone else's. for that matter. How good these tweaks are is relative to who is being asked the question.

  23. #23
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: default_melee_state

    I'm not wanting to get into and argument about other peoples formations, if it looks like it works and players are happy, all is good

    but
    My comparison was more geared to the actual default_melee_state flag itself. If we were truly dealing with pure absolutes as it's relative to this flag, then by definition, how could it be possible that this flag excepts fictional code?
    just to say it definitely will take fictional code eg: blah_blah that's the info I wrote up on the Wiki, that turns the skirmish and fire at will buttons off by default, so if your new discovery also does that you need to be very sure it's actually doing anything apart from making it use a default setting that must be in the code to override unrecognised commands. A lot of combined states gave that same effect; fire_at_will_and_engage_at_will however seemed to at least pass that test as the fire_at_will still toggled on correctly, but I didn't get any further being able to tell what effect it was having in game.
    Not used mods before? Looking for something small and fun?!
    Download the:

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

    Default Re: default_melee_state

    the game has hardcoded routines for melee_state, like archers always start with fire_at_will and skirmish ...

    if you give a (any) melee_state command the hardcoded routines are overridden by the melee_state command, meaning if you pass an incorrect argument the game doesnt use it (it simply doesnt know what to do with it) but it will also toggle of any melee_state the game would normally set

    so the use of say "engage_at_will" could be simply used to make sure archers dont skirmish nor fire at will, but if you want to make sure they dont skirmish you need to tell them to fire at will ... (hope you get my point here ...)


    Lysander ..

    Any code can be made to take fictional code, I've done quite some coding myself and that is just the way I always code, to prevent freezes and CTD's, though like in this case it may than present you with people that have discovered stuff that I never implemented in the code (wich simply isnt there!) cause the game didnt freeze/CTD when they tried ...

    Anyway I dont really understand why you still are after melee_state and wether it is hard or not to test, as you can "see" everything by testing flags on the players army, your units are the same as that of the AI ....

    Though I can accept you may not agree, I wont change my opinion about this nor any statement as I even feel I've been mild towards some claimed discoveries and will stick with my statement that this is the same as say modding traits, once you know the commands its as straightforward as can be ... its the final tweaks that take the time, making your own prefrences visable in your work ...


    G

  25. #25
    The Aspiring God Of War Member Lysander13's Avatar
    Join Date
    Nov 2006
    Location
    Leading the assault against the Gods at Mount Olympos itself.
    Posts
    373

    Default Re: default_melee_state

    Originally Posted by Makanyane
    I'm not wanting to get into and argument about other peoples formations, if it looks like it works and players are happy, all is good
    Indeed, the words of the ever wise Mak....
    BTW, i'm not arguing per say, as i also don't want to argue about other people's work. Perhaps playing devil's advocate would be more accurate..

    but

    just to say it definitely will take fictional code eg: blah_blah that's the info I wrote up on the Wiki, that turns the skirmish and fire at will buttons off by default, so if your new discovery also does that you need to be very sure it's actually doing anything apart from making it use a default setting that must be in the code to override unrecognised commands. A lot of combined states gave that same effect; fire_at_will_and_engage_at_will however seemed to at least pass that test as the fire_at_will still toggled on correctly, but I didn't get any further being able to tell what effect it was having in game.
    No..No..No...I'm not claiming to have made any "new" discovery. I'm not saying i coded in kill_them_all and it worked or didn't for that matter and achieved the results you speak of. I make no claims whatsoever Mak of contesting your Wiki write-up. By "fictional code" i only meant the tags discussed here in this thread..i.e..engage_at_will, fire_at_will..etc...The issue of course being are these tags fictional code as some would argue or are they valid as other's would report. My whole point to playing devil's advocate is Red Spot could very well be making some great points but if let's say DV or Sinuhet jumped into this thread; I am certain they could make a very compelling argument for their work as well based on their "observations". In the end..perhaps just two different schools of thought is all.

    Originally Posted by Red Spot
    Anyway I dont really understand why you still are after melee_state and wether it is hard or not to test, as you can "see" everything by testing flags on the players army, your units are the same as that of the AI ....
    Well, i'm still on it because i was under the impression that was the topic of this thread.......
    I don't recall saying it was hard to test. My whole point friend is since once it's "go" time on the battlefield, all the testing is empirical in it's nature. (This is presuming the one testing/modding got everything right up to this point as it's relative to the code in the file that is ) So what one believes he's observing could be percieved differently by another.

    Though I can accept you may not agree, I wont change my opinion about this nor any statement as I even feel I've been mild towards some claimed discoveries and will stick with my statement that this is the same as say modding traits, once you know the commands its as straightforward as can be ... its the final tweaks that take the time, making your own prefrences visable in your work ...
    By all means friend, i wasn't necessarily trying to convince you to change your opinion or anyone else's for that matter. Like you, i'm only relaying my own opinion. I feel perhaps you may have been a bit harsh towards DV and Sinuhet's research and work in this area.....but again.....we can agree to disagree. As Mak put it...It's all good...

    In the end friend, i hope you continue your research and perhaps make an exceptional find in this area. Good Luck and Happy Modding....

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

    Default Re: default_melee_state

    something probably already known to some, but now I'm sure about it as well ... :D

    reinforcing armies have the potential of forming a single army;


    now have to remove the max of 1 generals unit in the generals block for reinforcing armies :)


    Edit;
    count the units in this army ... what 20unit army limit ..?!? :D




    G
    Last edited by Red Spot; 12-10-2007 at 04:42.

  27. #27
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: default_melee_state

    Nice work, some of this work would make a great pack for the normal game, or any mod for that matter...

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

    Default Re: default_melee_state

    WOOOHA!! ...

    I've found a way to disable the "defend" flag ...

    look here, 2 battles, both times the AI and me had the defend flag set;
    deployment, same for both battles;


    battle1;




    battle2;




    check the last picture of both battles, can you spot the difference?? :)

    What I did is set the units density to loose and keep the defend flag set.
    Now the unit runs up to pilum range, stops, reloads a pilum, charges, reloads a pilum, recharges, and seemingly than looses its defend flag, as at that point it looses unit-formation and swarms my troops, giving more fighting room for the individual soldier ...

    me happy ... :)


    G

  29. #29
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: default_melee_state

    looking interesting

    am asking here instead of clogging up the scriptorium tut, which looks very useful btw... but having seen discussion on defend flag staying set, I'm wondering if anyone knows if its meant to work same way in BI, have tried adding it to various formation blocks and although it defaults to guard mode when you use them, AI seems to switch off / ignore it (or I've done something wrong)
    Not used mods before? Looking for something small and fun?!
    Download the:

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

    Default Re: default_melee_state

    Thanks for the compliment Mak. ;)

    though I guess you have done something wrong then, as I've based this all on BI 1.6 (well, Rome running under BI ...), though some has also been double checked in Rome 1.5 with the same end-results (why also as long as nothing pops-up I'll assume they work the same way)

    set the prio. of the formation you want the AI to use "way up", so you more or less force the formation upon the AI, works then you at least know the AI didnt like the formation for the army (or it may have an error)

    If you want I dont mind having a look for you, via PM or here doesnt matter.


    G

Page 1 of 2 12 LastLast

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