Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2010, 01:23 AM
Frosef
Sarnak
 
Join Date: Mar 2010
Posts: 36
Default "Fix" for Bot LOS Issues

I say "fix" because whether or not this is a problem is a matter of opinion, really.

I didn't particularly like how bots stand around and do nothing if their target is out of their LOS, but I also understand it could cause some crazy trains if they decided to path strangely whilst moving to something.

So, my quick and dirty solution was to add another check before emptying the bot hate list to check both the bots' LOS and their owners' LOS before emptying the hate list. This way if say, a mob runs around crazylike and through the walls and it's out of both mine and my bot's LOS, the bot will wipe the hate list to prevent incident.

bot.cpp, line 2195 (inside the AIProcess function), my addition in bold:
Code:
if((!CheckLosFN(GetTarget()) && !BotOwner->CheckLosFN(GetTarget())) || GetTarget()->IsMezzed() || !IsAttackAllowed(GetTarget())) {
I don't know CPP, so I can't say for sure it's proper syntax, but it seems to be working as I expected thus far. I like the way this plays out a lot better, now my bots will round corners to assist me in dungeons and such.
Reply With Quote
  #2  
Old 04-17-2010, 03:08 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

You're basically undoing what this code was meant to solve because bots were trailing behind you and would basically run through the wall to get to your target and aggro anything and their friend in rooms you were not in.

That said, this was written for the previous version of the bot code and possibly is no longer needed... and that's a big 'possibly' there.

I'd be interested to hear about your tests with this code in places like lower guk and unrest basement and other dungeons with tight hallways and many rooms.
Reply With Quote
  #3  
Old 04-17-2010, 07:27 PM
Frosef
Sarnak
 
Join Date: Mar 2010
Posts: 36
Default

Quote:
Originally Posted by Congdar View Post
You're basically undoing what this code was meant to solve because bots were trailing behind you and would basically run through the wall to get to your target and aggro anything and their friend in rooms you were not in.

That said, this was written for the previous version of the bot code and possibly is no longer needed... and that's a big 'possibly' there.

I'd be interested to hear about your tests with this code in places like lower guk and unrest basement and other dungeons with tight hallways and many rooms.
Lower Guk is actually what inspired me to dig into the code and try and change it, I died quite a few times from my bot party standing 20 feet around the corner and refusing to help me. (or in the case of Lower Guk which has lots of false walls, they would just stand on the other side of the wall) Sure I could just #bot group summon them, but I wanted my bots to require minimal micromanagement.

They do run through walls to get to their target, but the NPC AI seems to ignore their presence until they actually attack them (or an NPC near them) just like player pets, so it hasn't caused me any issues. I didn't actually tweak them to attack without regard to line of sight, the if statement is the one preceding wiping their hatelist, so they still won't cast through walls or the like.

I've had a couple trains, but I don't think it was caused by my bots as they stop chasing when mobs do wacky stuff like disappear behind a wall. (the ghoul scribe's room is where I almost always have this happen) I've never seen extra mobs resulting from me sending my bots in to attack thus far, which seems to be the primary concern with this code.

I'll check out Unrest too, it's a good excuse for me to visit it anyway, I never went there much on live! I'll post back if my bots give me any problems.
Reply With Quote
  #4  
Old 04-18-2010, 02:29 PM
Frosef
Sarnak
 
Join Date: Mar 2010
Posts: 36
Default

So I spent about an hour in Unrest last night, I relied 100% on my bots to do everything to remove myself from the equation as the train maker. No trains from my bots resulted, I only experienced one train caused by me when a badly spawned NPC (Khrix something) under the world hit me with a Fear, neither my bots nor I could attack him so I just #killed him.

The only oddity to report is in the werebat room, if I'm on the top level and order my bots to attack something on the top level across from me, my caster bots will become stuck in the ceiling, unable to cast. No extra aggro results however, and once the fight ends they return to my side.

If I experience any issues as I level (although my server is set to normal XP gain so it's fairly slow going) I'll be sure to update!
Reply With Quote
  #5  
Old 04-19-2010, 11:35 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

I would think a good way for the bots to behave is if the bot OR the player has LoS to the mob, the bot should attack. This prevents the bots from going way off and creating massive trains but will allow the bots to come to the player's aid in the event the bots are just around a corner or something.
Reply With Quote
  #6  
Old 04-21-2010, 07:02 PM
robinreg
Sarnak
 
Join Date: Feb 2010
Location: California
Posts: 88
Default

I do noticed that when the bots are like behind wall or on the other side of a small hills like in LDoN, they wont assist or heal me. I usually have to make sure the bots are in front of me when I pull mobs so they don't get out of LoS.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:19 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3