DnR any chance that you can implement this to L2JLisvus ?
This gives a huge boost to monster AI. (especially archers/mage type mobs)
Uploaded the diff from original L2J-Kamael changeset
http://pastebin.com/Y0bRtMfs
Here is the changeset text :
Regards
This gives a huge boost to monster AI. (especially archers/mage type mobs)
Uploaded the diff from original L2J-Kamael changeset
http://pastebin.com/Y0bRtMfs
Here is the changeset text :
Attack AI update, thanks to many for commenting and testing. It's not perfect
(perfect would be many separate AI scripts DP side and improved core support for such?)
and will require tuning/cleaning, but it contains the following:
- Mobs use self buffs (currently attached to random walking & onIntentionAttack)
- New considerations for changing target if mob hasn't got hits in for last 14 seconds,
changes to secondMostHated if it's close enough
- Sleeps/mutes secondMostHated randomly to reduce enemy numbers. Doesn't practically
sleep mostHated, but does it occasionally if long distance
- Self analysis: Every npc gets a new AI type: Fighter/Mage/Balanced/Archer.
Fighters are most common, don't spam skills and try to get close (fast) to their target.
Mages stay far away (retail mages don't even start running to target, here they progress
slowly but not to melee range - at least they use a lot more skills than with previous AI)
Balanced mobs use both skills and melee attacks equally. Raid bosses are now set to be "balanced".
Archers carry a bow and try to keep some distance to their target.
- Target analysis (isMage, isFighter, isBalanced, isArcher, isSlower, isCanceled, ...)
- Classifying all skills to classes like debuff/root/heal/cancel/disablers/general...
- Different chances of doing things (casting skills or advanding closer) based on target
and self analysis: magical targets are muted more often (people wanted fighters to be muted also...),
if somebody is rooted mob doesn't root twice...
- Target analysis is done every 4 seconds to switch tactique if target changes weapons (bow/other)
- Heals friends or raid boss when they're under 60 % hp and caster is both hp,mp > 50 %. Tested that
nurse ants now heal queen ant. Siege guards also get healing abilities.
- Ranged chars consider if they need to take more distance (run back) if the target is
melee & slow / rooted (the chance is even higher if geodata = 2, meaning it's not as
likely to go through walls..)
- Higher chance for using close range skills when close
- Minions might resurrect their leader if they have resurrect skill
- Adds ability for a mob to buff its clan. E.g. skill 4601.
- Mobs use NG ss/bss. Information of shot users need to be updated to Interlude/Kamael.
Mobs get NPCInventory, since it's possible we later learn they have limited nr of... e.g.
potions, not just shots.
- Siege guards should also heal castle defenders.
- Great white shark shouldn't attack when you're not in water (doesn't stop it yet coming on land)
- Mob try to circle the target instead of standing on top of each other. Probably needs some further work,
now the code works like: once in 3 seconds, check if any other mob in distance of 20. If yes, change to
a random position around the target.
One motivation for this patch was to take out some worst stupidities the mobs did (root twice etc)
only with little changes to current AI structures. The general code is the same, actions
are based on random chances, but the chances are now different - they should be easy to read from
the code (and change).
Regards