Dynamic enum alternative for a custom GAS-like system

I believe GAS uses Gameplay Tags, maybe you can make use of it too?

They use it for many things, but for attributes/stats you just declare variables inside your AttributeSet class and they show up like this.
image

Using tags for it could maybe work, but it would be a bit weird inside C++ to do stuff like Target->GetStat(EStats::STR), I think.

Honestly, just using an FString for the name of the stat is perfectly functional.
You can have a TSet<> of the stats that are allowed, and check argument FString instances against this set if you want to avoid typos.
You can use a TMap<FString, int> for the base stats.
These are very simple to work with in the C++ code, and in Blueprints, and make sense when you print them. No muss, no fuss.

I’ll give it a few tests with FStrings! I have a lot of reluctance to rely on strings, but it might just work well haha.

Thanks a lot guys! Cheers.

2 Likes