Download

Actor tag vs gameplay tag

A blueprint actor has a tags input array field in its class defaults, but it’s very unclear if this is the same as a gameplay tag or not.

The reason it’s unclear is because when you click in that item input field, you can just type away anything you like:

1.png

However, if you add a public variable that’s a gameplay tag array, and go to edit it below the world outliner, the UI suddenly looks like this:

2.png

This second UI is obviously better because there’s no question what goes into that field.

So are actor tags different from gameplay tags? (And if so why?)

And if not, they is the UI different? (It’s very inconsistent and confusing to a new user.)

Gameplay Tags is a plugin built for the Paragon game that later went public for engine users.

It’s not the same as regular tags.

Old actor tags or component tags are just strings. Unsafe to use (like any other string field where changing value often leads to bugs) and providing no features. These tag fields are just dinosaurs from the bygone era. Generally, avoid that.

Gameplay tags are great, stored in the “central location”, in .ini files. And once a tag is added, you can access it anywhere in the engine. UI doesn’t allow to simply change a name (preventing bugs), although there’s no easy way to rename used gameplay tags, sadly.

Gameplay tags support hierarchy, a tree of tags. Extremely useful thing. Just read docs and embrace it :slight_smile:

https://www.unrealengine.com/en-US/t…content-in-ue4
https://docs.unrealengine.com/en-US/…ags/index.html

More precisely, it was probably added for the Gameplay Ability system - initially developed for Paragon.
https://docs.unrealengine.com/en-US/…tem/index.html

Thanks for the explanations!

So if all of these “actor has tag” and other nodes just operate on strings, are gameplay tags backwards compatiable? If I ask for all actors with a certain tag, can I feed it a family level tag instead of a branch?

I’m planning on making my own GAS (because I don’t need all features of it and I want turn based), and attach a lot of effects as components on my pawns. Are there nodes which allow me to get all components with tags of a certain family?

Yes. It’s 2020 and Unreal still loads levels using strings… that blows my mind. How is that even allowed in this day and age?

I wouldn’t use like it, it’s hacking. Gameplay Tags feature doesn’t know or doesn’t care what stored in the old-style fields. Add simple Actor Component with Gameplay Tag or Gameplay Tag Container variable and set your actor-specific tag there :slight_smile:

Dunno, I’m referencing levels by TSoftObjectPtr<UWorld>. But I see now that in blueprint there’s only soft reference version available for Load Level Instance (creating a new level instance at given position), not for regular “Load Stream Level”. Nothing changed here since 4.0 then…

Ok, so a year later I’m trying to still make use of Gameplay Tags via Blueprints on actors… (ie NOT the old string based tags)…

However, I’m stumped by two things:

  1. How do I add a gameplay tag to an actor? Is just any visible variable of a gameplaytag type enough?
  2. How do I add tags to a query via Blueprints? Seems I can only do it via the editor? I want to do this in runtime or at least with an Blueprint Editor Utility.

If only GameplayTags would have been backwards compatible with the old actor tags… (or the old tag system made forwards compatible)…

Right now I’m doing this dance and… well, it’s not ideal:

Hi, as for 1.

How do I add a gameplay tag to an actor? Is just any visible variable of a gameplaytag type enough?

Some functionality (e. g. GetAllActorsOfClassMatchingTagQuery) with querying gameplay tags needs that the actor implements the IGameplayTagAssetInterface (which is only possible to do in C++, not possible to do in blueprints). So it would make sense to have the gameplay tag container inside your C++ class.

I’m not using C++ and I never will.