Gameplay Tags Primer

What is this primer for?

With the release of Conan Exiles 3.0, we are making use of an in-built feature of Unreal, which is that of tags. It will not touch on specific implementation examples of gameplay tags; instead - this primer is designed to explain where to find them, and their potential uses.

Worth noting:

What are gameplay tags?

Gameplay tags are meta-data information about an object, and you can have multiple tags on a single object. This allows you a new method of finding objects, filtering them and using the tags to identify items. Tags also exist in a hierarchy. Each hierarchical step is it’s own tag.

Example:

The tag “Npc.Animal.Boss.Worldboss” can be present on multiple world-bosses, but if you want only the elephants, you can also group it with “Npc.Animal.Elephant”. This NPC would therefore have the following individual tags: Npc, Animal, Boss, Worldboss, Elephant.

What has gameplay tags?

Currently, Conan Exiles uses gameplay tags for Items, NPCs and placeables/building pieces.

These tags all have their relevant tags stored in the ItemTable, SpawnDataTable and BuildingGameplayTagTable for building pieces respectively.

It is also useful to know about these tables:

DT_BuildingGameplayTagsOrder
DT_ConstructionSubClass

For modders that have new types of building pieces and want them sorted correctly. You can add new tags and construction sub-classes to these tables.

How can I access gameplay tags?

In blueprints, you can access gameplay tags through a variety of functions. This primer is not designed to explain all these functions separately - but if you search for “gameplay tag” you will get a list that looks like in the image below, where we’ve also selected some of the more useful nodes for use in blueprints.

How can I add new gameplay tags?

You can add your own gameplay tags to be used by your mod, however it cannot be done the regular way Unreal uses, instead you will have to create a datatable containing your custom tags and point to that table from your ModController.

First you’ll need to create the table, using the “ Gameplay Tag Table Row” struct as the table row base. We’ll fill this table with the custom gameplay tags to be added.

Next we link to the table from the ModController by adding it to the AdditionalGameplayTagTables. Save and compile the ModController and the tags are ready to use.

This allows you to use gameplay tags for your own systems, or to extend existing systems with your own tags, such as the building upgrade system.