Scarlet Shocker Posted 21 hours ago Posted 21 hours ago We know that every mob we come up against has a range of attacks. We know that the more powerful they are the more attacks they have. We know tht some signature characters have some interesting stuff going on (See Personal Stories if you don't believe me) So I'm building a char and it occurs to me that an enemy (I have an amorphous AV in mind) is attacking me back. Imagine for the moment we are one to one. S/he has a variety of attacks, probably about 5 or 6 at that level. What determines the attacks they use once we are in combat? How are the decisions made for an NPC to attack me? I understand that if I'm at range there won't be many melee attacks aimed in my general direction but say s/he has 3 range and 2 melee, I'm outside of melee distance, what actually determines the next attck used? Is it the next cab off the rank? The most damage dealt? A random choice? Cthullhu made me do it? A Nemesis plot? What I'm driving at is simple: Is there an attack chain that NPCs use? Is it predictable? Do they all use the same chain (or not)? etc etc Knowing your enemy's move can save the day. All the best chemistry jokes argon
biostem Posted 21 hours ago Posted 21 hours ago (edited) I think it's a fairly simple if-then routine with some tweaking for entity type and other situational factors. For instance, are they in melee range or not? If in melee range, check for available melee attacks. If one is available, use it. If not, check for available ranged attacks. If neither a ranged attack nor a melee attack are available, either run or remain, depending upon critter behavior and whether they have been taunted or not. As to which specific attack an enemy might use, that I cannot say, but I think it defaults to a ranged attack, (going strictly by my anecdotal experience)... You'd need someone far more familiar with the game's code to tell you for certain, but it isn't any sort of complex AI or anything)... Edited 21 hours ago by biostem 1
Maelwys Posted 9 hours ago Posted 9 hours ago (edited) 12 hours ago, Scarlet Shocker said: What determines the attacks they use once we are in combat? AFAIK assuming that you're currently within range of multiple attacks, which one they actually pick to wallop you with is random. float randomPower = randomPositiveF32() * preferenceRange; Edited 9 hours ago by Maelwys 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now