Mood Variations

version 3 by Emily Short

  • Home page
  • Complete text



  • Version 3 of Mood Variations by Emily Short begins here.

    "Allows the author to define a mood value for characters and then use text substitutions such as '[when bored]The king fidgets on his throne[or sleepy]The king snores[at other times]The king grins[end when].' Moods will be interpreted in 'writing a paragraph' and similar contexts as the mood of the person described in the paragraph, but at other times according to the mood of the person to whom the player is currently speaking."

    Mood is a kind of value. A person has a mood called the current mood. A person has a mood called the previous mood.
        
    To say set (attitude - a mood):
        now the previous mood of the current interlocutor is the current mood of the current interlocutor;
        now the current mood of the current interlocutor is attitude.

    To set (attitude - a mood):
        now the previous mood of the current interlocutor is the current mood of the current interlocutor;
        now the current mood of the current interlocutor is attitude.
        
    Before reading a command (this is the mood record-keeping rule):
        repeat with target running through people:
            now the previous mood of the target is the current mood of the target.

    Include (-

    [ CurMood;
         if ( (+ item described +) && (+ item described +) has animate )
            return (+ current mood of the item described +);
        if ( (+ current interlocutor +) )
            return (+ current mood of the current interlocutor +);
        return 0;
    ];

    -)

        To say when (N - a mood) -- beginning say_by_mood:
            (-
                switch( curMood() )
                {-open-brace}
                {N}:
            -);
        
        To say or (N - a mood) -- continuing say_by_mood:
            (-
                {N}:
            -);
        
        To say at other times -- continuing say_by_mood:
            (-
                default:
            -)
        
        To say end when -- ending say_by_mood:
            (-
                {-close-brace}
            -)


    Mood Variations ends here.