
Relationship System
(Unreal Engine 4)
The Relathionship system, is a simple, light-weight relationship system you can add to you game for allowing the player to build bonds with NPCs.
Documentation
​
Get Started
-
In order for the relationship system to function you need to set it up properly. To do this:
-
Open 'bp_AffinityGameInstance' under RelationshipSystem > Blueprint.
-
Change the blueprints parent to whatever game Instance your project uses.
-
Under Project Settings, go to 'Maps & Modes' and change your Game Instance Class bp_AffinityGameInstance
-
You are good to go!
-
​
Add an Affinity Member
-
Either create a child of 'bp_AffinityMember_Base' do duplicate one of the blueprint classes in RelathionshipSystem > Blueprints > Affinity Members.
-
Change the variables as you see fit.
-
Name
-
Description: The biography that will always appear when this character is selected in the Affinity Member Menu.
-
Sex:
-
Portrait (Small)
-
Portrait (Large)
-
Rank Description: The relationship description that will appear when you reach a designated relationship rank.
-
Special Status Description: The relationship description that will appear when you the member has this specific special status.
-
​
bp_GameData_Affinity
-
The blueprint that contains key data for the Relationship system.
-
System Name:
-
Max Affinity Rank: The Maximum Affinity Rank any given member can reach.
-
Rank Required AP: The amount of AP a member must reach in order to unlock the designated rank. (Key = Rank | Value = Required AP.)
-
Rank Names: The name the relationship status when the designated rank is reached.
-
​
Functions
-
All the necessary functions for using the relationship system.
-
Get Affinity Game Instance: Get the instance with the persistent Affinity variables. (E.G. AffinityMembers)
-
Add Member: Adds a newly recognized Affinity Member to this game instance. (Only one member can exist in an instance at a time.
-
Get Affinity Rank: Gets the current rank of an affinity member based on their class.
-
Has Special Status: Checks if an affinity member has a special status. (These can be set from e_RelationshipSpecial)
-
Give Special Status: Gives an affinity member a special status. (This will override the standard Rank description in the Affinity Member Menu).
-
= Rank?: Checks of a members Rank is = a specified value.
-
> Rank?: Checks of a members Rank is > a specified value.
-
< Rank?: Checks of a members Rank is < a specified value.
-
Add AP: Adds AP (Affinity Points) to a specific member. Once a present threshold is reached, they will increase in Affinity Rank.
-
Get Highest Member: Gets whatever affinity member that has the highest combination of Rank and AP.
-