What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Keep minimum distance

cyberbot

Member
Joined
Mar 15, 2014
Messages
220
Reaction score
2
Do you guys try to keep some minimum distance when fighting a certain mob?

How do you do that in a combat routine?

More explicitly, when a mob approaches, how do you tell the bot to move away from it and attack (a.k.a. kiting)?

If no one is doing it, Pushedx, do you have any tip for this?

Thanks,
 
Last edited:
I had a reply for this thread, but I lost it somehow.

Basically, I'd suggest starting with this reply. That shows a global way to handle kiting, with the side effects mentioned.

Kiting is basically either moving away from a mob if it's too close, or moving towards a known fixed location (such as AreaStateCache.Current.CurrentAnchorPoint) in order to get some distance between you and the target.

The actual problems you have to solve are as follows:
1. If you kite, you don't want to then try to get back into LoS by moving forward to the target. You can either stop and wait a bit to see if it pulls, or then you're forced to re-aggro the mob by moving towards it again. You have to limit how often you do this though, otherwise, you'll loop back and forth in any small enclosed tileset, especially around doorways.
2. If you kite "away" from a mob, you need to take into consideration where you're kiting into. It'll be easy to back yourself into a corner, so consider the cases where you actually need to kite, vs just perhaps hit and run in a sense, just to mitigate damage. This also covers the case of kiting "too much", which results in your CR not really killing anything.
3. There's no real environment information (which is why pathfinding is so clunky, there's issues around stairs and buildings, and there are issues with dynamic objects) so you have to do a lot of work to figure out how to effectively kite in the current area. There's no easy way to do this, but your kiting logic should be tailored specific to the type of tileset you're in. I.e., kiting in The Ledge is trivial compared to trying to kite in Cavern of Anger. You could certainly try to implement a "kite in circles" type of logic, but it'll only be useful in certain tilesets when you're able to detect it's possible.
4. There's all sorts of other fun cases, such as if Necros are on the screen, you don't want to be kiting away from other mobs, letting them raise the dead.

Kiting itself is fairly trivial. What makes it hard in this game, is the random areas, so you can't use fixed logic that correctly works under any case, various combat scenarios where kiting leads you to a worse place than before (necros, or kiting into new parts of the map so now you're surrounded), and in general the lack of terrain information to be able to come up with logic that can work in any area of the map.

Hopefully that'll get you pointed in the right direction.
 
Back
Top