Description

When creating a GameplayEffect, modifiers can tag requirements for the Source and Target tags. For Duration gameplay effects, these tag requirements are checked from FAggregatorMod::UpdateQualifies which ticks to update if the modifier should apply or not. However, these tag requirements are never checked for immediate modifier application for Instant or Periodic abilities as those just call InternalExecuteMod directly from ExecuteActiveEffectsFrom without checking the tag requirements. GE Executions go through a different code path and will correctly check the tag requirements from AttemptCalculateCapturedAttributeMagnitude.

This is confusing because tag requirements work in some situations but not others. Either immediate mod application should be changed to check tag requirements, or this issue should be communicated to users somehow. This is not a recent regression as it does not appear these tag requirements for immediate modifiers were properly checked in the past.

Steps to Reproduce

There are simpler ways to reproduce this with test content, but here is a repro using Lyra:

  1. Compile and open Lyra in the editor
  2. Load the L_ShooterGym map for easy testing
  3. Open the /ShooterCore/Weapons/Grenade/GE_Grenade_Cooldown effect which is used whenever you throw a grenade
  4. Add a new Modifier of attribute LyraHealthSet.Healing, operation Add, magnitude -10 like in the screenshot
  5. Play in editor, and throw a grenade with Q. Verify that your health decreases (by -20 because the period activates twice) due to the new modifier added. Quit out of play in editor
  6. Go back to the modifier you just added and add a required tag of Cosmetic.BodyStyle.Medium (or another tag the player won't have) to the Source Tags like in the screenshot (which is from 5.3, older versions will look different)
  7. Play in editor, and throw a grenade with Q

Expected Result:
The player's health should not decrease because the player's source tags do not match the required tags added in step 6

Actual/broken result:
The player's health is still decreased when grenade is thrown because the tag requirements are ignored

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-189065 in the post.

3
Login to Vote

Fixed
ComponentUE - Gameplay - Gameplay Ability System
Affects Versions4.275.3
Target Fix5.4
Fix Commit30823101
Main Commit30823117
CreatedJun 19, 2023
ResolvedJan 29, 2024
UpdatedFeb 12, 2024