How do I use the FGameplayTagContainer and Tag Editor?

Hey I repoen the issue. As of version 4.3 (the preview release from github), the tags are still not loading on startup.

Here is my code from my custom editor engine class:

void UAREditorEngine::Init(IEngineLoop* InEngineLoop)
{
	Super::Init(InEngineLoop);
	//DataTable'/Game/Blueprints/Data/GameTags.GameTags'
	IGameplayTagsModule& GameplayTagsModule = IGameplayTagsModule::Get();
	FString Tags = "DataTable'/Game/Blueprints/Data/GameTags.GameTags'";
	TArray<FString> TagsList;
	TagsList.Add(Tags);
	GameplayTagsModule.GetGameplayTagsManager().LoadGameplayTagTables(TagsList);
}

And tags are not loaded upon editor startup. The workaround I’m aware of for now is to, manualy reimport tags table, so they get loaded properly.

Hey,

I wonder if there has been any changes to this gameplay tags system?

I noticed you can now create Data Tables directly in the editor (rather than importing a csv file), but it still seems overly complicated to get those Data Tables loading into Gameplay Tags. I didn’t manage to extend UEngine and UEditorEngine (actually, I couldn’t get the engine to use my extended classes rather than the default, even after changing DefaultEngine.ini). Trying to modify from source directly now.

I need this for behavior trees: the Run Behavior Dynamic task requires Gameplay Tags.

Did someone managed to use gameplay tags? We managed to import them and see them in BT nodes, but no idea how to add them to actors.

Almost two years later. No updated info anywhere on if or how Gameplay Tags work?

The tag system is a little hard to get into, but is pretty powerful. I apologize this isn’t more user friendly, but this is what I would recommend:

In your DefaultEngine.ini, add this:

[GameplayTags]
ImportTagsFromConfig=true

This allows tags to be created in the editor and saved to an ini file, DefaultGameplayTags.ini. The other option is to import them from FGameplayTagTableRow data tables. This is harder to setup though and I think the .ini approach is superior.

With ImportTagsFromConfig enabled, you should be able to add tags directly in the editor. Edit → Project Settings → GameplayTags. You can also add or remove them inline when editing a GameplayTag or GameplayTagContainer property.

Tags themselves are very generic and can be used for a lot of different things. The basic idea is that they are strings with a hierarchical relationship. E.g., they can have a parent. An example tag would be “A.B.C” or “Damage.Physical.Pierce”. That is really all tags are themselves. They hold no other data on their own.

There is functionality for querying tags. For example, you could say something like “If I take Damage.Physical.* damage, do X”. Which would match on Damage.Physical.Pierce but not Damage.Magic.Fire.

Tags can be dealt with individually (FGameplayTag) or in containers (FGameplayTagContainer). So for example, you could have a container describing a spell and then write a query that, by looking at the spell’s tag container, acts on “spells that have Damage.Magic.Fire AND SpellRange.AOE tags”.

That is basically it for tags themselves. They are used in lots of places. In the ability system for example, tags are pretty important:

They can describe GameplayEffect assets (“This will set you on fire”).
They can be granted by GameplayEffects to things with Ability System Component (“This person is now on fire”).
They can be used to specify requirement for activating abilities (E.g, must not have “Status.Fire” to activate the ability).
They are used to invoke GameplayCue events (which do cosmetic, client side things like spawn particles. E.g, GameplayCue.Fire).

In Paragon we also use them for very specific Paragon things. We tag our heroes with tags in order to see what roles or affinities they can use.

Hope that helps!

Can you at least describe the import process using FGameplayTagTableRows? Also, is there any way to limit the scope of the tag editor to a specific set of parent tags via metadata? Obviously there’s manual filtering, but this doesn’t allow programmers to limit the scope of what tags ‘should’ be used to designers.

This thread is literally the only documentation for using Gameplay Tags whatsoever. Does this mean we probably shouldn’t be utilizing them, as they’re not fully supported? I like the hierarchical set up of this system and the ability to set-up well-defined per-project tags that are centralized, but we could probably develop a similarly capable system if it’s not fully online.

How can I add GameplayTag to an Actor? I cant find any interface or function to actually do that.