Execute_AddTrait
Description
Grants an Aptitude-category trait to the BaseObject entity (e.g. from consuming an item such as a CatDonut). Only traits whose Trait.json Category is EB1TraitCategoryType::Aptitude are allowed; a Nature, Characteristic, Ambition, or HopeLife trait is rejected with a warning and skipped so that designers cannot accidentally grant a non-Aptitude trait through a script. The grant is idempotent (FB2TraitComponent::AddTrait no-ops when the trait is already owned) and fires the acquisition notification (activity feed / overhead alert) for the playing household/character.
Note
This command only registers trait ownership. The trait's own effects (modifiers, buffs, etc.) are applied by the trait's AddTraitScriptId, not by this command.
Parameters
| Params | Description |
|---|---|
| BaseObject | Target entity that will receive the trait (Self or Target) |
| Command | AddTrait |
| S1 | Trait ID to grant (Trait.json Id); must be Category == Aptitude |
Examples
| Example | BaseObject | Command | CompareType | S1 | S2 | F1 | F2 | Prob |
|---|---|---|---|---|---|---|---|---|
| Grant the CatDonut aptitude trait to Self | Self | AddTrait | Aptitude_CatDonut |