[HOWTO] How To: Modify Custom Relationship Traits
Posted: Thu May 30, 2019 8:53 pm
In email, someone asked:
Example:
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.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?]
Example:
Code: Select all
var database = FactionManager.instance.factionDatabase;
traitID = database.GetPersonalityTraitID("Obligation");
database.ModifyPersonalRelationshipTrait("Samurai", "Shogun", traitID, -10);