-
Notifications
You must be signed in to change notification settings - Fork 0
Agents
Agents are entities that form relationships with other agents. Agents can represent single characters, entire groups, ideologies, items, or any other entity that someone/something might develop a relationship with. In most cases, agents will correspond 1-to-1 with each character in your game. If you're building an RPG-style game, agents might be the various factions within a city/town.
Stats are numerical values associated with agents that might represent personality facets or other characteristics that influence or are influenced by their relationships with others. For example, an agent representing a single character might have stats for sociability, compassion, and confidence.
You might realize that there are different types of stats based on the type of object you want to represent as an agent. The socially relevant stats of an individual character might include things like, while the stats for an agent representing a prominent family might include political influence, money, and land. For this, TDRS recommends that users define various agent schemas to configure what stats an agent should have, given its type.
Traits attached to relationships can represent personality traits (courageous, knowledgeable, timid), emotional states (angry, in-love, afraid). Traits make it easy to filter for certain agents 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 agents, be sure to set the traitType
field to agent
.
Agent schemas allow users to specify different initial configurations of agents based on their agent type. Together, they work with relationship schemas to enable users to create more nuanced relationship networks. When an agent is created using SocialEngine.AddAgent(agentType, agentID)
, TDRS looks for an agent schema for the given agent type. So, schemas are required to create agents. Schemas have the following fields:
-
AgentType
: (required) The name associated with this schema (used when adding an agent). -
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.
-