-
Notifications
You must be signed in to change notification settings - Fork 0
Create Traits Using ScriptableObjects
Shi Johnson-Bey edited this page Feb 28, 2024
·
3 revisions
Users can create new traits using Unity ScriptableObjects. TDRS makes this easy, by providing an entry in the "create" menu.
- Right-click in the Project window and select
Create > TDRS > Trait
. - Name the trait whatever you wish
- Fill in the fields
- Add the trait to the
Traits
list on yourSocialEngineController
instance. - Now the trait is available to use in base configurations and social events.
Below are explanations of each of the fields:
-
Trait ID
: (Required) A unique identifier for this trait to differentiate it from other traits. By convention, the name should be all lowercase with underscores instead of spaces, and no punctuation. -
Trait Type
: Specifies if the trait is to used with agents or relationships. -
Display Name
: (Required) A regular text name to be displayed in GUIs. This can contain spaces, capitalization, and punctuation. -
Description
: A short text description provided to explain why the agent/relationship has the trait. You can use the[owner]
value in your description to have the owner of an agent trait's UID inserted into the description. If the trait is a relationship trait, the[target]
template value is also available. -
Modifiers
: A list of modifiers to apply to the agent/relationship the trait is attached to.-
Stat Name
: The name of the stat to apply the modifier to -
Value
: The value to apply to the stat -
Modifier Type
: How should the value be applied to the stat.-
FLAT
: Add the Value to the stats base value -
PERCENT_ADD
: Treat the Value as a percentage where (1.0 is 100%) and increase the base stat value by the sum of all calculated modifiers with typePERCENT_ADD
. See Stats for an example of how this is calculated. -
PERCENT_MULTIPLY
: Treat the Value as a percentage where (1.0 is 100%) and increase the base stat value by the given percentage. See Stats for an example of how this is calculated.
-
-
-
Conflicting Traits
: A list of Trait IDs of traits this trait cannot coexist with on the same agent/relationship.