Dance with Death perk doesn't activate when dodging sniper shot

Issue Type (Required):

Perks

Issue Description (Required):

Dance with Death not working against snipers where it’s a literal dance with death. Tried it several times during the mission and was unable to get it to work

Steps to Reproduce (Required):

  1. have shotgot out & dance with death perk
  2. find a sniper
  3. hear audio queue
  4. Dodge
  5. perk doesn’t activate

Mission Name (Optional):

Enclavum Baross

[PC] Do You Use Mods? (Optional):

No, I don’t use mods

Reproduction Rate (Required):

Constant (100%)

Platform (Required):

PC - Steam

1 Like

I wonder if this extends to all “on successful dodge” talents and blessings. I would imagine they all draw from the same bit of code for activation?).

@gpkgpk any code magic you’d be happy to do here to see what’s causing this/how many things it affects?

2 Likes

Many of Zealot’s “on dodge” talents don’t work with dodging non-chaff ranged attacks. It’s been that way since patch 13. Second Wind, for example, doesn’t generate toughness from dodging gunners. However, Vet’s “on dodging ranged attack” talents don’t have this restriction.

2 Likes

You know, I have had that issue with the gunner not generating toughness and I had figured it was a balance issue, but I felt that this is kind of what the dance with death perk would be for. I can still utilize other enemies to activate the perk, but I imagine this would be the most useful application, at least for me. I am not a headshot maniac, so I can see it being useful for people who actually good at fps otherwise if this isn’t a bug.

Good to know vet’s dodging doesn’t have this restriction.

Thanks.

Ok looked at it briefly. There’s appears to be a few different things going on, as usual take with a grain of salt or 10, and I may be oversimplifying.

Some shots are handled a bit differently, e.g. sniper shot, and while it adds a “on_ranged_dodge” proc event, it goes down a different code path starting with bt_sniper_shoot_action.
Sniper doesn’t appear to have a path that leads to Dodge.successful_dodge being called, but Trapper, Shooters/Shotgunners and Gunners do (and some others).

And while Gunners and Shooters+Shotgunners have a generic path in code that handles different types of attacks, bt_shoot_action.lua: in function ‘_update_strafe_shooting’ is for these guys. The difference being Gunner don’t have a “dodge_window” (action_data.dodge_window, shoot_dodge_window) so it doesn’t trigger an “on_successful_dodge”, whereas little Shooters+Shotgunners do.

There’s a difference between “on_ranged_dodge” and “on"successful_dodge” proc events for triggering talents and blessings, so Vet gaining stam is on “on_ranged_dodge” as listed, but crits on dodge is on “on_successful_dodge” (as listed) so the same caveats as previously mentioned apply, melee and some ranged attacks proc it whereas snipers/gunners shouldn’t.

I’m guessing these things, the Sniper shots and nil dodge_window attacks like Gunners are by design? Who knows really…

P.S. Interestingly, dodging a shooter ranged shot in minion_attack.lua _handle_shoot_dodge is tagged as a melee attack after a check vs ranged is done, probably just a copyPaste oversight, it may only have reporting benign consequences.
P.P.S. Note successful typos , 1 ‘c’ vs 2 are in the code, not mine. Keep that in mind when searching.
P.P.P.S. other than Vet stam on_ranged_dodge, most everything else seems to be “on_successful_dodge”

4 Likes
Dodge.sucessful_dodge
12 results - 6 files

scripts\extension_systems\behavior\nodes\actions\bt_chaos_hound_leap_action.lua:
  511  			if colliding_target_is_dodging and not is_in_front then
  512: 				Dodge.sucessful_dodge(current_colliding_target, unit, "melee", colliding_target_dodge_type, breed)
  513  

  528  		if dot_to_target < 0 and scratchpad.target_dodged_during_attack and not scratchpad.dodged_attack then
  529: 			Dodge.sucessful_dodge(target_unit, unit, "melee", scratchpad.target_dodged_type, breed)
  530  

scripts\extension_systems\behavior\nodes\actions\bt_chaos_spawn_grab_action.lua:
  271  
  272: 					Dodge.sucessful_dodge(target_unit, unit, attack_types.melee, nil, breed)
  273  

scripts\extension_systems\behavior\nodes\actions\bt_mutant_charger_charge_action.lua:
  481  
  482: 					Dodge.sucessful_dodge(target_unit, unit, "melee", dodge_type, breed)
  483  				end

scripts\extension_systems\behavior\nodes\actions\bt_shoot_net_action.lua:
  257  
  258: 			Dodge.sucessful_dodge(target_unit, unit, "ranged", dodge_type, breed)
  259  

scripts\extension_systems\character_state_machine\character_states\utilities\dodge.lua:
  152  
  153: Dodge.sucessful_dodge = function (dodging_unit, attacking_unit, attack_type, dodge_type, attacking_breed)
  154  	local dodging_unit_fx_extension = ScriptUnit.has_extension(dodging_unit, "fx_system")

scripts\utilities\minion_attack.lua:
   493  					if not scratchpad.successful_dodge then
   494: 						Dodge.sucessful_dodge(target_unit, unit, attack_types.melee, dodge_type, breed)
   495  

   881  			if not hit and is_dodging and not scratchpad.successful_dodge then
   882: 				Dodge.sucessful_dodge(hit_unit, unit, attack_types.melee, dodge_type, breed)
   883  

  1196  	if not hit and is_dodging and not scratchpad.successful_dodge then
  1197: 		Dodge.sucessful_dodge(target_unit, unit, attack_types.melee, dodge_type, breed)
  1198  

  1239  			if not scratchpad.successful_dodge and not in_reach and (is_dodging or scratchpad.target_dodged_during_attack) then
  1240: 				Dodge.sucessful_dodge(hit_unit, unit, attack_types.melee, dodge_type, breed)
  1241  

  1265  	if not hit_target_unit and not scratchpad.successful_dodge and scratchpad.target_dodged_during_attack then
  1266: 		Dodge.sucessful_dodge(target_unit, unit, attack_types.melee, nil, breed)
  1267  

  1311  			if not hit and is_dodging and not scratchpad.successful_dodge then
  1312: 				Dodge.sucessful_dodge(hit_unit, unit, attack_types.melee, dodge_type, breed)
  1313  

shoot_dodge_window
41 results - 10 files

scripts\settings\breed\breed_actions\cultist\cultist_assault_actions.lua:
  678  		},
  679: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  680  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  760  		},
  761: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  762  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  831  		},
  832: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  833  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

scripts\settings\breed\breed_actions\cultist\cultist_captain_actions.lua:
   261  		time_per_shot = shooting_difficulty_settings_bolt_pistol.time_per_shot,
   262: 		dodge_window = shooting_difficulty_settings_bolt_pistol.shoot_dodge_window,
   263  		attack_intensities = {

   314  		time_per_shot = shooting_difficulty_settings_plasma_pistol.time_per_shot,
   315: 		dodge_window = shooting_difficulty_settings_plasma_pistol.shoot_dodge_window,
   316  		attack_intensities = {

   360  		time_per_shot = shooting_difficulty_settings_plasma_pistol_volley.time_per_shot,
   361: 		dodge_window = shooting_difficulty_settings_plasma_pistol_volley.shoot_dodge_window,
   362  		attack_intensities = {

   409  		time_per_shot = shooting_difficulty_settings_burst.time_per_shot,
   410: 		dodge_window = shooting_difficulty_settings_burst.shoot_dodge_window,
   411  		attack_intensities = {

   438  		time_per_shot = shooting_difficulty_settings_fullauto.time_per_shot,
   439: 		dodge_window = shooting_difficulty_settings_fullauto.shoot_dodge_window,
   440  		attack_intensities = {

  1408  		time_per_shot = shooting_difficulty_settings_shotgun.time_per_shot,
  1409: 		dodge_window = shooting_difficulty_settings_shotgun.shoot_dodge_window,
  1410  		shoot_template = BreedShootTemplates.renegade_captain_shotgun,

scripts\settings\breed\breed_actions\cultist\cultist_shocktrooper_actions.lua:
  607  		time_per_shot = shooting_difficulty_settings.time_per_shot,
  608: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  609  		shoot_template = BreedShootTemplates.renegade_shocktrooper_default,

  661  		},
  662: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  663  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  739  		},
  740: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  741  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

scripts\settings\breed\breed_actions\renegade\renegade_assault_actions.lua:
  697  		},
  698: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  699  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  778  		},
  779: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  780  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

scripts\settings\breed\breed_actions\renegade\renegade_captain_actions.lua:
   261  		time_per_shot = shooting_difficulty_settings_bolt_pistol.time_per_shot,
   262: 		dodge_window = shooting_difficulty_settings_bolt_pistol.shoot_dodge_window,
   263  		attack_intensities = {

   314  		time_per_shot = shooting_difficulty_settings_plasma_pistol.time_per_shot,
   315: 		dodge_window = shooting_difficulty_settings_plasma_pistol.shoot_dodge_window,
   316  		attack_intensities = {

   360  		time_per_shot = shooting_difficulty_settings_plasma_pistol_volley.time_per_shot,
   361: 		dodge_window = shooting_difficulty_settings_plasma_pistol_volley.shoot_dodge_window,
   362  		attack_intensities = {

   409  		time_per_shot = shooting_difficulty_settings_burst.time_per_shot,
   410: 		dodge_window = shooting_difficulty_settings_burst.shoot_dodge_window,
   411  		attack_intensities = {

   438  		time_per_shot = shooting_difficulty_settings_fullauto.time_per_shot,
   439: 		dodge_window = shooting_difficulty_settings_fullauto.shoot_dodge_window,
   440  		attack_intensities = {

  1397  		time_per_shot = shooting_difficulty_settings_shotgun.time_per_shot,
  1398: 		dodge_window = shooting_difficulty_settings_shotgun.shoot_dodge_window,
  1399  		shoot_template = BreedShootTemplates.renegade_captain_shotgun,

scripts\settings\breed\breed_actions\renegade\renegade_rifleman_actions.lua:
  641  		},
  642: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  643  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  712  		},
  713: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  714  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  782  		},
  783: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  784  		num_shots = shooting_difficulty_settings.num_shots_cover,

scripts\settings\breed\breed_actions\renegade\renegade_shocktrooper_actions.lua:
  602  		time_per_shot = shooting_difficulty_settings.time_per_shot,
  603: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  604  		shoot_template = BreedShootTemplates.renegade_shocktrooper_default,

  656  		},
  657: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  658  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

  734  		},
  735: 		dodge_window = shooting_difficulty_settings.shoot_dodge_window,
  736  		shoot_cooldown = shooting_difficulty_settings.shoot_cooldown,

scripts\settings\breed\breed_actions\renegade\renegade_twin_captain_actions.lua:
  728  		time_per_shot = shooting_difficulty_settings_plasma_pistol.time_per_shot,
  729: 		dodge_window = shooting_difficulty_settings_plasma_pistol.shoot_dodge_window,
  730  		attack_intensities = {

scripts\settings\difficulty\minion_difficulty_settings.lua:
  652  		num_shots = _equal_difficulty_values(4, 4),
  653: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  654  	},

  677  		num_shots_cover = _equal_difficulty_values(2, 4, true),
  678: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  679  	},

  684  		num_shots = _equal_difficulty_values(10, 10),
  685: 		shoot_dodge_window = _equal_difficulty_values(0.75, 0.75),
  686  	},

  691  		num_shots = _equal_difficulty_values(4, 5, true),
  692: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  693  		num_shots_cover = _equal_difficulty_values(4, 7, true),

  706  		num_shots = _equal_difficulty_values(5, 6),
  707: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  708  	},

  713  		num_shots = _equal_difficulty_values(5, 5),
  714: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  715  	},

  720  		num_shots = _equal_difficulty_values(1, 1),
  721: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  722  	},

  727  		num_shots = _equal_difficulty_values(8, 8),
  728: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  729  	},

  734  		num_shots = _shoot_steps_asc(10, 10, true),
  735: 		shoot_dodge_window = _equal_difficulty_values(0.5, 0.5),
  736  	},

  762  		num_shots = _equal_difficulty_values(12, 12),
  763: 		shoot_dodge_window = _equal_difficulty_values(0.75, 0.75),
  764  	},

  769  		num_shots = _equal_difficulty_values(1, 1),
  770: 		shoot_dodge_window = _equal_difficulty_values(0.75, 0.75),
  771  	},

scripts\utilities\minion_attack.lua:
  365  
  366: local function _set_shoot_dodge_window(unit, scratchpad, target_unit, dodge_window)
  367  	local extra_timing = 0

  434  	if dodge_window then
  435: 		_set_shoot_dodge_window(unit, scratchpad, target_unit, dodge_window)
  436  	end

  623  
  624: 		_set_shoot_dodge_window(unit, scratchpad, target_unit, action_data.dodge_window)
  625  	end

proc_events.on_successful_dodge

`29 results - 9 files

scripts\extension_systems\character_state_machine\character_states\utilities\dodge.lua:
180
181: dodging_unit_buff_extension:add_proc_event(proc_events.on_successful_dodge, param_table)
182 end

scripts\settings\buff\hordes_buff_templates.lua:
1971 proc_events = {
1972: [proc_events.on_successful_dodge] = 1,
1973 },

scripts\settings\buff\training_grounds_buff_templates.lua:
35 proc_events = {
36: [buff_proc_events.on_successful_dodge] = 1,
37 },

scripts\settings\buff\archetype_buff_templates\ogryn_buff_templates.lua:
1780 [proc_events.on_player_hit_received] = 1,
1781: [proc_events.on_successful_dodge] = 1,
1782 },

scripts\settings\buff\archetype_buff_templates\veteran_buff_templates.lua:
2435 proc_events = {
2436: [proc_events.on_successful_dodge] = 1,
2437 },

scripts\settings\buff\archetype_buff_templates\zealot_buff_templates.lua:
145 [proc_events.on_hit] = 1,
146: [proc_events.on_successful_dodge] = 1,
147 },
148 add_child_proc_events = {
149: [proc_events.on_successful_dodge] = quickness_successful_dodge_stacks,
150 },

182 end,
183: [proc_events.on_successful_dodge] = function (params, template_data, template_context)
184 return template_data.dodge_stacks

276 proc_events = {
277: [proc_events.on_successful_dodge] = 1,
278 },

480 proc_events = {
481: [proc_events.on_successful_dodge] = 1,
482 },

2368 proc_events = {
2369: [proc_events.on_successful_dodge] = 1,
2370 },

2408 proc_events = {
2409: [proc_events.on_successful_dodge] = 1,
2410 },

scripts\settings\buff\weapon_traits_buff_templates\base_weapon_trait_buff_templates.lua:
2357 proc_events = {
2358: [proc_events.on_successful_dodge] = 1,
2359 },

2370 proc_events = {
2371: [proc_events.on_successful_dodge] = 1,
2372 },

scripts\settings\buff\weapon_traits_buff_templates\weapon_traits_melee_common_buff_templates.lua:
698 proc_events = {
699: [proc_events.on_successful_dodge] = 1,
700 },

731 proc_events = {
732: [proc_events.on_successful_dodge] = 1,
733 },

764 proc_events = {
765: [proc_events.on_successful_dodge] = 1,
766 },

scripts\settings\equipment\weapon_traits\weapon_traits_melee_common.lua:
3326 proc_events = {
3327: [proc_events.on_successful_dodge] = 1,
3328 },

3331 proc_events = {
3332: [proc_events.on_successful_dodge] = 1,
3333 },

3336 proc_events = {
3337: [proc_events.on_successful_dodge] = 1,
3338 },

3341 proc_events = {
3342: [proc_events.on_successful_dodge] = 1,
3343 },

3365 proc_events = {
3366: [proc_events.on_successful_dodge] = 1,
3367 },

3370 proc_events = {
3371: [proc_events.on_successful_dodge] = 1,
3372 },

3375 proc_events = {
3376: [proc_events.on_successful_dodge] = 1,
3377 },

3380 proc_events = {
3381: [proc_events.on_successful_dodge] = 1,
3382 },

3391 proc_events = {
3392: [proc_events.on_successful_dodge] = 1,
3393 },

3396 proc_events = {
3397: [proc_events.on_successful_dodge] = 1,
3398 },

3401 proc_events = {
3402: [proc_events.on_successful_dodge] = 1,
3403 },

3406 proc_events = {
3407: [proc_events.on_successful_dodge] = 1,
3408 },
`

2 Likes

3 Likes

If only there was a guide that paid attention to intricacies like these… :wink:

1 Like