Fodder
This enemy is designed to be a common mob with limited decisions and mild aggression. Its deliberately slow attack tempo should be easy to deal with during isolated encounters but may become overwhelming if multiple are allowed to converge. In future iterations I want these enemies to read as inexperienced militia, communicating uncertainty through hesitation and simple actions.
StateTree
Enemy Decisioning
The enemy is designed to move from Idle state to Combat state upon perception of the player. The enemy prioritizes attacking if the relevant conditions for those attacks are met. If the enemy cannot attack it decides to pursue until it can attack or loses track of the target. Upon performing an attack the enemy goes into a brief Disengage state where it will reposition around the player for a time before trying to attack or approach once again.
Thrust
A standard melee attack, primarily selected by the enemy when the player is in close proximity.
Gap
An attack with a bit more range that moves the enemy towards the player through root motion.
These can be interrupted by player attacks. While simple, these attacks are meant to work together in making sure the enemy has variety and options to respond to the player on a rudimentary level.
Implemented and Planned Iterations
Implemented
Upon first implementation this enemy would run at the player, throw all attacks back-to-back, and keep the minimum distance from the player. To fix this I implemented the Disengage state and attack cooldowns. Resulting in a more natural tempo during combat.
The enemy also had issues with keeping track of the player if sight was lost. I implemented a delayed forget system to fix this.
Planned
Planned iterations for this enemy are to create a stronger identity with new attack animations that clearly communicate the intended untrained militia behavior. In doing so, I would also focus on making the attacks a bit easier to read visually.