-
Notifications
You must be signed in to change notification settings - Fork 0
Relationships
Relationships track how one agent feels about another agent. In this sense, they are directed objects. TDRS uses one-way relationships because it allows us to have asymmetrical relationships (i.e., the way character A feels about character B isn't necessarily the way that character B feels about character A).
Stats are numerical values associated with relationships that usually represent one agent's affinity for another. For example, relationship stats might include friendship, romance, and trust.
Traits attached to relationships are most helpful when they represent relationship statuses (friend, crush, rival) or directed emotional states (angry-at, in-love-with, disgusted_with). Traits make it easy to filter for certain relationships when defining preconditions for social rules and social events. Also, since social events can specify temporary durations for traits, you can use traits to show emotional responses to social events.
When defining traits for relationships, be sure to set the traitType
field to relationship
.
TDRS enables users to define many different types of agents. So, there might be cases when you want relationships between certain types of agents to have different stats than others. For example, a game with character and faction agents might want to track friendship stats between characters, loyalty stats from characters to factions, reputation stats from factions to characters, and friendship stats between factions.
TDRS uses Relationship Schemas streamline relationship creation. Relationship schemas are predefined relationship configuration settings based on the agent-type of the owner and target of a new relationship. We explain how to create nre relationship schemas in our how-to guide. Whenever you try to create a new relationship, TDRS will search its internal database of schemas for one that matches the situation.
Below are the various fields of a RelationshipSchema.
-
ownerType
: (required) The agent schema name of the relationship's owner. -
targetType
: (required) The agent schema name of the relationship's target -
Traits
: (optional) The list IDs of traits to add when constructing a new agent of this type. -
Stats
: (optional) A list of stat schemas. The data fields of a stat schema are provided below.-
StatName
: The name of the stat -
baseValue
: The default value of the stat at agent instantiation. -
minValue
: The minimum value the stat can have -
maxValue
: The maximum value the stat can have. -
IsDiscrete
: If true the stat's value will be rounded down to the closest integer.
-