Two Critical elements still missing from AI Combat Behaviour

Users who are viewing this thread

1) Distance control in melee combat.
Face hugging from warband is still how AI operates. I am impressed with the blocking / parrying / fainting behaviour, but the footwork is just not there, still makes them easy targets.

Here is a high-level example of an improved AI logic:

- Get targeted enemy's equipment, get current weapon, get the effective lenght of that weapon (measure from the bone where the actor is holding it), add constant for arm lenght at full swing, keep that as "stay out distance" for current "locked on enemy". Based on AI level check weapon lenghts of more nearby enemies.

- Get currently equipped effective weapon lenght + add constant for arm lenght at full swing.

- In the loop runs governs AI movement:
If the AI's weapon is longer but players weapon is shorter, make AI move to try to goal seek at the distance where their weapon can reach, but players weapon cannot.Reacting to enemies distance and movements.

- If the AI's weapon is shorter but players weapon is longer, make AI try to goal seek to stay out of range of the players weapon and stay there. Move in when trying to perform an attack, holding down block first if player has an attack readied. Once the attack has successed / failed and its time to block again, try to move back out of the range of the players weapon.

- This ofcourse would be modified by formation logic, morale, AI melee skill, overall combat skill / experience, where the AI is travelling to, etc.

I know this is very high level but the overall goal here is to achieve a feeling of a AI footwork that is more tactical, more human like, and more than just Face-Hugging.

2) Weapon switching.

- Player control weapons of soliders, add a menu under the F1-F11 key controls (I suggest F5, and move eveyrthing else down to F6 and lower)

Hit F5 Then the options would be:

"F1 - Use close quarters weapons": AI would parse through their inventory, look at all weapon lenghts, equip the shortest weapon in their loadout.

"F2 - Shields up": AI would pull out their shields if they have any, than start moving with them up at all times (Same as shield wall, but keeping the current formation or loose spacing)

"F3 - Two Handed": Pull out two handed weapon out of the inventory if they have any, if they have multiple, cycle through 2H weapons on the next button press

"F4 - Polearms": Pull out Polearm out of the inventory if they have any, if they have multiple, cycle through Polearms on the next button press

"F5 - Ranged": Pull out Ranged weapon out of the inventory if they have any, if they have multiple, cycle through Ranged weapon on the next button press

"F6 - Auto (Switch at Will)": Back to AI logic, not forcing them to have certain equipment in hands

AI would ignore the above if:
-Does not have weapon type in current equippment
-An archer/ranged is being approached by an immediate melee threat.
-AI is holding a shield but no (1h weapon / spear to go along with it) and is being approached by an immediate melee threat


- AI needs the logic tuned for switching between polearms / shields / ranged.
- Better tuned prediction for when the enemy is going to close in, archers switch from bows to swords, right before they are about to get struck and die.
- Better tuned logic for swapping to/from shields not standing there being peppered by arrows
- Better tuned logic for swaping from polearms to swords in close quarters, sieges or cav clusters
 
Last edited:
Not sure what you mean by that, I did not see any of what i suggested as planned, nor did i see it in the decompiled AI code but alot of that functionality is probably there already

I am asking if you are suggesting these improvements for the AI that was in 1.0.10. As far as I know the AI in 1.1 is broken so it wouldn't really apply (you mention that you were impressed with how good the AI was at the beginning which makes me think that you refer to 1.0.10).

Unless you are impressed with the AI in 1.1, which to me would be confusing. Hence my question.
 
Back
Top Bottom