Traits

A **trait** (TDESC: Trait) is a defining characteristic of a Sim. Traits affect a Sim's behavior, either by adding new interactions for them or by modifying the way they behave. Traits come in different varieties; some are visible and chosen by the player; other are awarded for accomplishing certain aspirations; and some are hidden and assigned by the game.

## Usage

Traits are not only used to define the Sim (i.e. Personality Traits), they can come as such as Reward Traits, Traits that define the Sim's Handiness, etc.

## Coding

A trait can be tuned to meet a different criteria, such as a Personality Trait, a Hidden Trait, etc.

### Interactions

Interactions can be added onto traits for a Sim to do certain actions. Depending on how the modder tunes the trait, each Interaction can be a Mixer Interaction, Super Interaction (Or its SubClass or Variants) and it can be towards a Target or towards the Actor.

### Buffs

Buffs can be hooked alongside a Trait to make the Buff co-exist along with the trait until the trait is removed, this is called as a TraitBuff(s). A TraitBuff is commonly used in many areas as Buffs can affect the Sim in ways such as changing the decay rate of a Statistic or Commodity or even equipping a Clothing for the period of when the buff is active.

For a full list of what a Buff can do, refer to Buff.

Inside a Trait, there are three ways a Buff can be hooked onto a Trait:

* Buffs Tunable
* Day Night Tracking
* Proximity Buffs *(Requires further expansion)*.

#### Day Night Tracking

Day Night Tracking allows for buffs to be active based on the environment of where the Sim is in.

A buff in this region can be equipped based on these groupings:

* Day Buffs
* Night Buffs
* Shade Buffs
* Sunlight Buffs

For example: If the environment is currently Day, then the Sim would acquire buffs from Day Buffs. When it is Night Time, the Sim will lose those Buffs.

This can be useful if a modder wants to have a buff that should only happen based on the environment. This is way more feasible than doing a TestSet thats continually test each Sim hour and Sim minute.

### All Tunables

Traits have a lot of tunables, some of which can limit on who can acquire the buff, etc.

* **Actor Mixers**: Mixers this adds to an associated actor object. (When targeting something else.) (TDESC: Description Typo, interpret this as that)
* **Ages**: The allowed ages for this trait. If no ages are specified, then all ages are considered valid. (TDESC) **(SimData Inclusive)**
* **Allow From Gallery**: If checked, then this trait is allowed to be transferred over from Sims downloaded from the gallery. (TDESC)
* **Always Send Test Event On Add**: If checked, will send out a test event when added to a trait tracker even if the receiving sim is hidden or not instanced. (TDESC)
* **Buff Replacements**: A mapping of buff replacement. If Sim has this trait on, whenever he get the buff tuned in the key of the mapping, it will get replaced by the value of the mapping. (TDESC)
* **Buffs**: Buffs that should be added to the Sim whenever this trait is equipped. (TDESC)
* **Buffs Add On Spawn Only**: If unchecked, buffs are added to the Sim as soon as this trait is added. If checked, buffs will be added only when the Sim is instantiated and removed when the Sim uninstantiates. General guidelines: If the buffs only matter to Sims, for example buffs that alter autonomy behavior or walkstyle, this should be checked. (TDESC)
* **Build Buy Purchase Tracking**: If enabled, allows this trait to track various build-buy purchases via event listening in the trait tracker. (TDESC) (Note: It seems that this is used mainly for Laundry if a Laundry Object exists or not then it will either spawn or not spawn the clothing piles after an outfit change. For Rebate Day look at SituationGoalPurchasedObject.)
* **Can Die**: When set, Sims with this trait are allowed to die. When unset, Sims are prevented from dying. (TDESC) (Note: This is used in the Grim Reaper NPC, as Grim is not supposed to die from normal means.)
* **CAS Idle ASM Key** **(SimData Inclusive)**
* **CAS Idle ASM State** **(SimData Inclusive)**
* **CAS Selected Icon** **(SimData Inclusive)**
* **CAS Trait ASM Param** **(SimData Inclusive)**
* **Conflicting Traits**: Conflicting traits for this trait. If the Sim has any of the specified traits, then they are not allowed to be equipped with this one. e.g. Family Oriented conflicts with Hates Children, and vice-versa. (TDESC) **(SimData Inclusive)**
* **Culling Behavior**: The culling behavior of a Sim with this trait. (TDESC)
* **Disable Aging**: If enabled, aging out of specific ages can be disabled. (TDESC) (Note: This is used in the Grim Reaper NPC and the Immortality Trait.)
* **Display Name**: The trait's display name. This string is provided with the owning Sim as its only token. (TDESC) **(SimData Inclusive)**
* **Display Name Gender Neutral**: The trait's gender-neutral display name. This string is not provided any tokens, and thus can't rely on context to properly form masculine and feminine forms. (TDESC)
* **Event Test Based Loots**: A list of tests that are connected to events and loots to play when those tests pass. These will only be tested for non-NPC Sims. (TDESC)
* **Exclude VFX Mask**: If enabled, when this trait is added to a Sim, the mask will be applied, making VFX invisible that are also tagged with this flag. (TDESC)
* **Excluded Mood Types**: List of moods that are prevented by having this trait. (TDESC)
* **Genders**: The allowed genders for this trait. If no genders are specified, then all genders are considered valid. (TDESC) **(SimData Inclusive)**
* **Hide Relationships**: If checked, then any relationships with a Sim who has this trait will not be displayed in the UI. This is done by keeping the relationship from having any tracks to actually track which keeps it out of the UI. (TDESC)
* **Icon**: The trait's icon. (TDESC) **(SimData Inclusive)**
* **Initial Commodities**: A list of commodities that will be added to a sim on load, if the sim has this trait. If a given commodity is also blacklisted by another trait that the sim also has, it will NOT be added. Example: Adult Age Trait adds Hunger. Vampire Trait blacklists Hunger. Hunger will not be added. (TDESC) (Note: This is mainly used in the Vampire, Servo and PlantSim Occults. As they have their own Commodities, they need to be listed here to be loaded. (The 6 Main Commodities should not be present here.))
* **Initial Commodities Blacklist**: A list of commodities that will be prevented from being added to a sim that has this trait. This always takes priority over any commodities listed in any trait's initial\_commodities. Example: Adult Age Trait adds Hunger. Vampire Trait blacklists Hunger. Hunger will not be added. (TDESC) (Note: This is mainly used in the Vampire, Servo and PlantSim Occults.)
* **Interactions (Mixer)**: Mixer interactions that are available to Sims equipped with this trait. (TDESC)
* **Is NPC Only**: If checked, this trait will get removed from Sims that have a home when the zone is loaded or whenever they switch to a household that has a home zone. (TDESC)
* **Listen Animation Overrides**: If enabled, this tunable will provide listen animation overrides for this trait. (TDESC)
* **Loot On Trait Add**: If tuned, this list of loots will be applied when trait is added in game. (TDESC) (Note: For removals when trait is removal, use a Buff that is hooked onto a Trait.)
* **Min LOD Value**: The minimum Sim info LOD necessary for this information to persist on the sim info. e.g. A statistic tuned to FULL will not persist on sims that lower than FULL. LOD order, high to low, is FULL, INTERACTED, BASE, BACKGROUND, MINIMUM. (TDESC)
* **NPC Leave Lot Interactions**: If enabled, allows tuning a set of Leave Lot and Leave Lot Must Run interactions that this trait provides. NPC Sims with this trait will use these interactions to leave the lot instead of the defaults. (TDESC)
* **Outfit Replacements**: A mapping of outfit replacements. If the Sim has this trait, outfit change requests are intercepted to produce the tuned result. If multiple traits with outfit replacements exist, the behavior is undefined. Tuning 'Invalid' as a key acts as a fallback and applies to all reasons. Tuning 'Invalid' as a value keeps a Sim in their current outfit. (TDESC)
* **Persistable**: If checked then this trait will be saved onto the sim. If unchecked then the trait will not be saved. Example unchecking: Traits that are applied for the sim being in the region.
* **Pie Menu Icon**: The trait's pie menu icon. (TDESC) (*Confirmation needed on tunable purpose*)
* **Plumbbob Override**: If enabled, allows a new plumbbob model to be used when a Sim has this occult type. (TDESC) (Note: Besides overridding to a new model based on the Occult, Club Leader Plumbbob needs to be overridden to fit with the Occult Plumbbob Model.)
* **Provided Mixers**: Mixers this adds to an associated target object. (TDESC: Description Typo, interpret this as that.)
* **Reactionlet Overrides**: If enabled, this tunable will provide reactionlet overrides for this trait . (TDESC)
* **Remove On Death**: If checked, when a Sim dies this trait will be removed. (TDESC)
* **Sim Info Fixup Actions**: A list of fixup actions which will be performed on a sim\_info with this trait when it is loaded. (TDESC)
* **Species**: The allowed species for this trait. If not species are specified, then all species are considered valid. (TDESC) **(SimData Inclusive)**
* **Super Affordances**: Super affordances this adds to the object. (TDESC)
* **Tags**: The associated categories of the trait. Need to distinguish among 'Personality Traits', 'Achievement Traits' and 'Walkstyle Traits'. (TDESC) **(SimData Inclusive)**
* **Target Super Affordances**: Super affordances this adds to the target. (TDESC)
* **Teleport Style Interaction To Inject**: When this trait is added to a Sim, if a teleport style interaction is specified, any time another interaction runs, we may run this teleport style interaction to shorten or replace the route to the target. (TDESC) (Note: For information on how to use this tunable, refer to Teleports.)
* **Trait ASM Overrides**: Tunables that will specify if a Trait will add any parameters to the Sim and how it will affect their boundary conditions. (TDESC)
* **Trait Description**: The trait's description. (TDESC) **(SimData Inclusive)**
* **Trait Origin Description**: A description of how the Sim obtained this trait. Can be overloaded for other uses in certain cases: - When the trait type is AGENT this string is the name of the agency's Trade type and will be provided with the owning sim as its token. - When the trait type is HIDDEN and the trait is used by the CAS STORIES flow, this can be used as a secondary description in the CAS Stories UI. If this trait is tagged as a CAREER CAS stories trait, this description will be used to explain which skills are also granted with this career. (TDESC) **(SimData Inclusive)**
* **Trait Type**: The type of the trait. (TDESC) (Note: Refer below for Trait Type Enums.) **(SimData Inclusive)**
* **UI Category**: If enabled then this trait will be displayed in a specific category within the relationship panel if this trait would be displayed within that panel. (TDESC) **(SimData Inclusive)**
* **UI Commodity Sort Override**: Optional list of commodities to override the default UI sort order. (TDESC)
* **VFX Mask**: If enabled when this trait is added the masks will be applied to the Sim affecting the visibility of specific VFX. Example: TRAIT\_CHILDREN will provide a mask MASK\_CHILDREN which the monster battle object will only display VFX for any Sim using that mask. (TDESC) (Note: This is rarely used, the easiest known instance is in the Magical Motes from GP08:RoM, well including the earlier example mentioned above.)
* **Voice Effect**: The voice effect of a Sim with this trait. This is prioritized against other traits with voice effects. The Sim may only have one voice effect at a time. (TDESC) (Note: This is used in Ghost and the Grim Reaper NPC.)
* **Whim Set**: If enabled then this trait will offer a whim set to the Sim when it is active. (TDESC)

### Trait Types

Below is a list of trait types.

```
PERSONALITY = 0

```

```
GAMEPLAY = 1

```

```
WALKSTYLE = 2

```

```
HIDDEN = 4

```

```
GHOST = 5

```

```
ASPIRATION = 6

```

```
TAILSTYLE = 7

```

```
GENDER_OPTIONS = 8

```

```
SIM_PHONE = 9

```

```
PHASE = 10

```

```
AGENT = 11

```

```
INFECTION = 12

```

```
CURSE = 13

```

```
ROOMMATE = 14

```

```
ROBOT_MODULE = 15

```

```
ROBOT = 16

```

```
PROFESSOR = 17

```

```
UNIVERSITY_DEGREE = 18

```

```
ROBOT_MODULE_LOCKED = 19

```

```
BATUU_ALIEN = 20

```

```
LIFESTYLE = 21

```

## Tutorials

### Scripting

* Automatically Assign Traits to Sims (Sims 4 Script Modding)