Topic: Combat AI Improvement: AI should utilise its one-sided ranged attack capability  (Read 2352 times)


ineedcords

« on: June 29, 2021, 03:11:35 AM »
I was just watching a YouTube video, PC had 3 fine javelins, the enemy (single Njerp) had none.
On a side note enemy appeared to be the poorest Njerp in Finland BTW with linen clothing and just a handaxe and a rope.

What happened in the early battle is: PC threw all 3 javs as opening move, hurting but not killing Njerp. Njerp did pick up only the 1st jav then wielded it. PC had no other missiles weapons left. At this point in time in the battle, there are ~3 empty tiles in between the two, as per picture below:


Here is my Combat AI Suggestion (which I think would be an improvement): at this point, holding the single missile weapon in hand and having adjacent-tile access to the only other two remaining missiles in the battlefield, Njerp should have used its missile advantage to execute ranged attacks. Perhaps AI actively should check whether one-sided ranged-attack capability exists to evaluate this kind of situation.

What happened later in the battle is: Njerp completely ignored its ranged capability and closed distance to attack with wielded jav as a spear.

On my mind it does not make sense to close distance to the sole enemy when you have one missile in your and and two missiles on the ground next to you.
Why not throw them first and see if you get a lucky hit. Is this not pretty much every human would do? Please let me know what would YOU do here? (That is, assuming you actually care about your character and would like it to survive the battle and not after any particular skill point training such as shield/dodge/spear/unarmed etc. Let's just say you just want to eliminate the threat ASAP).

Evaluating other options/approaches I can think of:
1) I can understand the idea of keeping one (out of three) javelins in hand as wielded weapon, as sort-of-a-spear but cannot understand why not utilise the remaining two javs as ranged attack capability.
2) A potential explanation "Njerp did not ranged-attack because its spear-skill was low" does not make much sense to me as even low spear-skill Njerp should throw it and see if it gets lucky - furthermore it did wield the jav indicating a not-so-bad spear-skill anyway.

While RNG adds spice to games, it probably should be 90% chance in the above scenario to pick up and throw javs (at least one if not two of them).
I might be overlooking something simple, please feel free to correct me if so and share your thoughts on this... Thanks in advance.
This could be a good day to utilize your squirrels hides.

PALU

« Reply #1 on: June 29, 2021, 09:24:05 AM »
Unless things have changed recently, NPCs don't know how to use thrown weapons. They stupidly pick them up loading themselves down, and can use javelins as melee weapons, but that's it.

From a tactical point of view, if I had a lousy spear skill and the enemy had injured me with thrown javelins, I'd hesitate to give them back for a new attempt, especially if the opponent has decent armor. I could consider throwing the javelin and hope the enemy would spend time picking it up while I closed the distance, though (or, more likely, try to get away from the enemy as quickly as possible, in which case throwing the javelin would mean reduced weight and a possible diversion).

ineedcords

« Reply #2 on: June 29, 2021, 03:52:04 PM »
Unless things have changed recently, NPCs don't know how to use thrown weapons. They stupidly pick them up loading themselves down, and can use javelins as melee weapons, but that's it.

From a tactical point of view, if I had a lousy spear skill and the enemy had injured me with thrown javelins, I'd hesitate to give them back for a new attempt, especially if the opponent has decent armor. I could consider throwing the javelin and hope the enemy would spend time picking it up while I closed the distance, though (or, more likely, try to get away from the enemy as quickly as possible, in which case throwing the javelin would mean reduced weight and a possible diversion).
Thank you PALU. I did not think of AIs lack of thrown-weapon ability. After reading your post I am trying to remember the last time I ate a jav from a njerp/robber and can't remember one (although enjoyed many of their delicious arrows) so it indeed could be as simple as that in which case I guess I am requesting a different new feature here...

I probably disagree with the tactical point of view analysis due to one reason though: by the time Njerp throws 2 javelins from 3 square distance, opponent (PC) will have time to pick up + wield only one; and in worst case scenario can throw one or more likely zero (timewise I think it needs testing to be sure).
In this case as AI cannot throw weapons, it's a moot point for most though.
This could be a good day to utilize your squirrels hides.