EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   Bot AI Re-work (https://www.eqemulator.org/forums/showthread.php?t=41737)

Uleat 01-31-2018 09:05 PM

Bot AI Re-work
 
The bot ai processing code was horrifically out-of-date...

It has been re-worked to take advantage of the recent changes in positional updating.

The end result is that bots have a more 'natural' look about them - or as natural as can be had in the current environment.


In addition, several 'features' have been added.


Bot Leashing

Bots will now be limited to how far they can travel - both in- and out- of combat.

They will also have a 'leash owner.' This owner is determined by the group they belong to. Any bot in a group whose leader is a client, that
client becomes the leash owner. If a non-client is assigned as group leader, the leash owner defaults to the bot's owner. All limitations are
based on this secondary owner.

Combat will break, regardless of hate, if either the target gets too far away from the bot or if the bot gets too far away from its leash owner.


Main Assist

Bots will now obey the targeting of a 'main assist' - if one exists.

To set this, just assign the role of 'Main Assist' to one of your group members. This only applies to groups that contain clients. 'Botgroup'
groups do not yet have this functionality - even if their owner has assigned it in their own group.


Combat Abort

Combat may now be aborted if the owner turns off auto-attack. This only applies if the target contains no hate for both the bot and owner. Each
bot must be processed, so aggro may be returned if hate is discovered during the abort process.

Line-of-sight issues will also cancel combat (until LoS is re-acquired) if both the bot and owner lose sight of the target.


Combat Jitter

In addition to the existing 'rogue' jitter code, new conditionals exist for non-'rogue' classes.

Melee classes will 'randomly' adjust themselves on an arc around their target.

Melee and caster classes both have 'back-off' code based on their combat range.

All jitter code is dependent on the bot not being the target of their target (!HasTargetReflection().) So, a summoned bot will adjust their distance
once they are able to.


These are 'rc' changes, so please report any issues.

rhyotte 01-31-2018 11:50 PM

Nice! Man I really need to go ahead and roll up another server to tinker with.

Proxeeus 02-01-2018 01:49 AM

Thank you so much Uleat for those changes, I cannot wait to try them!

jpyou127 02-01-2018 02:44 PM

Uleat, has anyone updated the current BOT binaries that can be downloaded with the update tool?

Uleat 02-01-2018 05:52 PM

I think Akkadius and I are (were) the only ones with that access.

Regardless, he is VERY busy at the moment and I have no idea if I still have access to that repo, much less if I can remember the password...

I'll see if we can't work something out.

Uleat 02-01-2018 09:43 PM

I adjusted the rogue bot's melee distance when behind a mob - they really should be close to perform any back-stab attack.


Also, there does seem to be quite a bit of 'after-adjusting' going on when the jitter code hits.

I'll probably make a new 'plot' function that keeps them on their current arc around their target to avoid forward movement adjustments when they jitter.

jia_jacky 02-02-2018 12:05 AM

Great! If I understand correctly you will continue to work on this, right?
I noticed that spell classes bot didn't know to avoid attacking or back off when mobs turned to hit them. And female dwarf bot always has beard.
So could you consider improving this? Just a expectation.

Uleat 02-02-2018 12:24 AM

Caster bots still don't know how to turn down the hate..that's still handled in the spell ai portion.

I can look into that at some point. (No comment on the dwarves...)

jia_jacky 02-02-2018 02:36 AM

Choosing spells to control the hate might be too complex. Perhaps when caster bots were hit by melee attack they could run away or back up a few steps instead of standing at the same place waiting to be hit.

Akkadius 02-02-2018 03:13 AM

Quote:

Originally Posted by Uleat (Post 257326)
I think Akkadius and I are (were) the only ones with that access.

Regardless, he is VERY busy at the moment and I have no idea if I still have access to that repo, much less if I can remember the password...

I'll see if we can't work something out.

Added you to EQEmuInstall repo

Proxeeus 02-02-2018 02:54 PM

Tried those changes with a fresh compile tonight and.... my bots no longer cast any kind of spells. Strange. Dunno if this is due to the global npc spellcasting AI rework or not though.

Proxeeus 02-02-2018 05:37 PM

Small update: after adding the "min_hp" and "max_hp" columns to the bots spells entries table, the issue resolved itself. Maybe those are missing from the bot db update script?

Uleat 02-02-2018 06:47 PM

Those are new fields to the 'main' db and it looks like we'll have to update - thanks for that report!

(I thought that I had verified bot casting during that work..but, it may have been before the actual fields being added.)


On caster bots backing away, they do back out of melee range when they are no longer the target of their attacker.

It has to be done this way or the mob constantly pursues them and your 'combat arena' is forever moving.

I tested it without that 'reflection' feature and had to constantly move to stay near the action...


EDIT: Thanks Akkadius!

Proxeeus 02-04-2018 05:29 AM

Great changes all around !

While we're on the subject of AI refinements, I was wondering if it'd be somehow possible to have the Bot AI work while in "Guard" mode?

By that, I mean that as soon as Bots enter "Guard" mode, they stop meditating and/or casting/rebuffing - you need to make them Follow you again to have their AI resume the work, and it's a bit hard to manage all that while camping at a spot in a dungeon. (this behavior has been present for ages, it's not a bug report about the current changes)

Dunno if I made myself clear, but that'd be a nice improvement !

Uleat 02-04-2018 06:37 PM

Ultimately, I want to see Bots become a pseudo-player object rather than just an advanced npc 'pet' .. so, changes I make will bear that where possible.

I do see what you're saying with the 'Guard' command. I'll look into a change for that.


All times are GMT -4. The time now is 11:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.