Gameplay Attribute does not change

I am using the Gameplay Ability System. I have a game play effect which changes an attribute but it will not change the attribute I want. I can make a modifier of the effect to change a particular attribute just fine. However, I have found that most attributes will not change, only one of them changes correctly.

Maybe related:
I have been struggling with Unreal using C++, one time I made a base character and attribute sets using Action RPG example as a guide and then made a Blueprint base child from them and after changing the base C++ the AbilitySystemComponent was null and so I couldn’t do anything until I made a new Blueprint base child and reimplemented the whole child from the old one, which was tedious. The AbilitySystemComponent wasn’t null in the new Blueprint child and I could work again with new one and just deleted the old one. It was frustrating.

A few weeks ago I was working on taking GetInventoryItems from the InventoryInterface taken from the ActionRPG sample and I was passing in “None” as the PrimaryAssetType which means it would be not valid when IsValid() is called, but that wasn’t happening so it wasn’t getting all Inventory items when set to “None” but then I just put code to debug and determine the problem before the if statement:

FPrimaryAssetId AssetId = Pair.Key->GetPrimaryAssetId();
bool ItemTypeValid = ItemType.IsValid();
FString ItemTypeName = ItemType.GetName().ToString();

And then put the ItemTypeValid in the if statement and then it worked. That doesn’t make sense, it should just work the way it was before.

Is there an Unreal Engine C++ coding secret which I am missing out on?

I had a base character stats gameplay effect which was being applied first which had an infinite duration and the attributes were set to override. Then I had equipment effects which would add to the override stats which didn’t work. Changing the base stats gameplay effect to an instant duration fixed the problem.

When making a base blueprint class of a character and then renaming that character and changing the C++ code, something messed with the redirectors. Trying to fix up the redirectors with the editor didn’t work right so I could have tried fixing them with CLI or try to edit the blueprint file in a text editor.

I still don’t know why that code for the GetInventoryItems didn’t show up as not getting a valid item type. I think it was an issue with the Unreal Build tool or hot reload. Maybe blue print and C++ interop had a bug?

Reparent to a more primitive base class, then save, then reparent it back to your C++ base class and it should fix the issues some of the C++ code not running correctly. This was the most frustrating bug I have had with UE.

You are right, attributes were changed for one of my top parent classes and didn’t change for the actual derived class. However, reparenting it caused deletion of AbilitySystemComponent by Garbage collector and crash of game and editor. A pity, isn’t it?