# AbilitySystem: Is AddReplicatedLooseGameplayTags actually doing something?

**URL:** <https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549>\
**Category:** C++\
**Tags:** Abilities, Ability-System, unreal-engine, UE5-0, question, CPP\
**Created:** [September 7, 2022, 11:31am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549 "2022-09-07T11:31:13Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 7, 2022, 11:31am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/1 "2022-09-07T11:31:13Z")

</div>

Because if i try to search usage of ReplicatedLooseTags its not used anywhere.  
And its not virtual and not marked with ReplicatedWith so i cant change hot its replicated.

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 12, 2022, 6:53pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/2 "2022-09-12T18:53:09Z")

</div>

Did it work for you?  
Nothing happens to me.  
There is a similar meta in the BP, but it is not replicated, although it has a flag

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 12, 2022, 11:44pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/3 "2022-09-12T23:44:10Z")

</div>

What do you mean exactly? These are the definitions:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/a/e1a3ac15539d6e15abbaf6ac1befce480f1a0b73.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/d/26dad9ddb8fc94344728e0d37facdf7c99088cd8.png)

I’ve used loose tags before, with replication, and they work just as you’d expect

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 13, 2022, 8:14am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/4 "2022-09-13T08:14:27Z")

</div>

> [@Fe\_Games\_Studio](#):
>
> Did it work for you?

No. I Had to write my version of tag replication.

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 13, 2022, 8:18am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/5 "2022-09-13T08:18:24Z")

</div>

Yeah. But then.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/c/bec2651de9ce7a99d54c4454af6732daa9ea3696.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/9/cf99aae0bca2a2cad6dd61c8e0cf702e6e24b652.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/f/88fc667a32c2359911a16eca6be2374708d19793.png)  
These functions are not used anywhere else. They just add and remove tags from ReplicatedLooseTags container.  
And it does not have ReplicatedUsing, so you cant override it.  
And its just there. It Replicates tags but does not uses it. Those tags are not being added to main LooseTag container.

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 13, 2022, 9:10am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/7 "2022-09-13T09:10:07Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/f/84f75d0e82cde2707891cf30c9942094675e0132.png)  
It’s really working as it should, not sure what the issue is on your side. What do you want to override? Loose tags works like regular tags, they just don’t need an effect to exist.  
Just because the engine doesn’t use them it doesn’t mean that they don’t work, the functionality is there and you can use it if you want to. I know for a fact that I’ve used it, without any issues

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/6/d564aee9ad3ac497fb294f189675b727267c4bb0.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/a/ebac850a3c047b291a282ccc61b9f59e2c6e9546.png)

The replication of the tags happens when the `ReplicatedLooseTags` property replicates. It’s a FMinimalReplicationTagCountMap, and if you check its `NetSerialize` function, you will find this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/e/d7e86f6844242f9acca068e0d73374cfb8ca122d.png)

So when the property is replicated, and the updated internal tag map of the struct is sent over the network, the received map overwrites the map that was already there, and then the `UpdateOwnerTagMap()` call updates the owning Ability System Component’s tags by calling this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/c/0acb3ad63b0ea128f2386b4732b4e9a227a58a75.png)

So, short answer, yes, they work just as you’d expect 🙂

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 14, 2022, 1:38am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/8 "2022-09-14T01:38:54Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/2/fa281cac524395dd71f90c177f0673dd5faf4e68.png)  
I wrote the same logic as you.  
And it doesn’t work.  
Do you have an Ability System Component located in a character or in a player state?

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 14, 2022, 1:42am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/9 "2022-09-14T01:42:27Z")

</div>

What version of the engine?

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 14, 2022, 4:48am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/10 "2022-09-14T04:48:49Z")

</div>

There is one more oddity.  
When I have only 1 client, then tee is added only to the server.  
 ![Снимок экрана 2022-09-14 114750](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/b/cdbad0b2bfd27665f10037be98421328cf67c950.png)

![Снимок экрана 2022-09-14 114639](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/b/c8b4550e2e0114e52dca2f06246e80b471a3a947.png)

and when there are 2 clients, then when you click on add a tag on 1 client, the tag will be added to the second client

 ![Снимок экрана 2022-09-14 114821](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/d/3fdc6c0854af8260e68347f20b89e24ee2e392c5.png)

![Снимок экрана 2022-09-14 114611](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/a/45afe6eba85cca20e809094b982d3a575992f949.png)

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 14, 2022, 8:27am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/11 "2022-09-14T08:27:27Z")

</div>

The example I showed was launcher 5.0.3, and the character did have an ability system component, but I’m also using them in another project with a custom engine build and the ASC being in the player state. I can do some more tests with more clients soon

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 15, 2022, 12:36pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/12 "2022-09-15T12:36:34Z")

</div>

Looks like you’re right. May be it was a mistake on my side somewhere. Because tags were not being added to LooseTag container from ReplicatedTags. Although cant check it now. Maybe I’ll come back to this thread next time somewhen.

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 15, 2022, 1:09pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/13 "2022-09-15T13:09:49Z")

</div>

To be honest with you, I did encounter an issue with this that the tags were replicated to everyone but the client that called the server function. I tried to figure out why but I was not able to find why that was the case. I’m thinking of posting a question on UDN about it, because it’s really strange behavior, and I’m invested now. If I do have news I’ll post here

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 15, 2022, 1:40pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/14 "2022-09-15T13:40:25Z")

</div>

Yes, that’s what I’m talking about)  
Give a link to the your question on UDN.  
It would be great if you wrote here after you figured out the problem)

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 15, 2022, 2:09pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/15 "2022-09-15T14:09:19Z")

</div>

You could circumvent this by calling the add/remove functions twice, once locally and once on a server function, and it should work, but yeah it’s very weird that it doesn’t work

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 15, 2022, 2:19pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/16 "2022-09-15T14:19:17Z")

</div>

Alright after checking a bit more, the issue is this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/c/65c714a642433426bbe4caf1de280275f5baac49.png)

The tag map is set to not replicate to the owning client, which is what’s causing this issue. So if you remove that condition for it, like moving lines 1583 and 1584 to 1569 it should fix the issue

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 15, 2022, 2:34pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/17 "2022-09-15T14:34:07Z")

</div>

What is UDN?

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [September 15, 2022, 3:06pm UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/18 "2022-09-15T15:06:11Z")

</div>

Unreal Developer Network, it’s a premium support service by Epic

---

<div class="post-metadata">

**Author:** ![Fe\_Games\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fe\_Games\_Studio](https://forums.unrealengine.com/u/Fe_Games_Studio)\
**Post date:** [September 16, 2022, 6:54am UTC](https://forums.unrealengine.com/t/abilitysystem-is-addreplicatedloosegameplaytags-actually-doing-something/643549/19 "2022-09-16T06:54:10Z")

</div>

You are gorgeous!  
Thank you!
