> Are emotions part of the "main functionality"?
Emotions are the part of the core AI functionality.
But in order to correctly understand my answer you need to understand what I understand under emotions.
Emotion is kind of advanced reflex. Typically emotion consists of a group of reflexes working together. There could be many reflexes in a single emotion. That's why it's hard to predict emotion even if you know behavior of every reflex. The problem of prediction of emotional response is actually worse because usually observer doesn't know what reflexes affect emotional result).
In other hand, it is not that hard to calculate result of emotion inside of the AI system.
It just takes a bunch of straightforward calculations.
This calculations are really simple.
Let assume that reflex1 (softcoded routine) activates concept e1 if concept c1 is activated.
Let assume that reflexN activates concept eN if concept c1 is activated.
("c" states for "cause" and "e" stands for "effect").
Whole emotion would activate concepts e1 ... eN.
These concepts e1 ... eN represent the emotional response of AI.