So I was looking into the artificial intelligence of oblivion. I always wondered what drove enemies decisions in combat. I spent a little time looking at the construction set and found that it is all based on probabilities adjusted by their environment. Knowing what drives the enemies decisions can help to turn fights in your favor. So I thought I would share what I found in a (hopefully) simple but detailed way.
Please note that this is what enemies generally do, and the exact details will vary from enemy to enemy and can be found in the console or Construction Set.
When an enemy decides to become aggressive they will advance to their preferred range, melee is their weapon’s reach, archery is some amount of units away which can vary.
Once this happens they enter an ‘engaged’ state until their opponent leaves that range. I will mostly talk about the engaged state when in melee combat.
The AI works off of two different timers: the attack timer, and the movement timer. Once an enemy is within their weapon’s range they roll to see how long they will set the movement timer and sometimes roll an attack timer based on certain factors (I will refer to generating random numbers as rolling). These timers are usually between 0.5 and 1.5 seconds. Now that they have the timers decided. They will determine their movement and attack. Let’s start with movement.
An enemy has 5 possible choices for moving: forwards, backwards, left, right, and idle. The enemy will roll to see which one they will choose. When the timer expires they will re-roll both the timer length and the movement type. Their choices of movement are adjusted by what is going on around them and their stats.
- Slower enemies are less likely to move.
- Enemies will be less likely to move the lower their fatigue is.
- They are more likely to move while being attacked.
- If they are currently attacking they will be more likely to move forward.
- If they are being attacked they are more likely to move backwards.
Attacking and Blocking
Now comes attacks and blocks. An enemy will roll to see if they will do 1 of 3 things. attack, block, or hold (do nothing). They will roll again whenever they finish an attack, are blocking and an opportunity to attack is presented, or their hold timer expires. When an enemy decides to attack, they then decide if they want to do standard attacks or a power attack.
From my understanding, their attack and block chances aren’t opposed to each other. In other words, if something increases their chances to block, their chance to attack stays the same. However, I do not know what happens if the sum of their block and attack chances are greater than 100%.
- If they are under attack they are much more likely to block. (The default is 5x more likely)
- They are less likely to attack when under attack.
- They are more likely to attack when their sword, blunt, or hand to hand skill is high. And less likely to attack when it is lower. The same applies to block.
- If their fatigue is high they will be more likely to power attack.
It seems fitting that oblivion uses AI driven by chances to do certain things. Especially since their previous game’s combat was completely based on probabilities to hit or miss. This is just a step up in technology where they were able to use their experience in the past to make something completely different.
I hope this information helps you form some better combat strategies or understanding in simple AI! If I missed anything or anyone finds any inaccuracies please let me know! I’m interested to hear what people think about it!
Sources and further reading
If you would like to read more about the AI, and formulas used. Here are the main sources of information I used:
- Viewing combat styles within the Construction Set.
- Three Beat Initiative: Interspersed Turns for Simultaneous Combat Feel
- Retreating like a rabbit is selfish and ignorant.
- The one thing that all the “soulslike” combat mods haven’t done
More about The Elder ScrollsPost: "Oblivion combat AI: a hopefully simple explanation" specifically for the game The Elder Scrolls. Other useful information about this game:
Top 20 NEW Medieval Games of 2021
Swords, dragons, knights, castles - if you love any of this stuff, you might like these games throughout 2021.
10 NEW Shooter Games of 2021 With Over The Top Action
We've been keeping our eye on these crazy action oriented first and third person shooter games releasing this year. What's on your personal list? Let us know!
Top 10 NEW Survival Games of 2021
Survival video games are still going strong in 2021. Here's everything to look forward to on PC, PS5, Xbox Series X, Nintendo Switch, and beyond.