Target selecting, tanking and chasing

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

Message
Author
kkm
Noob
Noob
Posts: 1
Joined: 01 Mar 2011, 15:34
Noob?: No

latest svn getBestTarget() dont work

#1 Post by kkm »

Bot attacks not the nearest target or it dont recalculate best target after killing any mob.
It looks stupidly during the fight with non agressive mob.

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Target selecting, tanking and chasing

#2 Post by Darki »

This is not really a "bug" but I don't really think it's a feature suggestion either, so sorry if I posted it in the wrong section. Also, I guess this is something very talked but I didn't see any post around so I though it would be nice to make one. <_<

So, I know most people who has played with xKore or with a slave bot has probably noticed that the target selection of the bot is very weird. I guess it just picks the monsters in the order they appear in the range, same with dropped items. It also picks monsters randomly, I mean that if you have set to kill two types of monsters you can't make the bot to consider one of the types as "higher" priority" (as far as I know) than the others.

Would it be that difficult to do? I've been developing a homunculus AI and these have been basic functions: Search distance and priority for the monsters. It would make the bot look much more human if it picked monsters based on priority and proximity, and that changed target if there was a closer target (of the same of higher priority) as it approached the first one.

About the tanking option, and the attack setting at 3 in mon_control, the bot just attacks the monster once and then forgets about it. Even if the monster doesn't attack back. It has happenes, for example, that I've been using a low damage skill (throw stone) with my bot and it stunned the monster, or that the monster stopped trying to follow my bot after a while, and the bot never tries to "regain" the monster's attention. Maybe this function should be a bit more complex, adding a check so if the monster drops the target, the bot will try to get it again.

Finally, I've noticed that the bot moves weird after attacking using skills. Sometimes it moves innecesarily before going for another target or continue following my main. I didn't locate exactly what can be the problem.
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Target selecting, tanking and chasing

#3 Post by EternalHarvest »

Darki wrote:So, I know most people who has played with xKore or with a slave bot has probably noticed that the target selection of the bot is very weird. I guess it just picks the monsters in the order they appear in the range, same with dropped items.
Misc::getBestTarget claims to use distance when picking a target, maybe it's bugged.
It also picks monsters randomly, I mean that if you have set to kill two types of monsters you can't make the bot to consider one of the types as "higher" priority" (as far as I know) than the others.
priority.txt
About the tanking option, and the attack setting at 3 in mon_control, the bot just attacks the monster once and then forgets about it. Even if the monster doesn't attack back. It has happenes, for example, that I've been using a low damage skill (throw stone) with my bot and it stunned the monster, or that the monster stopped trying to follow my bot after a while, and the bot never tries to "regain" the monster's attention. Maybe this function should be a bit more complex, adding a check so if the monster drops the target, the bot will try to get it again.
As on monster dropping the target, it probably affects tankMode without using mobtraining too. I guess some monster-dropped-the-target detection can delete $monster->{ignore} and attack AI will attack it again. (But for stunned monsters it would be more complex.)

Also, the most part of AI needs some refactoring (moving from queue and processEverything subs to tasks).

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: Target selecting, tanking and chasing

#4 Post by Darki »

Well, you really got me with the priority. ^^U in any case... I still think that function could use some tweaking. Instead of just putting priority as the order of the list, it would be more usful if you could use a number for this, this way for example you could set same priorities for some monsters, or set them with less ptiority than undefined monsters.

About the target selection, I'm 99% sure it doesn't work well. My bot keeps going to attack monsters to the other side of the screen when there are some monsters near it, and it's very obvious because I've set it to tank me poporings and marins in the Angeling/Ghostring/Deviling/Mastering map, somtimes we get to places where there are at least 15 of them, the guy keeps "dodging" closer monsters sometimes.

Could it just be possible that once it acquires a target, it doesn't switch even if there are better options? As I said, I've been developing an AI and that issue was one that I had, even if it's supposed to get the closest monster, if it doesn't do periodical checks it will only work half well.

About the tank issue, it would be very nice if it could check when monster drops target. In any case, that would be a bit more complex if it's like how the AI works because the client doesn't consider a monster "targetting" you till it uses an attack or skill on you, so maybe adding a check with a selectable delay (like, tankMode_attackDelay or something) would be useful. If the time in that parameter passed from the first attack and the monster didn't counterattack, the bot will attack again.
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Target selecting, tanking and chasing

#5 Post by EternalHarvest »

Darki wrote:Could it just be possible that once it acquires a target, it doesn't switch even if there are better options?
attackChangeTarget?

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: Target selecting, tanking and chasing

#6 Post by Darki »

Well, that's weird because I have that one set (I gotta say, though, that I didn't remember that parameter, I used it some time ago and forgot about it lol) and all the issues I've been talking about happened with it. Might be a bad version i downloaded or something? I usually update with the SVN often but this month I've been busy with classes.
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Target selecting, tanking and chasing

#7 Post by EternalHarvest »

Dunno. It should work in case you're already moving to the target monster, but haven't really attacked it yet.

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: Target selecting, tanking and chasing

#8 Post by Darki »

I have set my priest to use Stone Fling (Stapo card) with attackChangeTarget and I suppose a good distance (5 cells, the skill range is 6 but that way it won't get "drunk" when the monster moves), but what I've noticed is what I've explained already. It looks like it takes monsters randomly, sometimes picking monsters very far even when there are better options, and yes, I've seen it change terget, but it happened so randomly that I just assumed it was due to monster going out of sight or something similar.

Apart from that, I use the bot in follow mode, as I said, as a slave, and I've noticed that it runs away from sight most of the times when chasing monsters. Sometimes it's me who has to follow it. I have followDistanceMax and Min very low, 4 and 2, so it should stay in place most of the times but I suppose the monster attacking takes more priority than following or something like that.

about tanking, what I said already. It just attacks once without checking if the target reacts, and also another thing I noticed is that it attacks all monsters on sight, so if there are 40 monsters on sight it will proceed to attack all of them, and of course in most cases die trying. It would be very interesting if there wasa max mob option.
ImageImageImage
ImageImageImage
ImageImageImage

Karoo
Noob
Noob
Posts: 5
Joined: 05 May 2011, 23:00
Noob?: Yes

Re: Target selecting, tanking and chasing

#9 Post by Karoo »

This was an excellent post/suggestion.
It's now 3 years later, and the bot does exactly the same thing as described in this post.
Target selection can be hugely improved, because the bot literally runs right across the screen to attack some monster, even if there are two monsters right next to where the previous kill happened.
This definitely makes things look "bot-like".
It would be much more human-like if the closest target could be selected.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Target selecting, tanking and chasing

#10 Post by kLabMouse »

EternalHarvest wrote:Dunno. It should work in case you're already moving to the target monster, but haven't really attacked it yet.
OK. What will happen If we allow Chose of Attacked MOB to be modified by Plugins, still checking it's clearness.???

Post Reply