BETA 54 Combat AI

Discussion in 'Clockwork Empires General' started by Trifler, Aug 31, 2016.

  1. Trifler

    Trifler Member

    After watching my colonists die in droves as they beat obelisks with their clubs and then all died simultaneously from the obelisk's death explosion, I wanted to post a few thoughts regarding the combat AI.

    1) I would love to have the ability to give individual colonists and militia a retreat order (as well as an ability to cancel the retreat order).

    2) When colonists auto-retreat, they should do so towards (and then past) friendlies. Especially if militia is in the vicinity.
    2a) Civilians shouldn't keep clubbing obelisks when their health is low!

    3) Badly injured militia should move to take a position slightly behind their comrades instead of remaining in the lead.

    4) As the AI is updated, don't keep the bandit AI on par with militia AI since it makes sense that the militia would be more organized.

    5) Anything that can be done to make the combat AI for individual colonists consider what other colonists are around them when making a decision would be very helpful. For example, if one militia member is injured, fall back, but if he/she is the last person standing, fight to the death (unless given a retreat order using #1 above). Likewise, if a whole mob of civilians is clubbing an obelisk, the near dead civilians should back away and let the still-healthy ones continue the fight.
     
  2. Puzzlemaker

    Puzzlemaker Member

    AI is hard to do, but a lot of that could be done by tying the fear emotion into combat. Simple algorithm:
    1. Every time a friendly hits an enemy nearby lose 1 fear, down to you base fear level (fear level before combat began)
    2. Every time you are hit gain 5 fear
    3. Injuries add to your base fear level, scaling based on severity
    4. Every time a friendly nearby runs, gain 10 fear
    Those numbers are placeholder, but that should simulate morale and breaking better then how it currently works. Soldiers of course are more immune to fear based on their level. There could also be an invisible stat, morale, used instead for all colonists. I like the idea of using fear though, it would make it visible to the player.
     
  3. Trifler

    Trifler Member

    Good thought, but #4 would quickly route your entire force, so I don't think #4 would work well.

    The first three are good, but I still think the AI should consider the amount of health the colonist has. If the colonist was low on health to start out with, they wouldn't run away if it was based solely on 1-3.
     
  4. Puzzlemaker

    Puzzlemaker Member

    Nope! Rule number 3 can make someone run instantly if they are injured enough, based on how you scale it. Also, remember rule number 1, so if you are with ten guys, if one runs away you will quickly lose the fear gained from your buddies pounding on the enemy. Basically, rule 1 makes it so if you outnumber the enemy you won't run, but if it gets more even then you begin to break and run, which is perfect.
     
  5. Trifler

    Trifler Member

    Hmm... ok. I'd have to see it in action, but it sounds good.