-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partybot in combat target selection AI #2426
base: development
Are you sure you want to change the base?
Conversation
Will this work in a raid if the bots were not called by the leader? For example, the hiller leader. which does not target the goals. |
AFAIK it assigns the summoner as pt leader, not the real party leader in game |
Okay, I got it. Thanks, I will test it. |
I have checked this functionality and it works well. They really started hitting targets. However, there is a downside to this update. Without this update, the role of the tank was trying to run around the NPCs and tried to provoke them. Now he hits one target and the NPCs kill the healer. |
You can assign targets to specific bots by targeting them individually and typing the command. If you do this to everyone but the tank, the tank will work the way it worked before. This way you can have tanks dedicated to tanking 1 target and general tanks etc. |
I understand it. But it won't work on trash. And I'm talking about him first of all. Bosses don't cause problems. I need more tests, I'll try to exclude tanks from this logic. In any case, the DPS roles have become more responsive. |
// Swap DPS to marked target or party leader's target
if (m_role == ROLE_MELEE_DPS || m_role == ROLE_RANGE_DPS)
{
Unit* pVictim = me->GetVictim();
if (Player* pLeader = GetPartyLeader())
{
Unit* newVictim = SelectAttackTarget(pLeader);
if (newVictim && (newVictim != pVictim))
{
if (pVictim)
me->AttackStop();
else
AttackStart(newVictim);
return;
}
}
} I think it's better to make this priority only for DPS. Otherwise, the logic above, the tank protects the group members, does not work. I have tested two different scenarios. |
Okay, but what if you're in a raid with multiple tanks and need one tank to stay on the boss no matter what? Would it not make more sense to leave the option to select which tanks behave this way via targeting with the command? I don't understand, have you tried just not setting a focus mark for the tank? |
ok, I understood, yes, in this scenario, the tank will break off the label, but then this is a bug within the logic of the tank, why does it ignore the label if it is set for him. |
Well isn't that what your proposed change is doing in effect? Making tanks ignore focusmarks? |
Yes, this is true, but only partially. The logic that was proposed completely disables the usual behavior of the tank, which is spelled out above. If the player selects one enemy. I'm not talking about the label, just the right mouse click. I don't have enough experience to finish writing the logic for the tank. But after line 934 there should be a check for the presence of a label. core/src/game/PlayerBots/PartyBotAI.cpp Line 934 in 99c26c6
Then if there is an assigned tag for this AI, it should only attack it. Otherwise, try to protect the group. |
Ah I see, thanks for explaining it to me. I agree with you then. |
You are welcome. I tried to write a solution. It's not the prettiest, but it works. First, we are changing the attack priority only for DPS. |
Oh cool, nice job! I'll give it a test sometime when I come back to vmangos |
🍰 Pullrequest
Original Behavior:
Partybots do not swap to the party leaders target or swap to a marked target after the focusmark in game command is executed while in combat.
Corrected Behavior:
Partybots properly target a marked target(if focusmark command is executed) or the party leaders target while in combat. Priority is marked(if focusmark command executed) - > Party leaders target(if no mark or command isn't executed).
Proof
Issues
How2Test
Summon party bots, type .partybot focusmark skull. engage an enemy. Mark a new enemy with skull, bots will swap to it.
Summon party bots, engage an enemy, swap target(do not mark), partybots will swap to your target
Todo / Checklist