Page 1 of 1

[HOWTO] How To: Modify Custom Relationship Traits

Posted: Thu May 30, 2019 8:53 pm
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);