Morale / bravery / panic system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
In Progress
|
Wishlist
|
Renegade |
Bug Description
No prizes for why I want this!
And apologies for the wall of text, I've tried to be as concise as possible.
All units start with a Morale of 100. Morale is always between 0 and 100.
When Morale is between 50 and 100, units function normally.
When Morale is between 0 and 49 there is an increasing chance that the unit may panic (like the civilians waving their arms around) or go berserk (chaos).
When Morale is 0 the chance of the unit panicking or berserking is 100%.
Bravery= int ;between 0 and 100. Bravery affects a unit's morale loss/gain.
Events that affect morale:
A unit dies = +10 to all enemies of that unit, -20 to all friendlies of that unit. The killing unit gains an additional +20 (or -20 if it was friendly fire).
A unit is healed = +(percent of max health that the healing weapon could have restored) to just that unit (assuming medkits have stimulants, etc)
A unit is damaged = -(percent of max health lost / 2) to just that unit
A unit panics or goes berserk = +15 to just that unit (they've panicked and thus recovered a bit)
The above values are base values, which can be affected by the following:
Bravery acts as a multiplier. Multiplier to effect on Morale = 100-Bravery
So a unit with 100% Bravery gets no effect from Morale changes. A unit with 0% Bravery gets full effect from Morale changes.
Veterancy. The most veteran unit near to the person who is getting worried will reassure them, like so:
XXXXXXXXXXXXXXX
X++++++
X++++++
X++++++
X++++++
X++++++
X++++++
X++++++
X++++++
XXXXXXXXXXXXXXX
Unit # just got sniped by enemy E. Units I, I, J and K are all close enough to be upset by this, but only units I, I and K are close enough to Sergeant K to be reassured by him.
Each veterancy level of the best officer reduces the morale loss of units in range by 5%. So a rookie doesn't do anything, a veteran helps 5% and an elite helps 10%. This should be extended to multiple veterancy levels if they are added in future (which would be a nice accompaniment).
HOWEVER, an officer getting killed INCREASES morale loss, by double the amount.
So a sergenat getting killed will cause nearby friendlies to lose 22 morale, and enemies to gain 11 (33 for the unit that killed him).
There will be another thing that can affect Morale:
Use of a new Panic weapon: On the warhead, PanicAtack=yes means the attack will drain morale instead of dealing damage.
Panic weapons are not affected by the above modifiers in the usual way.
The amount of Morale drained is always equal to the weapon damage minus target Bravery.
So a Panic weapon with Damage=100 against a unit with Bravery=60 will drain 40 points of Morale.
You may want to add an anti-panic weapon, so negative damage on a panic weapon would have to disregard Bravery.
Bravery should default to 100% so that units are not affected by default.
Now, when do they panic?
Whenever a unit loses morale, if the resulting morale is below 50, the chance of them panicking is
100 - (2 x Morale).
IF the unit panics then there is a 35% chance that they will go berserk instead of simply panic.
Finally, many of these values I can see people wanting to control themselves so
[General]
Morale.Base=100
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Morale.
Oh yeah, and a second health bar to indicate current morale! Like the plan for shields - so we could have green bar = health, blue bar = shields, purple bar = morale.
[Unit]Morale.
Mmm, I can see this being a pain in the arse to code, especially with regard to weapons & morale damage. Do flamers do more than sniper fire (for example)?