Table of Contents

Loggy's Morale check and Fear reverse engineering notes

Morale Check

(dom v5.53) This is done on a nation by nation basis.

Morale Problems

(v5.53) The things that alter morale problems (besides those in the morale checking function itself) are as follows:

Fear and Temporary Morale decrease

Fear effects (and the unused but functional temporary positive morale effect) provide unit-by-unit modification of morale values. This can go no further than 5 in either direction. The modifier is halved (rounding down) every combat round.

TL;DR

Commanders are squads of one, which makes life easier and simplifies a LOT of this.

Commmanders

All units have a hidden "morale problems" value. At least, this is what Illwinter call it in the debug log.

Only units with morale problems are valid for morale checks here. Stuff like HP routing is different, this is for "normal" routing only.

For sources of morale problems, scroll up a little bit.

A commander simply makes a morale check whenever it has a morale problems value greater than zero.

In order for a commander to flee:

5 + Commander's Morale + DRN < 14 + DRN

If the commander does not flee, the morale problems value is set to zero, so they will only make a check next round if they get some from any source.

Squads

This is still complicated, sorry.

For squads, the only value that matters at morale check time is the highest morale problems value among all units in the squad.

Calculate the average morale of all alive squad members. I'm not certain how the formula makes this round, but it ends up as an integer. Units with 30+ morale (from eg gone berserk, or a mixed mindless/nonmindless squad) are treated as if they had 30.

Search for the highest morale problems value of all alive squad members.

Calculate the "half squad size". This is half the number of alive squad members rounded down, or 100 if there are 200+ still alive.

The game records how many members the squad had initially at battle start.

There are some special bad cases, which make your check harder. If all of the conditions on a row are met, this is a "bad case" morale check.

A squad takes a morale check if…

The "half squad condition" is met when the squad's morale problems value meets or exceeds the half squad size. Given that fear effects add morale problems in thousands this is essentially guaranteed to be met when fear is involved.

Bad case table:

Percent original members alive Average morale requirement Half squad condition
80 or less 8 or lower y
75 or less 10 or lower y
70 or less 11 or lower y
60 or less y
30 or less
Closed d4 matches or exceeds the number of alive units in squad y

If a squad makes a morale check, it routs if…

 4 (unless bad case, then zero) + average morale + ([original squad size / 2] + [num alive members * 5])/original squad size + DRN < 14 + DRN
 

In any case, the morale problems values of all squad members are set back to zero, regardless of the check result or if a check was even made.

Other Notes

There are many misconceptions about the Fear aura. Like any other aura, it fires off little single square "bursts". If you want to see what this looks like, roll a test game as Shinuyama and observe the sleep aura at work.

Auras cannot hit more than one square away from the source unit without a value of 25+. I suspect the manual's words on this subject are holdovers from dom4. I have found only evidence contrary to this when disassembling the game, including going to lengths to make fear auras produce a visible effect, which makes them look rather like the sleep auras in my recommendation above.

There will quickly come a point where stacking more fear aura won't help you much. After all, once you've hit 10000 morale problems on a squad (or any on a commander), throwing more will just lower the average morale of the units you hit, and as above getting a lot of "reach" on your fear aura requires stacking it to extremely high values, which is expensive. And even if you do that, you might be able to bring down the victim's average squad morale by 1 or so.

The differences between commanders and normal squads are not special cased specifically by the game. If you ran commanders through the squad logic, you'd find that they will always trigger the final "bad case" (d4 must always be 1 or higher, half squad size = 1/2 rounded down becomes zero, morale problems always greater than zero so half squad condition always met) and trigger a morale check accordingly.

5.59 -> 5.60

The 5.60 patch notes stated they fixed an overflow in fear. Illwinter also changed a little detail of fear mechanics in 5.60.

When hit by a fear effect…

In 5.59, if you had six bakemono in a squad and all in one square together, and hit them all with a fear effect…

Hit the first guy, add 1000 to all members, then set the first hit guy's to 1000 (all at 1000) Hit the second guy, add 1000 to all others (all at 2000), then set this hit guy's to 1000 (5x 2000, 1x 1000) … Hit the last guy: the first hit bakemono has 6000 morale problems, the second 5000, the third 4000… and the last guy ends at 1000

If you did this again (as many times as you wanted), you'd find the morale problems value didn't change, and no matter how hard you hit this squad with fear effects they'd never make a morale check from that alone due to not passing 10000.

The 5.60 change throws this out of the window, and after being hit once they'd all be sitting at 7000.

The overflow thing was simply that morale problems would overflow (become -32768) once passing 32767. In theory it would be possible to have used this to avoid making a morale check, but due to the incremental morale problems you got when blasting squads with fear this would probably have required your opponent to tactically kill all the guys with 10k+ while all the overflowed squad members were fine with it all. Good luck to them on that one.

5.60 simply makes it not exceed 25k any more. 25k isn't really significant though, as for all but the most insane intents and purposes anything over 10k may as well be the same…