Unreal Engine 5.8 · Win64 · one runtime C++ module · Blueprint-first · full source
Enemies that fight to the last man read as machinery. The usual fix — a float, a threshold and a bool — reads as a bug, because an agent hovering at the line flips between brave and terrified every frame.
MoraleBreak gives every agent a morale value and a private nerve that decides how much it takes to shake them, spreads panic through a squad as a pull towards the group's average so a rout looks like one, and separates the level at which somebody breaks from the level at which they rally so nothing can flicker.
Events carry a reason all the way to the state change, which is what lets the right line of dialogue play.
Frame-rate independent by construction: the decay and the contagion are per second, and the tests prove two half-steps equal one whole one.
- Add a Morale component to every agent. Give a squad the same Squad Id.
- Bind On State Changed and do whatever Shaken, Panicked and Routed mean in your game.
- Call Report Event At Location (AllyDown, …) when somebody dies.
UMoraleComponent— morale, nerve, the state machine, the delegatesUMoraleBreakSubsystem— squads, averages, one clock for everybodyUMoraleBreakStatics— the rules as pure functionsUMoraleBreakSettings— thresholds, hysteresis, nerve range, and the event weight table- A demo level that runs without pressing play
- Six automation tests over the rules that fail quietly
https://wiki.teufel-engineering.com/en/MoraleBreak/documentation
Copyright 2026 Silvan Teufel. All Rights Reserved.
This repository contains the full source of a commercial Unreal Engine plugin. It is source-available, not open source: read it, evaluate it, then buy a license to use it. See the Fab Content License Agreement / Unreal Engine EULA (purchase required).
Get it / Buy:
- Buy on Fab (this plugin): https://www.fab.com/listings/ddda5215-c87c-4441-b71c-b5a8df5e538a
- Fab store — all our UE5 plugins: https://www.fab.com/sellers/Silvan%20Teufel
10 ready-to-use C++/Blueprint building blocks (subsystems, versioned saves, async nodes, editor tooling) — MIT licensed. Get it by joining the newsletter — plus a heads-up when something new ships. Double opt-in, unsubscribe in one click, no address sharing.
© 2026 Silvan Teufel. All rights reserved.