Skip to content

Members

Members are assigned to Factions through a Faction Membership.

Memberships are represented by a FactionMembership struct and will provide the following information:

Attribute Description
Faction Data The faction related to this membership.
Main Faction? Is this the Main Membership?
Reputation Current amount of reputation.
Min Reputation Minimum amount of reputation in the current tier.
Max Reputation Maximum amount of reputation in the current tier.
Tier Name Unique name of the current Reputation Tier

Creating Faction Members

There are two important classes that contribute to defining a Faction Member.

  1. The NinjaFactionComponent that must be present in every Pawn or Character that can join a Faction.
  2. The FactionMemberInterface that can optionally be assigned to members, to provide a faster access to the component.

As long as you retrieve the Component using the Function Library or the Subsystem, you should always be able to obtain it, regardless of the interface being implemented or not.

Considering the Interface

Even though it is an optional task, implementing the interface and directly returning the Component can save some cycles spent on iterations over a Faction Member's component array.

However, you can isolate the component's retrieval, which usually hapens in the Controllers and Widgets, and cache the obtained pointer to avoid the constate loop event implementing the interface.

Advanced Interface Usage

The Member Interface can also be used to provide default Factions to the Faction Component. This option may be relevant if your logic is dynamic, based on each character, and you don't want to extend the Faction Component itself.

Accessing Memberships

Memberships are maintained by the Faction Component and replicated using the FastArraySerializer. This means you can access all Faction Memberships through that component, from an any network client.

Modifying Memberships

Memberships are granted, modified and removed via Faction Component.