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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #16  
Old 09-02-2018, 06:33 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Try using 'Cleric' as the name rather than all lower-case.

There are a few places where that matters.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #17  
Old 09-03-2018, 12:23 PM
Aztore
Fire Beetle
 
Join Date: Feb 2009
Location: Texas
Posts: 21
Default

wow that did the trick Uleat! had no idea this stuff was case sensitive. A lesson well learned =)
__________________
Reply With Quote
  #18  
Old 09-09-2018, 09:29 PM
John C
Sarnak
 
Join Date: Jul 2018
Location: Atlanta, GA
Posts: 49
Default

Spent a little time playing with this today. Bots definitely still not attacking on command - at least not for anything with no aggro. I get the message "X bots attacking XXXX" when I try to get them to engage a new mob but they don't actually do anything.

Was just starting to look through the Bot AI routine, but obviously there is a lot there. Have you looked at this recently Uleat? Are there any updates planned for the near future? Just figured I'd ask before I spend additional time trying to figure this out.

Ideally, I'd like for the ^attack command to override Mez. I'm starting a play through as an Enchanter, and while I completely agree they shouldn't break Mez without explicit instruction it would be nice to be able to just direct the bots to the next target without me having to break mez myself. (And just to be clear, they currently won't attack something that has 0 aggro even if it isn't mezzed).

Thanks!
Reply With Quote
  #19  
Old 09-09-2018, 10:16 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

The inventory possessions rework is about to go beta on peq.

As soon as that is integrated into the master branch of eqemu, I do plan on working on the bot ai.


So, yes - very soon!


I'll try to remember to start a bots issue thread later tonight or tomorrow.

I have a list of things already..but, new input is definitely appreciated.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #20  
Old 09-10-2018, 08:43 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

The message I get from my client (RoF2) when I use ^attack - This command does not allow 'ActionableBot' criteria 'target'

EDIT - Something else I encounter, if a mob aggro's and beats on me, (while I have something else targeted), the bot will do nothing.

If I don't have anything targeted, the bot will assist on an aggro.
Reply With Quote
  #21  
Old 09-10-2018, 09:32 AM
John C
Sarnak
 
Join Date: Jul 2018
Location: Atlanta, GA
Posts: 49
Default

Humpy -
You have to specify which bots are supposed to attack. That is the error message saying it doesn't know to whom the command applies. The full list of options is in section 2 here: http://wiki.eqemulator.org/p?Bot_Commands

But basically, you have to target the Mob to attack and then enter the command "^attack ownergroup" to have all boys in your current group attack that mob. That said, as discussed above, it still isn't working.
Reply With Quote
  #22  
Old 09-10-2018, 09:46 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

I'm well familiar with bots, been using them for several years, I'm just being brief with my posts. I'm only testing with one bot right now.

I get the same message either way.
Reply With Quote
  #23  
Old 09-10-2018, 01:36 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

By the way John C, not sure if you're aware of something simple I've always done myself to pull a mob with a bot. Target a mob in the distance and hit the "melee button"

The bot will instantly run to it. You have to leave the melee on, even with those annoying "too far away" messages, or the bot will retreat.
Reply With Quote
  #24  
Old 09-10-2018, 07:42 PM
John C
Sarnak
 
Join Date: Jul 2018
Location: Atlanta, GA
Posts: 49
Default

Thanks Huppy. "Attack on" does work for an initial pull. Still need a technique to allow me to break mez without my poor little chanter having to wake him up.

Also, does ^pull work? I've never been able to get it to work. It just tells me no one in my group is capable. I even handed my warrior a bow to see if that would help; no dice. Tried arrows too just in case, but never could get him to accept them. Would love to understand if I am doing something wrong using ^pull as that seems like it could be a potential alternative.

Thanks.
Reply With Quote
  #25  
Old 09-11-2018, 07:37 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

I'm going to do some monkey'ing around with that today, just to test things out. I have a warrior toon, that I spawn bots with, and sometimes pull with arrows.

But I definately want to play around with a bot archer class to see what can be done. I've never tried that ^pull command but I will check it out.
Reply With Quote
  #26  
Old 09-13-2018, 01:38 PM
John C
Sarnak
 
Join Date: Jul 2018
Location: Atlanta, GA
Posts: 49
Default

Found the problem with the ^attack command. The routine to check for LOS actually checks for a lot more than that, and then clears the HateList if any of those conditions are met. So the ^attack command is setting the HateList only to have it cleared on the next pass through the AI routine.

Here is the relevant section of code from zone/bot.cpp.


Code:
// Let's check if we have a los with our target.
// If we don't, our hate_list is wiped.
// Else, it was causing the bot to aggro behind wall etc... causing massive trains.

if (guard_mode || 
   !tar->IsNPC() ||
   tar->IsMezzed() ||  
   (!tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner) && !leash_owner->AutoAttackEnabled()) ||  
   lo_distance > BOT_LEASH_DISTANCE ||
   tar_distance > BOT_LEASH_DISTANCE ||
   (!CheckLosFN(tar) && !leash_owner->CheckLosFN(tar)) ||
   !IsAttackAllowed(tar))
{
   if (HasPet()) {
      GetPet()->RemoveFromHateList(tar);
      GetPet()->SetTarget(nullptr);
   }

   RemoveFromHateList(tar);
   SetTarget(nullptr);

   if (IsMoving())
      StopMoving();

   return;
}
Let's look at those top 4 conditions in the IF statement that leads to the hatelist being wiped...

1. GUARDMODE - This is why bots turn into mannequins in guard mode. I suppose you might not want them to move, but clearing their hatelist here is causing them to not fight at all.

2. !tar->IsNPC() - The target is not an NPC. This is the only one that I would leave in here.

3. tar->IsMezzed() - The target is mezzed. I want to be able to tell my bots to attack a mezzed creature. When you first cast mez on something, you might want to clear it from the bots HateList then so they will stop attacking when the mez is cast during combat, but I wouldn't do it in this AI routine.

4. (!tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner) && !leash_owner->AutoAttackEnabled()) - This one is the big problem. If the target does not already have hate against us and the bot owners autoattack isn't on, then it wipes the HateList. This is the condition that is undoing what the ^attack command does.

I commented out conditions 1,3 & 4 and the ^attack command starting working as intended. For anyone who wants to do this in your own environment, you can cut and paste the whole thing or just add the comment brackets that are highlighted in blue.

Working code:
Code:
		// Let's check if we have a los with our target.
		// If we don't, our hate_list is wiped.
		// Else, it was causing the bot to aggro behind wall etc... causing massive trains.

		if ( /*guard_mode || */
			!tar->IsNPC() ||
/*			tar->IsMezzed() ||  */
/*			(!tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner) && !leash_owner->AutoAttackEnabled()) ||  */
			lo_distance > BOT_LEASH_DISTANCE ||
			tar_distance > BOT_LEASH_DISTANCE ||
			(!CheckLosFN(tar) && !leash_owner->CheckLosFN(tar)) ||
			!IsAttackAllowed(tar))
		{
			if (HasPet()) {
				GetPet()->RemoveFromHateList(tar);
				GetPet()->SetTarget(nullptr);
			}

			RemoveFromHateList(tar);
			SetTarget(nullptr);

			if (IsMoving())
				StopMoving();
			
			return;
		}
Reply With Quote
  #27  
Old 09-13-2018, 02:44 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Quote:
Originally Posted by John C View Post
Found the problem with the ^attack command.
Nice work, John C

I pasted your diff in and recompiled, the ^attack works like a charm.
Reply With Quote
  #28  
Old 01-09-2019, 09:07 PM
Jhop16
Sarnak
 
Join Date: Oct 2011
Posts: 32
Default

I'm also experiencing an issue with this ^attack doesn't work... How did you guys fix the issue?
Reply With Quote
  #29  
Old 01-09-2019, 09:18 PM
John C
Sarnak
 
Join Date: Jul 2018
Location: Atlanta, GA
Posts: 49
Default

If you compile your own binaries, you can cut and paste the changes above into zone/bot.cpp and recompile.

I probably should submit that code to be baked into the public binaries just so that it will work for everyone.

In the mean time, if you don't compile your own binaries, let me know if you want me to send you a PM with a link where you can download a set with the bot fix. Fair warning though - I won't be maintaining or updating it. This would be a one time only offer. I would actually recommend that you download the code and learn to run your own compiles as that will give you significant additional flexibility.
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 07:14 PM.


 

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