[Unit Theory] Imagine Unit: Macedonian Phalanx

Hey everyone.

As I was working on custom scenario about roman history back in 2017, and soon again with chronicles release, I always faced dilema in my ideas. Today I decided to share my ideas and also starting a topic to see how other AoE2 players would handle the idea.

For those not familiar with ancient time warfare, Phalanx were a type of “combat formation” mainly used by macedonians, but not only. The idea of that military unit was to be a very tight pack of soldiers using very long spear, flashing face to face against enemy phalanx. Discipline was crutial, as every men of a Phalanx was meant to act as part of a big whole forming that very same Phalanx. The formation was square shaped, and the first lines of the square had their spear toward enemy, while backlines had their spears upward. The strength of the Phalanx was in this spike wall, making it virtually impossible to approche without exposing to the forest of spikes from those very long spears called “sarissa”.

Now let’s jump to Age of Empires 2. We have many units in the game featurings spears with high range attack, such as steppe lancer, kamayuk, ghulam, hoplites, and maybe others I forget. But none of them behave like a phalangite unit, as in the power of the phalanx is in the tight square formation. Hoplites recently added by Chronicles tend on the phalanx style warfare, by giving bonus to nearby hoplites, but it’s more on the Defensive side. Starting there, it would be easy to give a Macedonian Phalanx unit an hoplite-like mechanics to boost, let’s say, their damage based on the amount of nearby phalangists. So strength wise, the game already give us what we need.

So where is the issue ? Basically, the phalanx had one weakness, it’s lake of mobility. Once spears were pointed toward enemy, at least three row of soldiers, at front of the square, were totally rotation locked, physically, due to how the formation was meant to be. Sides of the formation was extremly exposed, and most importantly, nearly unable to attack anything approching their flanks.

Now abit of gameplay theroy. Using multiple reskined Kamayuk unit, altering their “formation category” to be able to have 5 line of kamayuk, I managed to mimic a phalanx looking formation. Instead of having my 60 Kamayuk in a “line”, I had 5x12 Kamayuk in “line”, forming a “column”. This looks extremly phalanx like ingame, but here is where the REAL problems comes:

  • When you approach a Kamayuk “column” formation, their 1 tile ranged spear will destroy you whatever side you’re attacking them.

Age of Empires 2 actually features a “rotation” mechanics, but is not currently applied to infantry units, it’s for Trebuchet-like unit for them to “rotate” before attacking, and I did not manage to make it work on infantry.

So here is what this topic is about, knowing we can boost attack based on nearby units, slow down units movement, switch unit (ratha/immortal mecanics) for stat changes…

How would you bring balance to a Macedonian Phalanx unit, to represent their “Flank Weakness”. The idea here is not to say “we need the dev to code something for side defense”, but more to share reflexion on how every of us would imagine to balance a unit meant to represent Alexander’s famous Macedonian Phalanx ?

My personnal opinion for now is that, my brain is matrixed at the “game dev level”, only seeing my failures to imagine a way to balance that without hardcore game core modification. So I’m curious to read ideas of other players on how they think those goals can be achieved with current game mechanics:

- Foward strong attack capability (range / aura ?)
- Slow movement while “deployed” (combat-ability value 64, aura task affecting self as Monaspa, with a below zero multiplier to reduce speed depending on surrounding phalangists, would require a Ratha-like transform between deployer/undeployer sarissa)
- Side very weak defense and very low attack capability (no idea)
- Weakness to “flexible” unit, especially romans triplex acies / legionariy (Eagle-Like armor type that regular swords units would have big bonus against ?)

And of course if anyone find an easy way to balance that idea, the day I make a scenario about macedonian, credits will be given !

2 Likes

My simple idea would be that they have 10 less hit points and don’t get the armor bonus when stacked together like standard hoplites. Hoplites overall I think should get plus 10 damage against cavalry.

The Macedonian Pike Man is 15 food and 10 gold cheaper than a standard Hoplite, and they plus 1 range, and move slightly faster. Replaces their hoplite unit line. The secondary unique unit for the Macedonians, should be Companion Cavalry from a castle (fort), a fast heavy cavalry unit that’s immune to conversion and slowly regenerates HP.

1 Like

A new unit concept,

A unit which is actually combination of multiple units. If you played Commandos, there was a prisoner commando unit who was a combination of many units. When selected, technically all were selected and when died, one of the previous units from the line used to take place instead. So maybe not acting in the same way, but this concept can be tried out through game coding. Like units will have one big HP. You can give it two behaviors. One being if HP is gone then all of them dies at once. For some civs if HP reduces to some point then only one of them will die and stats declination over time. Expensive and taking bit more time for obvious reason as they are a group unit as one.

I agree on the second unit for the cavalry, but it’s not the goal of the topic.

While reading your first line about less helath, I directly thought “and then adding them an health regen to avoid then beeing too weak maybe”.

In AoE2, sometime health is used on units to represent improvement in their gears, armors etc, without “reducing” directly damages from that specific type. So it’s totally right that a Macedonian Phalanx should have less HP than a standard Greek Hoplite, due to the shield variation, but their armor were still great, the linothorax thing.

I’ll start a topic about the Campanion unit too one day, but their case is way harder to fit into a regular unit, as their primary feature was the wedge formation, which can be achieved with 5 unit reskined the same and with 5 formation category, then you have 1 of the first unit, 2 of the second, 3 of the third, 4 of the fourth, and 5 of the fifth, but I saw that it feels Wedgier when you use 2 of the first, 3 of the second, 4 of the third, 5 of the fourth and 6 of the fifth. We’ll dive more on the cavalry thing on another topic ^^

Yeah the “line reforming” thing was a lot present in ancient time warfare.

If you pay attention on how actual AoE2 formations and stance work, you can see that with defensive stance and “formation category” variation, actually, when the first row is dead, the entire formation move forward on reforming when no enemy is near. It’s possible to be used for “cinematic” purpose on custom scenario, but is not viable on real gameplay, and also is abit too far from the actual AoE2 gameplay.

In a phalanx, veterans were on the first row, and less experimented soldiers were at the back of the formation. That way they could easily fit fresh recruits at the back of the formation while the front is always held by experimented phalangists. It’s possible to simulate that with triggers, but not for live skirmish gameplay, unless using some kind of “unit resource”, similar to keshik gold generation but with a unit specific resource that would increase their stats up to a maximum. Probleme then is, the game, without trigger, will never care about placing your top phalangist in front, in the square formation, placement is random for units having the same “formation category” value.

Infact, on my kamayuk 5unit reskin, I made that, first unit has 80 hp, fifth unit has 40 hp, and as evry of the 5 units got its own “formation category” value, actually I have veterans front, and newbies back. The issue is that…It’s 5 different units, unless giving them “creation max count” for each of them, but still it’s 5 damn units to assign to a building, and nothing would stop players to only create their veterans and combine with other available units. So for me, this is more a “scenario” feature than a “gameplay” feature.

To me, the idea of “skill improvement over battle experience” should be a civilisation bonus, rather than a unit spcification. Maybe a unique tech, or gouvernment doctrina, as it’s mainly a “way of fighting” so it’s probably something to put under castle age / imperial age unique techs for the civilisation.

I like your idea of simulating moral of the formation, but I don’t see how it could be fit into a regular skirmish behavior. For scenario, I already used that logique in my 2017 samnite war campaign, when commander / a certain % of loss occure, soldiers mutiny and flee the battlefield, abit like Total War games mechanic, but it’s scenario usable only.

Imagine, how would you make the unit know that its very own phalanx is crushed ? It would need to know that specific units are part of the same group as himself. This mean you would have to “create” them in a big batch for the game to assigne them a unique value for them to recognize eachother. Custom Scenario, it’s possible, skirmish, it’s too far from how the game behave, so we need to imagine a way to “mimic” the idea, without having a real code doing so.

Actually, there is already in the game something close to that, it’s the Spartan with one of their unique tech giving them power boost based on enemy count, and hoplites giving armor boost, and centurio, bascially aura.
So you can simulate “moral” of a phalanx by giving the base unit very trash stat, and then an aura effect that has a minimum and a maximum unit count for the effect to apply, and then that bonus would make the unit reaching it’s “real stat potentiel” only when packed. This is probably how I will make my custom phalanx indeed, to force player to use them as a whole and not as individuals. But once more, the “side” problems occure, cause units can’t be locked to “attack forward only”, or I did not find how to without transforming them into trebuchet-like infantry with stupid rotation value, and it’s abit strange.

Initially the devs had this flanking bonus idea but it got scrapped from the og game.

I know, the so called “flanking bonus” is now used to determine unit spacing within a formation.

But that’s all what this topic is about. When devs droppped a features, it was generaly because they made it another way. 1 tile range damage capability with low defense value, or even negative armor special value can simulate the side weakness, but then issue remains about the sides beeing able to perma kill anything approaching too close.

I also read info about special abilities for pikemen attacking harder on first-hit when forward attacking, not sure if the game code for it is actually in the core. But as it’s only “on first hit”, it’s not exactly what we look for but could be enought to Balance it.The intended “Counter-Charge” special ability was meant to trigger Special Attack graphics on first hit contact with Cavalry, Considering it’s bascially the current “Charge Attack” equivalent, they could just set a flag parameter that would activate only when enemy is facing the unit. Actually I’m gonna try if there is already a parameter allowing that on charged attack.

1 Like

Og game if we change the charging attack value to 0 1 2 different mechanics got enabled I think DE removed them.
I dont think the game can identify which is front or side for units,look at the treb even when its unpacked it rotates to attack automatically.

The game can. Ghulam deals aoe damage only to front units, for example. Trebuchet also know angles they face.
Treb auto rotate to attack is because its attack task got the field “auto-search” or something like that set to enable, meaning they automatically turn toward enemy to attack them, and also is related to the unit stance, if it’s aggressive it will search for target directly.
The game engine is way more complexe than what we can imagine as player on first look. I recently dived a lot into understanding AGE values, and found lots of very intersting way about how EnsembleStudio made that masterpiece engine before 2000.

For Charged attack, you can make boosted damage, arrow dodging, area of effect boosted damage for now. I did not success understanding the “6” value I saw on two heroes in the files for now, probably something they dropped during process.

But Maybe you’re talking about the old “Charging Mod” which now is known as “Special Ability”, recently introduced in the game with the Trireme unit line for the “charging” speed boosting based on AoK initial special attacks ideas. My issue with that is that it’s only editable in the dataset with AGE, so not possible to change it with techs/trigger due to unavaiable attribute, sadly.

An idea that poped in my mind for the Phalanx weakness, it could be maybe handled via Aura task, but it would requires to support negative value, for the unit giving themself malus maybe. Or a more specific flag for the task that would check “allied unit in range behind and flank”.

Let me explain abit more that, actually we can change aura shape from square to circle, and that same aura technically can use at least two values for properties.
Basically the shape flag set to a value that would check for Front/Left/Right/Back direction, as in:

  • Front = Unit Positive Y direction
  • Rear = Unit Negative Y direction
  • Left = Unit Positive X direction
  • Right = Unit Negative X direction

So you take the actual task 155 on filed “unused flag” you add few values and that can allow some very interesting aura control behavior. But it will not solve the “rotation” problem, as the unit that would turn toward flankers won’t be able to determine whatever angle adjascent units angle they face.

To be honnest, that’s here where the real difficulty is, it IS possible to code that, but it’s a lot of code processing just for one single unit behavior. I like how the dev team choose to code the current game, and I don’t wish them to move far from it.

The only viable solution I see is just making a sub-infantry class for the phalanx that would feature a special graphic for “rotation”, as in “like the trebuchet idle graphic used for angle rotation”, maybe playing with Standing and Standing2, and then give that special sub-class “rotation” behavior using the current attributes already in the code. But my issue is that I’m used to game dev logic, and some time I miss simple ideas due to my understanding of game code logic.

I saw that Boar have rotation speed value set, but I could not apply it to my kamayuk, but did not check if I could alter boar rotation, gonna test that right now to determine if the game already handle non-treb unit rotation.

Yes this is what i was reffing to.

1 Like

Do you know the number associated with that Charging Mod ? I’ve tryied to figure out what number to use in my XS scripting to be able to give all my cavalry units that damn trirem epic charging capability without dataset modification without success. (by number i mean, the attribut ID, not the flag to use in it)

If you have that info, you’ll make many people happy, me included !

Not sure if this is what you are looking for but might be of use if it is.
https://aok.heavengames.com/cgi-bin/forums/display.cgi?action=st&fn=9&tn=44230

Sadly not, that’s the value to use, I look for the input id as to be used for tech effect attribute targeting. But I suspect it’s for now a non-registered or protected attribute value only editable within AGE. Can juste hope someday devs will give us trigger to alter them, as for formation spacing, interface kind, interaction mod, and many other cool parameters !

So I’ve tested the boar rotation thing, it’s probably a legacy of atempted rotation code for animals that was dropped during the dev process.

By using Combat Ability value 64, it is possible to set an Aura on the unit to “slow itself” when enought other phalangists are near.

Basically, it’s Monaspa self-boosting effect based on surrounding other Monaspa. With abit of trick it is possible to multiply the speed by 0.xxxx to reduce the speed of the unit, theorically. This could solve the movement issue for that unit idea, assuming it has switchable state between deployer/undeployer Sarissa pike (Ratha-like transforming)

I have to try it yet, but I’m confident it’s usable.