Help with add and removing Phalanx ability
I have started some pretty simple modding to taylor the game to what I feel fits and will hopefully improve my experience...
I have gotten stuck with a couple of things and I hope someone can help (note this is patched to 1.2)...
Trying to add phalanx ability to the Triarii:
type roman triarii
dictionary roman_triarii ; Triarii
category infantry
class spearmen
voice_type Medium_1
soldier roman_triarii, 40, 0, 1
officer roman_early_centurion
officer roman_early_standard
mount_effect horse +4, chariot +4, camel +4
attributes sea_faring, hide_forest, can_sap
formation 1, 1, 2, 2, 3, square, phalanx
stat_health 1, 0
stat_pri 7, 7, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73
stat_pri_attr spear
stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
stat_sec_attr no
stat_pri_armour 7, 5, 5, metal
stat_sec_armour 0, 0, flesh
stat_heat 4
stat_ground 2, 0, 0, 0
stat_mental 10, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 500, 210, 50, 80, 500
ownership romans julii,romans brutii,romans scipii,romans senate
This appear to work deploying the unt on screen in phalanx formation, but as soon as they get into a fight I get CTDs...
And for removing the ability from Pharoh's Guards:
type egyptian elite guards
dictionary egyptian_elite_guards ; Pharaoh's Guards
category infantry
class spearmen
voice_type Heavy_1
soldier egyptian_elite_guards_new, 40, 0, 1
officer egyptian_standard
attributes sea_faring, hide_forest, can_sap, hardy
formation 1, 1, 2, 2, 5, square
stat_health 1, 0
stat_pri 12, 8, no, 0, 0, melee, simple, piercing, spear, 25 ,1
stat_pri_attr no
stat_sec 10, 4, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
stat_pri_armour 7, 7, 0, metal
stat_sec_armour 0, 0, flesh
stat_heat 1
stat_ground 2, 2, -2, -2
stat_mental 10, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 2, 620, 330, 70, 100, 620
ownership egypt
They are rendered correctly with normal spears and move okay. When they charge they switch to their swords and once in the fight swtich back to spears which appears to frequently cause another CTD...
This represent the two threads of thought I was having, one was to beef up most spear units with the phalanx ability and the other is to restrict it to the Helenic cultures (and reduce it's use for the Egyptains)...
Anyone encountered this before (or am I missing something hugely obvious)??
Re: Help with add and removing Phalanx ability
Quote:
Originally Posted by Bob the Insane
Anyone encountered this before (or am I missing something hugely obvious)??
You need to make sure that any unit you give the phalanx ability to is using skeletons which support the phalanx animation set. Check the unit's soldier model type in descr_model_battle.txt for the skeleton names, then check in descr_skeleton.txt wether those skel's have the necessary anims. Animations are generally treated at face value - for example you could attach the axeman skeleton to a model which has a sword, and you'd see the guys on the battlefield swinging a sword as if it were an axe - but there are a few specific cases:
1) Phalanx and Testudo formations on a unit mean that those units must use skeletons which support the Phalanx or Testudo animation sets
2) Units with missile weapons must support the missile attack animation set
3) Units with melee weapons must support the melee attack animation set (this is generally all units)
There may be a few others which don't immediately spring to mind (possibly the Warcry ability).
Re: Help with add and removing Phalanx ability
Thanks for the help.... ~:)
Re: Help with add and removing Phalanx ability
Woohoo....
Checking descr_model_battle.txt and comparing "soldier roman_triarii" with "soldier egyptian_elite_guards_new" gave me the hint...
For "soldier roman_triarii" for skeleton (which already had the value - fs_spearman) I added fs_swordsman (so it looked like fs_spearman, fs_swordsman)...
It works a treat and as a bonus Triarii have already been modeled with swords so you don't have to play around with textures...
edit: I have the Triarii the same stat_sec as Princeps, it seems to work fine..
The units have swapped roles successfully and no CTD...
Interestingly for changing phalanx to plain spear units you do not appear to remove the skeleton for fs_swordsman. Merely setting stat_sec to "0, 0, no, 0, 0, no, no, no, none, 25 ,1" and stat_sec_attr to "no" (and removing phalanx from formation obviously) seems to stop them switching to their secondary weapon, whihc I think to the cause of the CTDs (allowing using to have two melee weapons when they are not phalanx units)...
So thanks a ton Jerome... Now all I have to do is decide what feels balanced to me so far Triarii rock but the Pharohs Guard while still pretty uber are alot weaker than they were with phalanx... ~D
Re: Help with add and removing Phalanx ability
~:) no way...it CTD....... ~:cool:
Re: Help with add and removing Phalanx ability
Quote:
Originally Posted by Legionario
~:) no way...it CTD....... ~:cool:
As long as I remove the secondary weapon from the spearmen (set stat_sec to zeros and None where appropriate, the the triarii default stats) I do not get CTDs. If I leave those values in I do get them...
Re: Help with add and removing Phalanx ability
To be more precise I used the following stats:
type roman triarii
dictionary roman_triarii ; Triarii
category infantry
class spearmen
voice_type Medium_1
soldier roman_triarii, 40, 0, 1
officer roman_early_centurion
officer roman_early_standard
mount_effect horse +4, chariot +4, camel +4
attributes sea_faring, hide_forest, can_sap
formation 1, 1, 2, 2, 3, square, phalanx
stat_health 1, 0
stat_pri 7, 7, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73
stat_pri_attr spear
stat_sec 7, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
stat_pri_armour 7, 5, 5, metal
stat_sec_armour 0, 0, flesh
stat_heat 4
stat_ground 2, 0, 0, 0
stat_mental 10, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 500, 210, 50, 80, 500
ownership romans julii,romans brutii,romans scipii,romans senate
type egyptian elite guards
dictionary egyptian_elite_guards ; Pharaoh's Guards
category infantry
class spearmen
voice_type Heavy_1
soldier egyptian_elite_guards_new, 40, 0, 1
officer egyptian_standard
attributes sea_faring, hide_forest, can_sap, hardy
formation 1, 1, 2, 2, 5, square
stat_health 1, 0
stat_pri 12, 8, no, 0, 0, melee, simple, piercing, spear, 25 ,1
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
stat_sec_attr no
stat_pri_armour 7, 7, 0, metal
stat_sec_armour 0, 0, flesh
stat_heat 1
stat_ground 2, 2, -2, -2
stat_mental 10, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 2, 620, 330, 70, 100, 620
ownership egypt
And I did the following in descr_model_battle.txt:
For "soldier roman_triarii" for skeleton (which already had the value - fs_spearman) I added fs_swordsman (so it looked like fs_spearman, fs_swordsman)...
The above appears to work fine...