Morale & Related Factors

Discussion in 'Clockwork Empires General' started by Tikigod, Aug 18, 2015.

  1. Tikigod

    Tikigod Member

    Background

    Recently started a fresh game and within the first day a bandit camp sets itself up, only 2 bandits so not too big a deal. They soon raid my colony, I order my NCO to fight back and add a worker to their unit... after all 1 trained military officer and a militia fighter versus 2 bandits? Clearly I have the more disciplined force and the NCO will carry the fight.

    Fight breaks out, NCO fires at one bandit and gets them to flee. 2nd bandit engages my militia and fires a single shot which breaks their morale and they flee off into the wild. Bandit then focuses on my NCO, having soaked a few shots themselves themselves but still fancying their chances against my trained officer.

    NCO takes 2 hits then runs for their life as well... or rather they disengage from the fight, decide to adopt a hauling job and casually strolls to a pile of wood whilst the bandit guns them down.

    Somewhat frustrated, but these things happen. Next time I'll be ready with a full militia force. But then a 2nd and 3rd bandit group arrive. Both having almost half a dozen bandits. hmmm going to be quite the fight.

    Except it's not, there is no fight. One group raids my camp, my 5 man militia unit all take 1 hit each before their morale breaks even though they're 5 militia with pistols against 2 or 3 bandits with melee weapons. At one point I got raided by half a dozen bandits, all but one just grab goods and leave whilst my militia engage a single bandit armed with a sword... and the bandit wins, because they hit each militia unit once and that's all it takes to break their will to fight.

    Next militia fires a shot, bandit shifts target, hits them once, repeat until you've got a colony where absolutely no one will fight a single sword wielding bandit who promptly chases down and kills half the colony, even after shifting who the militia is to cover the entire population until no one at all has any morale to fight.

    Something just isn't working on a very base level with the current system, it's nice and simple in application for sure but because of that simplicity there just isn't enough factors in play to allow for a wider range of behaviour to see fights through.

    Discussion Point 1: 3 Stages of Morale

    So what seems to be needed going on what the current build contains are more factors that go into morale, as well as the role morale plays in a units ability to engage in fights.

    Something that may be a step toward improving the situation is to break morale into more stages rather than just the current binary "Fight" and "Flee" modes. Something like:

    50% - 100% morale

    Full combat engagement. Will engage anything that's a threat without question.

    25% - 50% morale

    Self preservation combat. Will engage anything not an immediate threat to themselves. Factors that go into considering what is an immediate threat:

    * Distance. If they're too close, flee until there's sufficient distance then engage again.

    * Am I a target? It's quite easy to tell if someone is pointing a gun at you or someone in a completely different location, as well as if someone is charging at you with a sword. So allow colonists to determine if they're currently a active target to any hostile entity. If not, fight. If so, flee until no longer being engaged.

    * Weaponry. This would act as a kind of weight balance factor between the last two to make it more flexible. If a unit has a gun and is within the normal flee distance and is actively being targeted, weigh up the weapon factor between unit and enemy to decide if there's a little more room to carry on engaging until the flee state triggers.

    0%-25% morale

    Broken morale. Just run for the hills. Pretty much what any of your colonists do at the slightest tickle in current builds.

    Discussion Point 2: Morale Influencing Events

    On top of the 3 stages of morale, some kind of short lived morale boost (or subtraction) events could be introduced that could allow individuals to pitch in to a fight longer if certain things occur. Some examples:

    * Enemy unit dies. If a enemy unit dies, all friendlies near to the event receive a boost to their current morale and feel that maybe victory is actually achievable.

    * Witness a civilian being killed. Would only apply to colonists not in the completely broken morale state. At witnessing the death of a civilian, combat forces are more determined to protect the colony and receive a temporary morale boost. (Certain personality traits may influence this to make it a morale decrease instead)

    * [Situational] Last stand berzerker. Only applicable to colonists with certain personality traits (Like patriotic). A colonist already in the broken morale state may enter into a morale ignoring state if they've continued to be attacked whilst fleeing and are on the brink of death. They suddenly take up arms again and stop fleeing and will continue to fight for a short period before finally dropping to the ground.

    Discussion Point 3: Why Can Some Bandits Be So Tough and Stubborn?

    Occasionally you will likely come across a bandit that for lack of a better term appears to be almost god like in their behaviour, typically this is the bandit wearing something like a crap ton of clunky armour and has a helmet which looks more like a bucket.

    They'll soak up dozens of shots from a pistol and not drop and seem almost entirely immune to morale fleeing.

    Why would there be bandits that represent something that exceeds the capabilities of even fully trained and disciplined empire troops? Should there be human enemies that break the typical rules that applies to everyone else?

    Or should there be a standard baseline that stands for everyone of a certain type of being and instead threat being focused on presenting the player with challenges that maintain the kind of scale the player has to deal with on their end as well?

    (Note: I'm fully aware 'cheating it' is a common practise in presenting game difficulty. But it's done often in cases where it really wasn't necessary and is instead used to just simplify some ones job rather than for contributing anything positive to a game. The XCOM reboot being a fantastic example of just breaking every game rule possible to give the illusion of actual difficulty and challenge in what is otherwise simple and buggy behaviour.)
     
    Last edited: Aug 18, 2015
  2. Samut

    Samut Member

    Anyone wanting to understand the difference in how colonists and bandits handle morale should go through and compare the files bandit.go and citizen.go in your CE folders (should be in C:\Program Files (x86)\Steam\SteamApps\common\Clockwork Empires\scripts\gameobjects on a Windows box).

    I'm not going to go through the specific differences, but described broadly, bandits lose morale points from taking damage, or seeing nearby bandits get attacked or killed. They get morale back through the simple passage of time (1 point/second IIRC). So a bandit that gets shot a couple of times or that is nearby other bandits that get killed may turn around and run for a bit, then 10 or 20 seconds later find their nerve and come back. If their morale drops below a certain point they'll flee for good back to their camp but that probably only happens when there are lots of people on both sides (so they'll get penalties from lots of their fellow bandits getting hurt).

    By contrast, colonist morale is determined by comparing the point totals accumulated by their memories in five categories: happy, sad, fearful, angry, and shock. Memories give different amounts in various categories; they're mostly listed in histories.edb, but for example, the one where a colonist gets hurt ("Damaged"), has a value of fearful 50, angry 25.

    A colonist at full morale has a morale of 0. Then IIRC the values for three of the emotions (sad, fearful, shock) are summed and compared to the total for all emotions, and that fraction (times 100) is how much their morale is lowered by. So if those emotions made up, say, half the total, then they'd have a morale of -50 (half of 100). Colonists have thresholds for fleeing based on their morale and whether they're military, militia, or neither.

    While this is all very clever and cool, one problem is that a frightened colonist can't change their morale until they get some new memories, and someone who's getting chased around by a bandit isn't likely to get any helpful memories any time soon.

    The best way to fix this would be to take shock out of the mix of emotions that determine morale (just like madness used to be in the mix but was split off later). Memories that involve fear should get some of the points allocated to shock instead. So "Damaged", above, might be shock 25, fearful 25, angry 25.

    Then, calculate morale as before, but with just the sum of sad and fearful compared to the sum of sad, fearful, angry, and happy. Then subtract the value of their shock level, but allow shock level to lower a point a second, until it gets down to 0. That would allow colonists to recover from an initial fright more easily.
     
    Last edited: Aug 18, 2015
  3. Rentahamster

    Rentahamster Member

    Wow ,nice info, thanks.

    Is there anything besides making friends, eating cooked food, drinking, getting a good nights rest, or listening to poetry, that generates good memories? It feels like good memories are hard to come by. I thought maybe looking at artwork would help, but that doesn't seem to do anything.
     
  4. Wolg

    Wolg Member

    I'm not convinced all memories are actually working; in particular, people who don't initiate a conversation don't seem to get any memory for it.
     
  5. Samut

    Samut Member

    Interesting. I haven't looked at that. Are they supposed to get a memory?
     
  6. Wolg

    Wolg Member

    They did for the longest time since builds in the 20s; the conversation starter would get the "had a conversation about" memory, the other would get one about having the conversation or being angered/enjoying/saddened/etc by it (corresponding to the speech emote they displayed in reply). I don't know if it was intended, but for a few builds now I haven't seen any of the latter memories show up even on colonists freshly arrived, whose memory tracks have plenty of room.
     
    dbaumgart likes this.
  7. Samut

    Samut Member

    Good catch; hopefully someone from Gaslamp will see your post.
     
    dbaumgart likes this.
  8. Daniel

    Daniel CEO Staff Member

    It is known. I'm coming at the problem from another angle right now though, which hopefully will improve this whole process of noticing ones that aren't firing properly or doing things they shouldn't. I'm sure the conversations aren't the only ones acting up.
     
  9. Tikigod

    Tikigod Member

    Any word on the topic of morale and what plans there are for it further down the road to better balance colonist behaviour during combat? :)
     
  10. Daniel

    Daniel CEO Staff Member

    It all hinges on us making a more robust decision tree system that sits on top of character behavior simulation logic. It's on our todo list for this month (Nick just mentioned it in the blog post today). We know what we need to build, we just need to do it, and it's a high priority, it just keeps getting derailed by random craziness.

    Worth noting that while, for combat, we're going to be hard-wiring some behaviors rather than letting the simulation handle all of it, they won't be automatons, and we will be writing behaviors for characters in combat with specific traits etc., it just ended up being a (rather interesting) conflict of interest between what our weird little sociopathic characters wanted to do, and what players expect.
     
  11. Tikigod

    Tikigod Member

    Awesome to hear, will check out the blog article. :)

    Thanks for the update!

    Edit: Read the blog, noticed Nick still failed to start the '4 laws of Stockbotics' at the appropriate zeroth law even after having it pointed out on the forums in advance. So much disappointment.

    What hope does the future of Stockbotics have if it's going to stumble at the first hurdle. :(
     
    Last edited: Aug 19, 2015