Page 2 of 2

Re: Melee Resistance

Posted: Mon 03 Feb, 2014 12:33 pm
by Myrdal
M4573R_CH13f wrote:so every walker has this, apart from the bloodcrusher, and as a sub-unit the avatar? seems weird :D

No. When Asmon said walker I'm pretty sure he meant t3 walker/superunit. I shouldn't have listed the bloodcrusher, having vehicle armour it has the same disadvantage as any other t2 vehicle/walker - no ranged damage reduction. It was included in my search since it's listed as a "troop" rather than vehicle in the game files. I also didn't include units where melee isn't applicable, like zoanthrope/doom.
Arbit wrote:I think this was answered long ago, but what determines whether a squad is in melee combat?

I'd like to know this as well. I'm sure Tomas/lulgrim/others can explain how it works being more familiar with the game internals but here's my guess. Units need only be engaging in melee combat and within a certain distance to the target, not necessarily hitting the target for them to be considered in melee. The reason I believe this to be the case is that you regularly get forced into melee combat from a distance even thou you are in ranged stance. The opponent may even be immobilised, yet your unit will foolishly run into melee regardless.
The inquisitor just loves doing this, even thou she may be equipped with the most badass gun in the galaxy.

So I guess what's happening is she is trying to attack but before she can a check is done to see if any unit has her in melee range and if so she will be tied with that unit in melee unless ordered not to. As for the melee range im not sure, it likely varies between units and their speed/size etc. Perhaps the only constant is the time it takes for them to engage with their current speed, but then immobilised units should have 0 speed so maybe not.
Nuclear Arbitor wrote:iirc it's only hitting something else. there was a discussion about the scout upgrade that gives regen out of combat and i think someone said that it only applies when the scout is shooting so they still get the bonuses while kiting.

Im not sure how this example relates to the above. Obviously the scouts aren't engaging in melee combat but the question is if the the chasing unit is, even thou it isn't hitting the scouts. I think this can be the case.

Re: Melee Resistance

Posted: Tue 04 Feb, 2014 12:29 am
by Nuclear Arbitor
i'm assuming that one is not in combat unless they are actually hitting something; either at range or in melee.

Re: Melee Resistance

Posted: Thu 06 Feb, 2014 10:23 pm
by KanKrusha
I think nuclear is correct. Running into melee at short distance is related to melee_leash distance and doesn't mean the entity Is in combat (it's similar to entity seeking cover at short range)

I think it is based on the state "unit is shooting" which includes using a mellee weapon. I feel that units take more ranged damage when knocked back by a special so they are no longer using a weapon for 3 seconds. Hard to be certain though.

Re: Melee Resistance

Posted: Fri 07 Feb, 2014 11:52 am
by Myrdal
Melee leash sounds plausible but the values don't fit. Seems most units have around 20 melee leash distance but what I've experienced with being forced into melee is something like <5. This is just speculation but hasn't melee leash distance to do with the max distance at which melee units maintain its pursuit of a target?

I do agree with you that kb'd units appears to take more damage.

Re: Melee Resistance

Posted: Fri 07 Feb, 2014 1:47 pm
by Lulgrim
Easy to test with a passive ability that has just a visual fx tied to it and requires in_combat (I think that's the name of the condition) to stay active.

Re: Melee Resistance

Posted: Fri 07 Feb, 2014 7:52 pm
by Raffa
When does the 0.5 ranged damage modifier apply, exactly?

Is it when the unit is attacking a target in melee, when it is being attacked, or when both are happening simultaneously?

Re: Melee Resistance

Posted: Sat 08 Feb, 2014 2:43 am
by Nuclear Arbitor
that's what we're guessing at

Re: Melee Resistance

Posted: Tue 11 Feb, 2014 7:41 pm
by Myrdal
Lulgrim wrote:Easy to test with a passive ability that has just a visual fx tied to it and requires in_combat (I think that's the name of the condition) to stay active.


I've found nothing that would indicate a unit is in melee. For combat the closest I've found is the SGroup_isDoingAttack()]. I did some experimenting and this one returns true when they actually hit, either melee or ranged, just like Nuclear Arbitor said. So going by this I'd have to agree with him but it's still not clear what causes the forced melee behaviour. I guess the only way is to do some serious in game testing but Im just way too lazy to do this :P