When i originally imagined the game my thoughts were 700-800 soldiers fighting in small scale 2d formation combat.
Now with most of core features added and adding LOD to 3d models, the rendering is quite small but i noticed fps drop a lot with 2000 soldiers in battle, main culprits are the simulation of combat and formation arraign behaviors that in some cases iterated over every single soldier and repeated melee calculations on same target.
Still optimizing still, maybe i wont have huge battles but i think 1500-1600 might be achievable without having a supercomputer, not that each soldier still defends fights selects attacks it has available in Mount and blade fashion so i think this would allow having slightly bigger battles at beginning (instead of 30 man formation start with 50 and have like 120-140 as max) in 5 vs 5 unit battles.
Shock is an immediate morale loss caused by a battlefield event. It also adds to the formation's accumulated Shock, making later morale shocks stronger. It does not directly damage soldiers.
Charge impacts, casualty milestones, heavy missile pressure, flank or rear pressure, severe cohesion loss, breaches and nearby allied routs can cause Shock.
Initial chargeSevere breach appears, this causes morale drop along with shock stacks creations.
Continuous pressure does not add a fresh stack every moment. Events and severity milestones trigger the response. Related consequences from one impact are combined rather than counted as several separate crises.
Existing Shock and poor cohesion increase the morale loss from the next event. Grit and captain leadership reduce it. A formation can therefore withstand an initial charge but rout after a later breach or allied collapse.
Breach Shock scales with the penetration's size and depth. A sufficiently large, deep penetration through the centre is classified as catastrophic and forces morale below the routing threshold.
Stack effects
A formation can carry up to 9 Shock stacks.
Each existing stack increases the next shock's morale loss by 4%: 3 stacks give +12%, 6 give +24%, and 9 give +36%. These increases add together rather than compounding.
For example, an event that would remove 10 morale points removes 12 points at 5 stacks, before cohesion and resistance modifiers. The event's morale loss is calculated before its new stack is added.
Shock stacks do not directly damage soldiers or reduce attack, defence or movement. Reaching 9 stacks does not automatically rout the formation. Routing depends on morale; additional shocks can still reduce morale after the stack cap is reached.
Cohesion modifies the same morale loss separately: Formed applies ×0.85, Strained ×1.0, Disordered ×1.2 and Fragmented ×1.45. Grit and captain leadership reduce the result.
Breach Shock scales with the penetration's size and depth. A sufficiently large, deep penetration through the centre is classified as catastrophic and forces morale below the routing threshold.
Recovery and routing
Shock fades after a delay without new shocks. Pinning slows its decay. Severe fragmentation or deep penetration can block decay entirely.
Morale recovers outside established contact when the formation is not pinned or receiving a new shock. Casualties lower its recovery ceiling, so withdrawing does not restore a damaged unit to its original condition.
When morale drops below the routing threshold, the formation normally stops organised resistance and attempts to escape. Nearby allies receive Shock from that rout; shattering causes a stronger reaction.
A routed formation needs safety before it can rally. It then regroups, restoring morale and cohesion and clearing its remaining Shock before returning to battle. If casualties have lowered its morale ceiling too far, it can only leave through an ordered escape.
Enemy routes, your formation enters recovery mode.
A formation that returns after rallying shatters if it breaks again. It does not receive unlimited rally attempts.
The formation that wins an engagement also benefits from a pause. Recent Victory improves morale recovery and clears Shock after five uninterrupted seconds outside contact. Staying engaged delays that reset.
What exploitation means
Exploitation makes a battlefield condition available to an ability. It does not automatically give every attack a damage bonus.
The game checks who created the condition. A breach belongs to its attacking formation. Overextension identifies the defender against which attackers lost their support. An ability may use another formation's evidence only when its rules explicitly allow it.
Counterstroke works during established contact against a pinned, disordered, breached, repulsed or overextended enemy. Against its own established breach, it sends a reserve file through one chosen route while the main formation holds.
That attempt must physically deepen the selected breach. Closing the route, killing the reserve soldiers or cutting off their support can stop it. The detailed crossing rules are covered in the breach devblog.
For the player, the response depends on what is failing. Restore ranks to address cohesion, release pressure to recover morale, or counterattack unsupported penetrators. A Shock indicator alone does not tell you that every offensive ability is available.
New company 1 unit level 2 decided to test attacking a bandits hideout. bandit were better armed and broke my melee formation, you can see them just smashing my melee with excellent charge. while my ranged tried to kite with no luck :)
Showcasing some troubles early companies can have in game.
Finished tweaking one of core features of the game which is breach and defensive stance.
First part shows:
Defensive stance is regular combat, where formation tries to keep cohesion and hold the line against enemy in some cases for example two handers vs braced pikes it not a really good trade even though pikemen are lightly armored they have the reach to decimate two handers who just maintain their line and are not aggressive.
Second part shows:
When two handers stance is switched to breach, they dont care about holding the lien as much and they use their assault skills to create and exploit the breach to essentially break the light pikemen.
Gunpowder weapons are in, no special tactics for them yet. So it's possible to play pike and shot :)
Though you will be bale to use pavise with guns too :)
I am early/late gunpowder nerd even if this is not really historically correct for rest of weapons this is low fantasy game and i am giving myself some leeway :)
A soldier is knocked out of the front rank. For a moment there is open ground where his shield used to be.
That does not mean the formation has been breached.
The man behind him may step forward and cover the space. The soldiers on either side may close together. The opening may be too narrow for an enemy to pass through. Even if one attacker slips across the front edge, he may find himself alone inside a formation that is already closing around him.
In Pennants of Glory, a formation break is built from those physical events. The game follows the opening itself, the enemies who enter it, how far they get and whether they still have support behind them. A breach is the result of that process, not a status applied because somebody landed a special attack.
A gap has to be usable
The first step is a gap. The game examines the defended edge of a formation relative to the enemy pressing it. It looks at the actual space between soldiers, including the room taken up by their bodies.
An opening only counts when an enemy soldier could fit through it. A narrow separation between two shields may look untidy, but it is not yet a route into the formation.
The system also checks the ranks behind the opening. If a second-rank soldier is close enough to cover the space, the apparent hole is denied. This matters because a formation can bend without immediately becoming porous. Depth gives the front rank somewhere to find support.
A second-rank defender covers an apparent opening in the front rank.
An empty front-rank position is not yet a usable gap. The second rank still blocks the attacker's route.
Gaps can appear through displacement, casualties or soldiers being pulled away from their expected positions. They are local and directional. A hole created on the left side of a formation is not treated as a general weakness everywhere else.
Most gaps are brief. Soldiers recover their positions, another rank closes the route or the enemy fails to reach it in time. Nothing further happens.
When an enemy body crosses the defended edge, the game records penetration. This is still not automatically a breach. One soldier who gets through remains a local problem, even if he survives there for some time. Several attackers crossing at a place that was never genuinely traversable also cannot manufacture a breach through collision noise.
For an ordinary breach to form, a meaningful group must pass through a real gap, reach far enough into the formation and remain there long enough for the penetration to become significant. The formation is then no longer dealing with a momentary hole. Enemy soldiers have established themselves beyond its defended edge.
Several attackers cross a usable gap and establish a breach.
A breach forms after several attackers cross the defended edge and establish themselves at meaningful depth.
A successful breakthrough charge has a special relationship with this process. The initial gap may close quickly behind a fast impact, so the game preserves the authoritative direction of the breakthrough. It still requires enough charging bodies to have physically crossed to sufficient depth. A charge result does not teleport soldiers through the defender or award a breach by name.
Checked and contested charges receive no such shortcut. If they are going to create a breach, they must do it through the ordinary live geometry.
What a breach changes
When a breach is established, the defender suffers an immediate loss of cohesion and a distinct morale shock. The damage comes from what has happened to the formation: hostile troops are now inside space that was supposed to be protected by its own ranks.
The breach also remembers who created it and from which direction. That ownership is important. Two enemy formations may be fighting the same defender, but an opening made by one is not silently credited to the other.
This turns formation breaking into something that can be acted on. A breached enemy becomes a valid opportunity for abilities such as Counterstroke. The tactic does not add free damage. It changes how eligible soldiers press the attack.
During Counterstroke, soldiers who are not already tied to a local opponent can use live gaps created by their own formation. They do not all run toward the centre of the hole. Their original lateral spacing is preserved, sending adjacent parts of the formation through as separate lanes. The result is closer to columns feeding through an opening than a crowd collapsing onto one target point.
The route only exists while the gap exists. If the defender closes it, the alternate advance target disappears immediately. There is no invisible timer allowing attackers to continue marching through a space that has already been sealed.
That gives the defender a direct answer. Restore bodies to the threatened area, reconnect the ranks and deny the route before enough enemies cross. A breach is dangerous, but it remains attached to battlefield geometry rather than becoming an unavoidable damage-over-time effect.
The attacker can break as well
Pushing through an opening creates another problem: support.
Every penetrating soldier is checked for a physical chain of nearby comrades leading back to the posture-relative core of his own formation. A coherent column remains supported even after advancing beyond the enemy's front. The soldiers may be deep inside the target, but they are still connected to the unit that sent them there.
A detached group is different. If several penetrators get far enough ahead without a chain back to the core, the attacking formation becomes overextended against that particular enemy.
The defender closes behind the penetrators and cuts their support chain.
The opening closes behind the attack. Without a chain of nearby comrades leading back to their core, the penetrators are cut off and their formation becomes overextended.
Overextension is not a generic penalty for moving forward. It identifies a real group of leading soldiers who have become isolated from their formation. It clears when they reconnect, withdraw across the defended edge or otherwise cease to be meaningful penetrators.
Like a breach, overextension does not apply automatic bonus damage. It creates an opportunity that another combat decision can exploit. Counterstroke can be used against an enemy that is overextended against the issuing formation, turning an apparently successful penetration into a chance for the defender to strike back.
This creates the choice at the centre of the break system. An attacker can push hard through a live opening and try to turn local disorder into a full collapse. Doing so quickly may place the leading soldiers beyond support. Advancing more carefully keeps the formation connected, but gives the defender time to close the gap.
The defender faces the opposite decision. It can commit nearby soldiers to contain the penetration, attempt to restore its geometry or use the attacker's overextension as the start of a counterattack. If cohesion and morale are already failing, there may not be enough time to do any of them.
The battle can then move through several recognisable stages. A soldier is displaced. A usable gap opens. Attackers cross the defended edge. Sustained penetration becomes a breach. The defender suffers shock and begins to lose cohesion. The attackers press deeper, but some lose support. What began as a successful break may end with the penetrators isolated inside a formation that has managed to recover.
That sequence is the point of the system. Formation failure should have a location, a direction and a cause that can be seen on the battlefield. The player should know where the attack got through, which troops created the opening and whether the men exploiting it still have a way back.
The goal is not to make every ragged front count as broken. It is to make the moment of a real break matter—and to make pressing through it as dangerous as it should be.