PDA

View Full Version : Skirmish Question



Bwian
10-28-2005, 09:21
For the purposes of modding, I want to change the default behaviour of missile units so they always engage in hand-hand combat when the enemy closes range. Currently, the default behaviour is for archers etc. to pull back and try to increase range until they feel 'safe enough' to re-engage with their primary weapons.

However...if you toggle the skirmish button off, they switch immediately to hand to hand once the enemy get in close. Is there any way, either by script or preferences etc. that I can change this behaviour so the units are automatically in this state, and you have to click the button if you want them to 'skirmish'

I get two benefits from this...

1) Missiles still get fired up close by any units not directly engaged
2) The units don't run away unless morale drops and hold the line properly

edyzmedieval
10-28-2005, 10:46
I remember seeing the stance of the units in one txt file....
Maybe I can find it once again....

Sorry if I am wrong, I'll let you know if I find something.

Bwian
10-28-2005, 22:02
Not sure exactly how this file works, but I found this in 'descr_formations'

Where does this file get used, and would it apply to custom battles AND campaign action?



;****************************************************************
; Triple Line.
; Missile Infantry
; Non Missile Infantry
; Cavalry
;****************************************************************


begin_formation ordered_triple_line_1

general_order Group_Formation_Missile_First_3_lines

;; front block
begin_block 0
unit_type missile infantry 1.0
default_melee_state fire_at_will_and_skirmish
block_formation line
block_relative_pos 0 0.0 0.0
inter_unit_spacing 2.0
priority 1.0
end_block

;; middle block
begin_block 1
unit_type heavy infantry 1.0
unit_type light infantry 1.0
unit_type skirmish infantry 1.0
unit_type spearmen infantry 1.0
block_formation line
block_relative_pos 0 0.0 -15.0
inter_unit_spacing 2.0
priority 1.0
end_block

;; rear block
begin_block 2
unit_type cavalry 1.0
block_formation line
block_relative_pos 1 0.0 -15.0
inter_unit_spacing 2.0
priority 0.8
end_block

;; put the artillery and handlers behind everyone
begin_dummy_block 3
spans 0 1 2
end_dummy_block

begin_block 4
unit_type handler 1.0
unit_type siege 1.0
block_formation line
block_relative_pos 3 0.0 -15.0
inter_unit_spacing 3.0
priority 1.0
end_block

end_formation

Not sure what value does what exactly, or when this formation is used, but I presume if I removed the 'and skirmish' the troops would melee like I want them too.

Atilius
10-29-2005, 00:36
The file desc_formations_ai.txt is used by the AI to choose an initial arrangement for units on the battle map and desc_formations.txt is for arranging units in respose to selection of a formation button. I know desc_formations_ai.txt is used in custom and campaign battles and assume the same is true for desc_formations.txt.

You'd need to change the skirmish mode for all missle troops in every formation listed in both files I believe.

Can't help out with the syntax question.