PDA

View Full Version : Bots not attacking on command


ionhsmith
02-19-2018, 09:08 PM
I have tried everything to get them to attack on command but nothing works. I use ^attack all , ^attack byname Name, nothing.... If i have them follow my toon they auto attack but if I have the guard so I can pull and then hit the attack button it says 2 of 2 bots attacking but they do nothing.

jaspen
02-24-2018, 03:30 PM
I was going to post about this as well. A friend and I both can't get this feature to work. Like you, it will say they are attacking but are not. Likewise if you put a pet class bot on passive he will not cast but will still send in the pet. Perhaps, I am misunderstanding the passive stance.

NatedogEZ
02-25-2018, 04:31 AM
If they are casters the mob needs to be under like 97% or something for them to start casting

jaspen
02-25-2018, 01:59 PM
At passive I would assume they would not cast nor send pets in. The curious part was that they are sending in pets, not that they aren't casting. Once again I might be misinterpreting the passive mode.

c0ncrete
02-25-2018, 02:11 PM
Without looking at the source, I think it's possible that passive mode doesn't keep a bot's hate list from being populated and that the pets aren't actually being sent in by the bot itself, but rather the default action for any NPC with a pet. Because bot code only controls the actions of the bots.

example:
a. your bot gets hit in passive mode
b. the NPC that hit your bot is placed on your bot's hate list
c. your bot does its AI loop and decided to do nothing because passive stance
note: the NPC is still on the hate list of the bot, it just chooses no action because that's how you told it to react

separately may be happening:
a. pet does it's IA loop (not part of bot code)
b. pet checks owner's hate list
c. pet responds because it doesn't care what you said to the bot

jaspen
02-25-2018, 02:31 PM
Probably the later then as whatever you attack in whatever form is what typically triggers them. They can stand there being hammered all day in any stance and they nor the pets will do anything until you target the mob.

ionhsmith
02-25-2018, 03:47 PM
none of mine are working. caster or not. also when creating them male and female doesnt work they all come out male

kokey98
02-25-2018, 09:21 PM
if you turn attack on with the npc targetted, it should send in the bots. let them engage before turning it off, or they retreat back.

^attack all is a bit off atm and tied to other improvements based on another thread's comments. think they said it has to do with how leash or guard was implemented, or fixing it would cause problems with current guard etc? peruse recent bot threads for the specifics, if you wish.

casting a detrimental spell at an npc, at least a nuke from personal experience, will also send in the bots.

if you didn't change stances they should be fine. if you did, make sure they are ^stance 1.

if they dont cast or do anything, your setup bots may have failed. drop and re-do, or better if you haven't done anything custom, just start with fresh db - a backup hopefully is available.

Uleat
02-25-2018, 10:16 PM
;tldr

You guys are over-thinking this :)

Multiple behaviors are congealing into a single issue.


The biggest, and most prevalent, issue is the change I made to 'standard' bot attack behavior.

It appears to conflict with some commands' intended behavior.

I have some of the issues worked out..but, I am waiting on additional code to be published so I can finalize and test all of the code changes
before I push them up.


I will update the pre-built binaries as well when this is tested.

Aztore
08-18-2018, 03:58 PM
I just recently did a fresh install of the latest eqemu server with bots, and have run into several issues with the new commands... I took a break for a couple years and not sure what has happend but the new ^attack or ^atk commands just dont work for me... any help with this is appreciated.

Uleat
08-18-2018, 05:45 PM
This was an oversight on my part.

It will be looked at in the very near future.

Huppy
08-18-2018, 06:49 PM
This was an oversight on my part.

It will be looked at in the very near future.

Uleat for Mayor !! :)

Aztore
08-31-2018, 07:54 PM
notice alot of issues with creating bot groups while messing around with my server today. not sure if this is me not knowing how to do this or a bug. I used the commands to create a group of 6 clerics and named it "clerics" then used the command ^botgroupload clerics and it isnt spawning any bots i dont know how to get them grouped again now =/ really missing the old bot code for offline play right now lolz

Uleat
09-01-2018, 12:36 AM
The last time I checked the botgroup functionality was working..and I haven't made any changes to that code since.

Did you verify that the group had been created in the database?


Target the bot that you want to be leader and type: ^botgroupcreate clerics

With that same bot targeted, add each additional bot by using: ^botgroupaddmember <name> - with <name> being the name of the joining bot.


EDIT: The old wiki page for this: http://wiki.eqemulator.org/p?Bot_Groups&frm=Bot_Commands

Aztore
09-02-2018, 08:18 AM
yes the bot group was created and is in the database. Ive relogged even restarted the server.. I just cant get them to spawn unless I spawn each one individually


https://drive.google.com/open?id=1c0P9NfR5MPCVGDR_Zb-5WktmRbmbQEWC

https://drive.google.com/open?id=1-xHW9uGcplvvTUxNfrJkHCYT_WG9dCOa

https://drive.google.com/open?id=1erUX0qHZ2zzdpKRi47D2MnSnYM0T0b1J

not sure if it has anything to do with this, but the clerics were made by cloning a cleric that i fully geared out... made like 6 clones then created the group for them....

Uleat
09-02-2018, 06:33 PM
Try using 'Cleric' as the name rather than all lower-case.

There are a few places where that matters.

Aztore
09-03-2018, 12:23 PM
wow that did the trick Uleat! had no idea this stuff was case sensitive. A lesson well learned =)

John C
09-09-2018, 09:29 PM
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!

Uleat
09-09-2018, 10:16 PM
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.

Huppy
09-10-2018, 08:43 AM
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.

John C
09-10-2018, 09:32 AM
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.

Huppy
09-10-2018, 09:46 AM
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.

Huppy
09-10-2018, 01:36 PM
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.

John C
09-10-2018, 07:42 PM
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.

Huppy
09-11-2018, 07:37 AM
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.

John C
09-13-2018, 01:38 PM
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.



// 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:

// 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;
}

Huppy
09-13-2018, 02:44 PM
Found the problem with the ^attack command.

Nice work, John C :)

I pasted your diff in and recompiled, the ^attack works like a charm.

Jhop16
01-09-2019, 09:07 PM
I'm also experiencing an issue with this ^attack doesn't work... How did you guys fix the issue?

John C
01-09-2019, 09:18 PM
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.