Years ago i joined in with the guy who made the retrofit mod and he included this pikemen spacing mod. also early in the infancy of call of warhammer they incorporated my pike spacing mod. rage of dark gods also used it. Botet uses a slightly different arrangement albeit still the same idea.
type Tercio Pikemen
dictionary Tercio_Pikemen ; Tercio Pikemen
category infantry
class spearmen
voice_type Heavy
banner faction main_spear
banner holy crusade
soldier Tercio_Pikemen, 60, 0, 4
attributes sea_faring, hide_forest, hardy, can_withdraw, pike
;move_speed_mod 1.7
formation 0.8, 1.8, 2.4, 2.4, 3, square, phalanx
stat_health 1, 0
stat_pri 10, 6, no, 0, 0, melee, melee_blade, piercing, spear, 5, 0.6
;stat_pri_ex 0, 0, 0
stat_pri_attr spear, long_pike, spear_bonus_12
stat_sec 7, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 0, 7, 0, flesh
;stat_armour_ex 0, 3, 5, 0, 7, 0, 0, flesh
stat_sec_armour 0, 0, flesh
stat_heat 0
stat_ground 1, 0, 2, -2
stat_mental 9, normal, highly_trained
stat_charge_dist 40
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 500, 155, 80, 185, 500, 4, 150
armour_ug_levels 0, 1, 2, 3
armour_ug_models Tercio_Pikemen,Tercio_Pikemen, Tercio_Pikemen_ug1, Tercio_Pikemen_ug2
ownership spain
era 2 spain
;unit_info 10, 0, 7
recruit_priority_offset 20
highlighted area is the rank and file spacing of the unit. 0.8 is the smallest "physical" diameter of a man. so even if you use a smaller number the rank will not get any closer. (we are not discussing radius, height in this tutorial). This helps to reduce the number of enemy breaking through the spear wall by making the pikes closer and denser. the next value 1.8 was the best compromise between preventing the unit from doing a 180 during battle and still allowing overwatch from the second line to support the first line. spacing more than 1.8 and the second rank can no longer cover the first lines units.