Conversation Nodes
version 6 by Eric Eve
Chapter: Setting Up a Closed Node
Section: Overview - The Basic Minimum
While an open node is generally transient, a closed node generally persists until the player gives the current interlocutor an answer he or she is prepared to accept. Also, whereas an open node does not prevent the player from addressing the topics defined for the NPC outside the node (unless it defines one for the same topic), a closed node does. It's called a closed node because we can't reach outside it until we're allowed to leave.
For a closed node the minimum we must define is:
1. One or more response rules (or instead rules) corresponding to the responses the current interlocutor will accept. These responses must then take the player out of the node via "[node another-node]", "[leavenode]" or setnode another-node.
2. A default response rule for the node, that defines the current interlocutor's response when the player attempts a conversational command the current interlocutor rejects. Normally this should repeat the question the current interlocutor wants answered, together with some indications of what s/he's likely to accept as an answer.
We can also define specific responses for other topics the current interlocutor won't accept, and more specific types of default response (e.g. default give-show response), if we so wish. There are also a number of other things we can do to make the closed node behave in a more sophisticated way. We'll look at those below.
So, the basic minimum for a closed node would be something like the following:
sarah-jealous-node is a closed convnode.
response for sarah-jealous-node when saying yes:
say "[leavenode]'Yes, I am, but only for psychotherapy sessions, and the therapist is old enough to be my grandmother!' you reply."
response for sarah-jealous-node when saying no:
say "[leavenode]'No, of course not, you know you're the only woman in my life!' you protest."
default response for sarah-jealous-node:
say "'Don't try to change the subject!' she storms, 'I asked if you were seeing another woman. Well, are you? Yes or no!'"