Revealing Emotions with Mannerisms
In the previous prototype, the senses and actions of the animats are degraded according to the emotional status. However, the emotions are often portrayed in a more explicit fashion, using quasi-subconscious behaviors (known as mannerisms). For example, a nonplayer character (NPC) may jump from surprise, insult the enemy with words and gestures, wave to a partner, or perform a celebratory dance.
In this system shown in Figure 42.4, the mannerisms are triggered by emotions. When an emotional state has a fuzzy value above a certain threshold, a nested FSA is called. This component is responsible for deciding which mannerism to execute—if any.
Figure 42.4. Primary emotions are potentially associated with a probabilistic FSA (PFSA) for selecting mannerisms.
The nested FSA is probabilistic. It provides diversity in the selection of mannerisms and enables the designer to control how often the behaviors execute (on average). The transitions are based on feelings (for instance, only insult an enemy who's hated) and recent events (for instance, wave if a teammate appears).