Post 28 Mar 2014, 14:31

Formation division

Hey guys!
May be right or not... but in official first version of KaM formation division was different than KaM remake. For example, 20 pikemans (5 lines, 4 columns) when clicked devide button:

in original KaM: devides to 10 + 10 two formations (each 5x2), first formation leader is same like was in main formation. second formation leader is warrior who back from first formation leader in 2 points (3 line, 3 column from main formation). so when devision happens, warrors stays on their places - only new leader added visually.

in KaM remake: devides to 10 + 10 two formations, but secon formation leader created too close to first formation leader. as result - very big collision between two new formations - warriors have havoc mix and can not be devided faster...

may be its wrong (about original KaM) because i played this game 14 years ago :D but this division type is preferred. note: many players want to make 4 big formations (each unit type) and move it close to enemy, and then devide to many formations and take good positions. but when enemy start attack early, you may want to save half of melee formation and make disposition. so... if 2th leader will in first line - this is useless. he can not run away faster and start battle.

so general idea is: if main formation have 2+ lines, devision must work like this:
1) old formation leader must be saved on their place
2) second formation leader must be created back of first in line = int(MaxLine / 2). if this place is empty (may be rock or building or other tile when warrior cant stay) - second formation leader must be warrior, who must stay in this place, but can not. so their current place (when he must located because can not located in normal place) is their main place.

anyway we must save direction from first main formation and i think last order. but if order is move, then second formation must be re-ordered to place, when their leader must be if he was in main formation.

which problems we will have with this division? hope only one. if MaxLine can be devided by 2 (2,4, 8) main formation may not have warrior back of leader. so this is problem to change second leader. i think need virtually compute place for second leader, change nearest warrior as second leader and give him move order to copmuted destination.

krom and lewin, if u are interested this idea and if my english is not so terrible for you - write me - i can make algorytm for you. dont know pascal/deplhy, but i am programmer and can make understandable "script".