Jump to content

[DEV] New management of aggro system.


cyberium
 Share

Recommended Posts

First i whant to say thanks to Faramir, Qsa and all member who help with MMAPS. Thank you guy!

Some warning :

- This require MMAPS to work correctly. (integrated now to official git !!!)

- The status of the post is DEVELOPEMENT so don't expect working solution before any status change.

- This patch need test to maximum situation to be validated.

- I have some time actualy to work on it but tomorrow it's another day...

What's the purpose exactly?

MMAPS is a real improvement for game experience. All creature following terrain, not flying and other stuff like this are more fun to play with.

But that features require to have a good aggro system to get all the avantage of MMAPS.

Actual system is pretty limited.

So here is the list off thing will be implemented.

- use MMAPS to check reachability of creature target.

- limit MMAPS calculation to save CPU.

- allways keep threatlist position of player no mater if player is reachable or not.

- implement PreEvadeMode. Before any creature goes to Evade we need wait xx sec (actualy 26s. Is it blizzlike?). Creature is invincible during this labs. If player becomes attackable the creature simply exit PreEvadeMode.

- Correctly handle caster.

- Select prefered target (without or with some aura)

and probably other you'll tell me :)

To see how it work look

off my actual testing.

Last Update (08 02 2012)

After played a little with threat management, trying to understaind how it work i have conclued it's little bit more complex than i was imagined.

We must make the best using of PathFinding and i must learn a little bit more of it.

My first intention was only to select correct target and test it's reachability. If not reachable so enter in PreEvadeMode.

(for 1 player)
- Player is not reachable with spell and melee
- Go to PreEvadeMode for 26 sec.
- If Player becomes reachable before timer expire return to normal combat mode else go to evade mode.

But after some research :

(for 1 player)
- If player is not reacheable by mele but the creature can attack with spell, considere player is reacheable. (but it's not always true mostly all creature can do spell damage an melee attack but do more damage at melee)
- If creature is OOM and player is still unreacheable MoveChase() is called. Creature must go to PreEvadeMode at this point. Where is the best place to do it? In CreatureEventAI::ProcessEvent()
- If creature is only melee, test is done in Creature::CanReach() and work not bad. But why generate new PathFinding when somewhere in StartAttack() we already do it via MoveChase()  call?
- Olso i have seen some case where player is considered like reachable but not in melee range. I must identify why exactly.

So finaly all of this to say, to limit PathFinding call i need to understaind how MoveChase work and if it's possible to get just after its call something like IsPathFounded().

Olso i must migrate all the decision for PreEvadeMode in CreatureAI to get more consistant and olso open way to personalise every creature if needed. (Perhaps some creature does'nt need PreEvadeMode and or is normal situation and creature have script to handle it)

Actual branch is updated in my repo but considere it only for information. Ill just restarted new branch to start with my conclusions.

Link to comment
Share on other sites

Hi all,

First, if i not using sd2, is all creature ai are in mangos/creatures_ai_scripts?

If yes, iam trying to understaind what function are called when creature disapear from script. (ex : Warp chase in outlands, id 18884)

Creature disapearing this way loose their target. I forget lot of game mecanism, didn't remember if we can found it from any spell or if some class can see it in invisible mode.

Nevermind, Schmoonzerd helped me allot :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use