Multiple Traits: Difference between revisions

From Citizens Wiki

(Created page with "All Citizens 2.0 behavior is dictated by Traits. Traits can be applied to the NPCs and will handle events and interaction in specific ways. Characters are really just co...")
 
No edit summary
 
Line 3: Line 3:
Traits can be applied to the NPCs and will handle events and interaction in specific ways.
Traits can be applied to the NPCs and will handle events and interaction in specific ways.


[[Characters]] are really just complicated Traits.
The cool thing is a NPC can have multiple traits assigned to it. Including multiple [[Characters|Character]] Traits.


The cool thing is a NPC can have multiple traits assigned to it. Including multiple [[Character]] Traits.
An example is the [[Wallet]] Trait. This trait allows the NPC to have and use economy money. This Trait is useless by itself but works when the NPC is also assigned the [[Denizen]] or [[Trader]] trait.


An example is the [[Wallet]] Trait. This trait allows the NPC to have and use economy money. This Trait is useless by itself but works when the NPC is also assigned the [[Denizen]] or [[Trader]] trait.
[[Characters]] are really just complicated Traits.


Assigning multiple [[Characters]] traits can lead to powerful results, but also potential conflicts.  
Assigning multiple [[Characters]] traits can lead to powerful results, but also potential conflicts.  
Line 14: Line 14:


For example if you want to make a [[Blacksmith]] that wanders throughout the town using Denizen [[Activities]] to dictate his movement, you would want to turn off [[Click Triggers]] in the [[Denizen]] Trait so that right-clicking the [[Blacksmith]] would perform the proper [[Blacksmith]] commands and not trigger any [[Denizen]] scripts.
For example if you want to make a [[Blacksmith]] that wanders throughout the town using Denizen [[Activities]] to dictate his movement, you would want to turn off [[Click Triggers]] in the [[Denizen]] Trait so that right-clicking the [[Blacksmith]] would perform the proper [[Blacksmith]] commands and not trigger any [[Denizen]] scripts.
Using the command
:'''/trait [traitname]
Will toggle the trait on and off for the selected NPC.

Latest revision as of 22:37, 8 August 2012

All Citizens 2.0 behavior is dictated by Traits.

Traits can be applied to the NPCs and will handle events and interaction in specific ways.

The cool thing is a NPC can have multiple traits assigned to it. Including multiple Character Traits.

An example is the Wallet Trait. This trait allows the NPC to have and use economy money. This Trait is useless by itself but works when the NPC is also assigned the Denizen or Trader trait.

Characters are really just complicated Traits.

Assigning multiple Characters traits can lead to powerful results, but also potential conflicts.

NPCs with the Denizen trait should use the commands for that trait to turn on and off specific interactions that may cause conflict.

For example if you want to make a Blacksmith that wanders throughout the town using Denizen Activities to dictate his movement, you would want to turn off Click Triggers in the Denizen Trait so that right-clicking the Blacksmith would perform the proper Blacksmith commands and not trigger any Denizen scripts.


Using the command

/trait [traitname]

Will toggle the trait on and off for the selected NPC.