PDA

View Full Version : /assist question


gaeorn
06-12-2009, 11:49 AM
Its been so long since I played on live, I'm not sure I remember accurately how /assist worked on live. I know that when you /assist a mob or player that has a target, you got their target. But what happened when you /assist a mob or player that does not have a target? Currently, the emu sets the target to yourself. This can be misleading since I have more than once thought, "now why does that mob have me targeted?"

What I can't remember is when you /assist someone who doesn't have a target, does your target get cleared or does it just stay with the same target you had before the /assist command? I'd like to create patches to correct this, but I need to know what the proper behavior is before I do.

WillowyLady
06-12-2009, 02:47 PM
I seem to think that if the player / npc had no target when assisted, nothing would show on HoTT.

gaeorn
06-12-2009, 02:53 PM
That may be true, but I'm trying to fix the /assist behavior. I hadn't been using HoTT because leadership abilities were not working. Now that group leadership is working, I do use it if the group leader has the ability, but that is not always the case. So I still want to fix /assist.

Shendare
06-12-2009, 02:56 PM
In my opinion, clearing the target when using /assist on a PC/NPC with nothing targeted is the only logical choice.

Leaving it at the last thing you had targeted on a failed /assist is only going to make you wonder whether your PC/NPC actually had that last thing targeted, too, similar to the problem of targeting oneself upon failure.

The only consistent and unambiguous choice is for /assist to always set your target to that of your target's target, even when that's nothing at all.

The only question I have after that is whether /assist has a maximum range. /target has a maximum range, but once you do have something targeted, you can keep that target as long as you're in the zone and you're both alive.

Can you then /assist something that's across the zone but that you still have targeted? Or, does /assist have a range limit like /target, which is the way I would assume it to work?

- Shendare

gaeorn
06-12-2009, 03:30 PM
In my opinion, clearing the target when using /assist on a PC/NPC with nothing targeted is the only logical choice.

Leaving it at the last thing you had targeted on a failed /assist is only going to make you wonder whether your PC/NPC actually had that last thing targeted, too, similar to the problem of targeting oneself upon failure.

The only consistent and unambiguous choice is for /assist to always set your target to that of your target's target, even when that's nothing at all.

I agree, but I want to try to match live, even if it doesn't follow the most logical choice. Although, I could easily make it a rule so the behavior is selectable.

However, I was unable to get the client to clear the target on an /assist so I would need someone to get a packet trace of that happening (if that is the behavior on live) so I know what packet to send the client.

The only question I have after that is whether /assist has a maximum range. /target has a maximum range, but once you do have something targeted, you can keep that target as long as you're in the zone and you're both alive.

Can you then /assist something that's across the zone but that you still have targeted? Or, does /assist have a range limit like /target, which is the way I would assume it to work?

- Shendare

The emu code has range limits on /assist already. If you try to /assist beyond that range, you get the same behavior as if your target had no target.

trevius
06-12-2009, 05:02 PM
I just checked Live and /assist on an NPC that is not aggro'd does nothing at all. It keeps your target on the NPC you already have targeted.

gaeorn
06-12-2009, 05:27 PM
Thanks Trev. I'll code it and submit it.

gaeorn
06-22-2009, 01:30 AM
Made it a rule so people can choose the existing behavior or one that is more live like.

Index: common/ruletypes.h
================================================== =================
--- common/ruletypes.h (revision 701)
+++ common/ruletypes.h (working copy)
@@ -189,6 +189,7 @@
RULE_REAL ( Combat, AgiHitFactor, 0.01)
RULE_INT ( Combat, MinRangedAttackDist, 25) //Minimum Distance to use Ranged Attacks
RULE_REAL ( Combat, ArcheryStationaryPenalty, 1.0) //Damage Penalty for moving or rooted targets. 1 = 50% penalty (Default), 2 = no penalty, 0 = 100% penalty
+RULE_BOOL ( Combat, AssistNoTargetSelf, true) //when assisting a target that does not have a target true = target self, false = leave target as was before assist
RULE_CATEGORY_END()

RULE_CATEGORY( NPC )
Index: zone/client_packet.cpp
================================================== =================
--- zone/client_packet.cpp (revision 701)
+++ zone/client_packet.cpp (working copy)
@@ -2058,7 +2058,7 @@

EQApplicationPacket* outapp = app->Copy();
eid = (EntityId_Struct*)outapp->pBuffer;
- eid->entity_id = GetID();
+ if (RuleB(Combat, AssistNoTargetSelf)) eid->entity_id = GetID();
if(entity && entity->IsMob())
{
Mob *assistee = entity->CastToMob();


And the SQL for the rule:

INSERT INTO `rule_values` VALUES ('1', 'Combat:AssistNoTargetSelf', 'true','When assisting a target without a target: true = target self, false = leave target as was before assist (this is the behavior on live)');

gaeorn
07-01-2009, 02:58 AM
This has been committed to svn.

Yeormom
07-01-2009, 11:02 AM
Question: Why is this a sticky?

gaeorn
07-01-2009, 11:35 AM
It was made a sticky so a dev would remember to commit it. I just recently got access to the SVN so committed it myself. However, I have no way to remove the sticky on this post so I'm waiting on someone else to do it.

So_1337
07-01-2009, 11:41 AM
If ending up with no target is the Live-like behavior, why isn't that the default rule value?

gaeorn
07-01-2009, 02:42 PM
It's not ending up with no target. You end up with the target you had before the /assist. In any case, I wasn't sure if it would confuse people if the change happened unexpectedly so I took the safer default of the prior behavior. That can easily be changed.