(GAS) Duplicate tags after possessing second pawn

Hello!

We currently have a small issue regarding possessing another pawn and going from mixed->full replication mode on an ability system component (ASC)

Context:

We have a playerstate with an ASC for which the avatar is pawn A (default pawn)

We have pawn B which is AI controlled with its own ASC on that pawn

We possess pawn B from pawn A, set pawn B’s ASC owner to our playerstate (via InitAbilityActorInfo)

Problem:

We have a Gameplay Effect (GE) on Pawn B that grants a tag, and as we used mixed replication mode i can see the tag while possessing pawn A in the GDT via MinimalReplicatedTags. The tag is yellow in GDT meaning server+client, that is correct

When I possess Pawn B and the ASC goes from mixed to full i now see in the GDT, server has x1 of that tag but the owning client has x2, one from the fully replicated gameplay effect and one remaining from the minimalreplicatedtags. This means when that effect is removed the tag is removed from both server and client but on the owning client I still see 1 local-only tag lingering from the initial minimalreplicatedtags array.

MinimalReplicatedTags has rep condition COND_SkipOwner so if that tag is removed when we remove the GE it is still not removed from the owners MinimalReplicatedTags.

The presence of that extra local-only tag is causing many issues as you can expect including inability to active locally predicted abilities for which that tag is a blocker

I am currently assuming this is standard behaviour and I am missing something but some advice would be much appreciated as currently all of my potential solutions require code changes that could easily lead to further problems

A most recent planned solution is to, on possession, manually clear MinimalReplicatedTags on the now owning client and trigger a replication of that when pawn b is unpossessed again via an rpc as opposed to ForceReplication in order to replicate it to the one client that requires the latest values. I’m not super confident that this is a correct approach

Thanks!

[Attachment Removed]

Hello! Thanks for clearly describing the repro condition. Indeed, if Pawn B was possessed by AI before and thus your client gets minimal replicated tags because B is a sim proxy, it’s bad when those tags remain on Pawn B when you possess it. I would say your intuition to locally clear MinimalReplicatedTags is correct. MinimalReplicatedTags serve no purpose on a pawn that is currently an autonomous proxy on your client.

Note that changing pawn possession wasn’t strongly considered when GAS was designed and development efforts in the meantime have also been in other areas. There is a bit more context in this [older [Content removed]

[Attachment Removed]