Just had a battle out on the plains west of Whiterun. It was bad enough that I got jumped by a dragon. Then, the dragon flew a ways away and started chillin’ a nearby mammoth. Lydia and I continued to take potshots at Mr. Dragon (Mrs. Dragon?) while the mammoth ineffectually stared down its assailant. Eventually, the mammoth started running (right past me and Lydia!) and the dragon seemed to give up on it.
Unfortunately, I soon realized that there were a couple of mages wandering around the area who, for some reason, apparently decided that Lydia and I were far more menacing than the circling beast. And thenÂ there was the skeleton — who may or may not have been the product of the mages who started attacking me. By the time I dispatched the skeleton, the dragon had gotten bored with whatever it was he (she?) was fighting nearby and came back to visit. This all came to a rather unfortunate end… but that’s not what I came to tell you…
|“There seems to be a serious lack of proper prioritization of targets.”|
The point of all of this is that there seems to be a serious lack of proper prioritization of targets. For example, despite the fact that a mammoth might look awful tasty to a dragon, said morsel is not going to be able to attack you.Â Better to dispatch the pair of annoyances that are pumping arrows into you and come back for the hairy buffet later.
The same can be said for the mages. If there is a dragon cruising around, it seems rather silly to attack two relatively harmless bipeds. In fact, the chances of defeating the dragon (and therefore surviving) would go up considerably if it was attacked by a group rather than by a couple of individuals. An additional bonus would be that the dragon might take such a toll on your secondary opponents that it leaves you an advantage you might not otherwise have.
Obviously the target selection algorithm doesn’t take a lot of this into account. It’s really a matter of mathematical modeling. Ironically, it is the same sort of modeling that goes into non-combat games such as The Sims.Â The good news is that it is relatively simple to put together and can adapt to pretty much any situation that your NPCs find themselves in. It can also be Â tied into the entire combat selection system so that the possible actions could include not attacking anyone at all (even running away, if necessary).
For those that are curious as to how such utility-based systems can be built, it is pretty much the entire point of my book, Behavioral Mathematics for Game AI.