Glass — 5 of 25

Emily Short

Release 3

Section 3 - Non-player Goal-seeking

[And here we provide the non-player characters with the instructions for how to make conversational "moves".]

[At different scenes of the game, we will be using different conversation sets, so we need to account for this as well:]

Conversation set is a table-name that varies. The conversation set is Table of Prologue Remarks.

Definition: a subject is fruitful if it produces conversation.

[This rather bare-looking routine runs through the current conversation table and checks to see whether a given subject would be interested if someone selected it.]

To decide whether (next subject - a subject) produces conversation:

repeat through conversation set

begin;

if the starting entry is current subject or starting entry is blank

begin;

if the final entry is next subject or final entry is blank, yes;

end if;

end repeat;

no.

[And here we look through the conversation set to see if we can find some appropriate conversation for the change of subject that just occurred, and (if so) print the dialogue.]

To relate (initial subject - a subject) with (next subject - a subject), directly or pausing first:

repeat through conversation set

begin;

if the starting entry is initial subject or starting entry is blank

begin;

if the final entry is next subject or final entry is blank

begin;

if pausing first, say "There is a long thoughtful silence. ";

say "[comment entry][paragraph break]";

blank out the whole row;

rule succeeds;

end if;

end if;

end repeat.

A person can be active or passive. [1]

Every turn when the old lady is active:

if Theodora Endgame is happening, rule succeeds;

if Lucinda Endgame is happening, rule succeeds;

let pause be "blank";

let segue be the next step via the suggestion relation from the current subject to the target subject;

if segue is a subject

begin;

while segue is not the target subject and segue is not fruitful

begin;

let segue be the next step via the suggestion relation from the segue to the target subject;

let pause be "There's a long, thoughtful sort of pause. ";

end while;

if pause is not "blank",

relate the current subject with the segue, pausing first;

otherwise relate the current subject with the segue, directly;

now last subject is current subject;

now current subject is segue;

otherwise;

now the current subject is last subject;

if Fitting has happened

begin;

make no decision;

end if;

say "There's an uncomfortable silence as everyone tries to think of a sensible direction for the conversation to take from here.

'Mm, we were speaking of [current subject],' says [a random visible person who is not the player].";

end if.

Every turn: now the old lady is active. [2]

Notes

[1]. This is just a marker to keep track of whether the old lady (or any of the others) have already spoken during a turn; if so, we don't want them moving the dialogue on their own. One of my discoveries in previous conversation games is that it is usually best to limit non-player characters to one piece of dialogue behavior per turn -- either responding to something the player said OR advancing an idea of their own. If one allows them to do both, the conversation is controlled primarily by the game rather than the player, and many players find this frustrating.

[2]. This rule reactivates the old lady each turn, but after the spontaneous speaking rule above has already been tried.