Code:
type greek hoplite spartan
dictionary rtr_greek_hoplite_spartan
category infantry
class spearmen
voice_type Medium_1
soldier greek_hoplite_spartan_pylos, 30, 0, 1.3
attributes sea_faring,hide_forest,command,can_sap,very_hardy
formation 0.9, 1, 2, 2, 4,square
stat_health 3, 0
stat_pri 12, 7, no, 0, 0, melee, simple, piercing, spear, 0 , 0.4
stat_pri_attr light_spear, short_pike
stat_sec 0, 2, no, 0, 0, no, no, no, no, 25 , 1
stat_sec_attr no
stat_pri_armour 2, 20, 6, metal
stat_sec_armour 0, 1, flesh
stat_heat 1
stat_ground -4, 0, -8, 0
stat_mental 19, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 2, 1342, 676, 104, 112, 1080
ownership greek_cities, slave
You need to make sure that the line for stat_pri_attr looks like in my example(in red). This will make your unit to have a default short pike like the hoplites have. You also need to make sure that it doesn`t have a second weapon. The green line in my example. You can use that as reference to replace yours.