[HOWTO] How To: Modify Custom Relationship Traits

Announcements, support questions, and discussion for Love/Hate.
Post Reply
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Modify Custom Relationship Traits

Post by Tony Li »

In email, someone asked:
When I went through the factionMember and factionManager I could only find affinity....no functions for modifying created traits. [How do I modify custom relationship traits?]
To keep FactionManager's API simple, it omits methods to modify non-affinity relationship traits. Instead, use FactionDatabase's methods, such as FactionDatabase.SetPersonalRelationshipTrait() and FactionDatabase.ModifyPersonalRelationshipTrait(). They accept faction names or ID numbers.

Example:

Code: Select all

var database = FactionManager.instance.factionDatabase;
traitID = database.GetPersonalityTraitID("Obligation");
database.ModifyPersonalRelationshipTrait("Samurai", "Shogun", traitID, -10);
Post Reply