The use of narrative structures in learning environments for teaching computer programming is an acknowledgment of the storytelling importance in the classroom. Automatic generation of such narratives is one of the research themes of GEMS. This paper presents an adaptive specification of the mechanism that generates narratives considering only the characters emotional facet. The writing process the of specification included an emotional state machine ornated with adaptive methods. Such methods help to organize the behavioral specification of the state machine. The end result takes the form of an executable prototype which demonstrates the operation of the narratives generation mechanism.