The documentation & comments for UGameplayTagResponse table indicates that it will respond to tag changes on a character and apply Gameplay Effects in response according to the total count of the specified tags.
This doesn’t work and looking at UGameplayTagReponseTable::GetCount makes it immedaitely clear why:
Count = ASC->GetAggregatedStackCount(MakeQuery(Pair.Tag));
GetAggregatedStackCount doesn’t count gameplay tags, but rather counts instances of active gameplay effects which contain matching tags.
If I change that line to
Count = ASC->GetTagCount(Pair.Tag);
the system behaves as I would expect.
Have I completely misunderstood the intent of the GameplayTagResponseTable or is this just a bug?
Is there any reason to not make the change to counting tags?
Are there any other caveats to this system that I should be aware of? (e.g. should I even be using it?)
Thank you!
[Attachment Removed]
Steps to Reproduce
Create a GameplayTagResponseTable
Update project settings (Ability System Globals) to reference the table you created
Add a positive entry for a tag referencing a gameplay effect
Create some way to apply the tag to the player character
Run the game
Note that when the tag is applied the associated gameplay effect is not applied
[Attachment Removed]
Hey Habib, the gameplay tag response functionality was added in 2015 and from the looks of it - has hardly been updated apart from a minor update in 2016. Looking at our internal projects like Fortnite, the feature isn’t used. That’s to say, any quirks and bugs around it most likely come from the fact that it has never been used or tested much. We also won’t be changing the behavior, since the benefit is too little while there is a risk of existing projects relying on the current behavior.
“GetAggregatedStackCount doesn’t count gameplay tags, but rather counts instances of active gameplay effects which contain matching tags.”
From looking at the code it counts stacks of gameplay effects with matching tags. It doesn’t count levels, or loose gameplay tags.
“Have I completely misunderstood the intent of the GameplayTagResponseTable or is this just a bug?”
I’m inclined to agree with your expectation that it should just look at tag count, not at “aggregated stack counts of GEs with that tag”. I believe the feature has justs been left behind, while gameplay tag count management has gone through multiple iterations.
“Is there any reason to not make the change to counting tags?”
Feel free to, locally!
“Are there any other caveats to this system that I should be aware of? (e.g. should I even be using it?)”
Just be aware that we haven’t touched GameplayTagResponseTable code in ages, the original dev isn’t at Epic anymore, and we don’t use the feature in any of our live games.
[Attachment Removed]
Thank you for clarifying!
[Attachment Removed]