Issue Type (Required):
Enemy Mechanics
Issue Description (Required):
In this block of code here, from scripts\utilities\minion_attack.lua:
local is_blockable = Block.attack_is_blockable(damage_profile, target_unit, target_weapon_template, target_buff_extension)
local is_blocking = Block.is_blocking(target_unit, unit, attack_type, target_weapon_template, true)
local is_dodging = Dodge.is_dodging(target_unit, attack_type)
if not is_blocking and is_blockable or is_dodging or scratchpad.target_dodged_during_attack then
if not scratchpad.lag_compensation_attacking then
scratchpad.lag_compensation_hit_position = Vector3Box(hit_position)
scratchpad.lag_compensation_target_unit = target_unit
scratchpad.lag_compensation_damage_profile = damage_profile
scratchpad.lag_compensation_damage_type = override_damage_type_or_nil or action_data.damage_type
end
if not scratchpad.lag_compensation_dodging then
scratchpad.lag_compensation_dodging = is_dodging
end
scratchpad.lag_compensation_attacking = true
return false
end
Specifically this bit:
if not is_blocking and is_blockable or is_dodging or scratchpad.target_dodged_during_attack then
If an attack is unblockable, and the player isn’t considered as able to block it, said attack won’t trigger lag compensation when the hit lands on the server, unless the player is considered dodging against it, or has dodged at some point while the attack was winding up.
The catch here, the incosistency, is that even if the player has a talent or weapon perk to block unblockable attacks (like with a perfect block), they have to NOT be blocking, which then the game will process as “not blocking, therefore can’t block unblockable, therefore, no lag compensation unless dodging”.
It would make way more sense to check not is_blocking or not is_blockable, meaning “not blocking, or we are blocking but the attack isn’t blockable even while blocking”.
The way it works right now significantly changes the timing that a player with higher ping might be used to, and they could easily get punished for it, it’s not like anywhere in the game is stated that you’d need to dodge prior to the attack landing to consistently trigger lag compensation, nor would it make sense..
Thing is, I’m aware that these conditions are also there because when lag compensation checks multiple times to land a delayed hit or not, it rechecks these conditions. But I feel it’d make way more sense if that block of code above looked like this instead:
if not scratchpad.lag_compensation_attacking or not is_blocking or not is_blockable or is_dodging or scratchpad.target_dodged_during_attack then
So that it works like this instead:
If lag compensation hasn’t triggered for this attack and can trigger, which is pre-checked with:
if not offtarget_hit_or_nil and is_player_character and scratchpad.lag_compensation_timing then
Trigger it, then when the delayed hit checks happen, check the following to keep delaying the hit if:
- The player isn’t blocking.
- The player is blocking, but can’t block the attack.
- The player is dodging or has dodged during the attack (ignored by attacks that ignore dodge).
It might potentially make more sense to just delay the hit until the lag compensation timer is up, rather than checking up to 10 times (plus one last 11th time) and stopping if blocking without having dodged, as it’d allow players with higher ping to still be able to try to block and dodge, with block as a safeguard (plus dodging being preferable due to dodge talents, perks, and not taking stamina damage).
But I’m assuming that you want blocking to catch the delayed hit as soon as possible if the player wasn’t even trying to dodge, so I’m keeping that behavior with my suggestion there.
Lastly, this system could be revamped a bit to keep track of multiple targets for oobb and broadphase melee attacks (aoe), as only the main target gets lag compensation, and other players hit by them are screwed regardless of ping.
It feels pretty bad when a player causes a Crusher doing an overhead to run towards you, sometimes being a bit unpredictable due to their speed and where the player might move to, and you get 0 lag compensation no matter how high your ping is and get severely punished by it, I know it feels really bad at 200-250ms..
Another example of that is a Plague Ogryn or Beast of Nurgle doing an aoe stomp/body slam, which has no direction, so it’s hard to tell who’s being targeted and will get lag compensation, making it easier to hit unfairly.
It should be doable to make use of some tables to keep track of players who need lag compensation and process them individually with their own timers and hit data, and it’d be really nice to have these attacks be more consistent to deal with regardless of targeting.
Steps to Reproduce (Required):
With around 200-250ms, and without blocking, try:
- Dodging a Crusher or Mauler overhead without dodging once as they’re winding up the attack.
- Repeating the same step but having dodged during the attack windup.
- Notice how different the timing is if done properly.
- Now try doing the same against blockable attacks, either from those same enemies or other enemies.
- Notice how the timing is more consistently the same.
Now try repeating the same steps, but instead of dodging (and without dodging), try blocking with a perfect block with a talent that allows those to block unblockable attacks (and don’t use a shield). You’ll notice the timing is unforgiving against unblockables attacks when compared to blockables (as lag compensation won’t trigger for the former).
[PC] Do You Use Mods? (Optional):
No, I don’t use mods
Reproduction Rate (Required):
Constant (100%)
Platform (Required):
PC - Steam