The pieces
A case that can be solved
The model is good at playing a part and bad at keeping a plot consistent across six people. So the plot is not left to it: the game makes the case first, as data, and each suspect is told their part of it.case.next_step(known, tied, met) says what to do next from what the player has found and tied.
One agent, every suspect
When the detective questions somebody, the conversation of the last one ends and a new one starts with this guest’s mind:add_action and set_persona. Before that, a persona with a list of actions in it is one the model may read aloud.
- The murderer is told never to confess, whatever they are shown. The liar is told to hold on until shown proof, and then to confess in the words of the confession card, so what they say matches what goes on the board.
tellis how the game knows what was said. What it is given is still checked: a card goes up when the topic was asked and the answer came, bytellor by the words of the question.- The faces and gestures in
actare not tag words (happy is a face;[happy]is a tag), and the tags the voice performs are listed separately, with where they go.
Questions as voice
Every question is spoken: the microphone is always open, and there are no question buttons. A speech bubble beside the suspect suggests what to ask (where they were, what they saw, what is on their clothes, their grudge, and to press them if they wriggle), ticks what has been asked, and says under it whether the suspect is listening, from the agent’s state. The words of what the player says (player_said) tell the game which of those was asked.
The one thing that is not said by the player is showing a proof, and it does not send text either. A LokutorVoice with the detective’s voice says it, and its sound goes into the suspect’s ears (the self-playing demo asks its questions the same way):
Showing the proof
When a lie is tied to its proof on the board, the lounge’s only button appears: Show the proof. It puts the proof in front of the suspect as a fact of the moment, and asks:Nerves
Every suspect has a number, and everything the detective does raises it: a question by one, a hard one (“Tell me the truth!”) by two, a proof by three. When it crosses a threshold the suspect is told how they feel now, as another fact of the moment:Tags: feelings often, sounds seldom
Every voice in the game performs expression tags: they are what makes a suspect sound caught out. The prompt asks for a feeling at the start of most sentences, and a sound ([laugh], [sigh]) at most once in an answer, only where it fits: a sound on every sentence comes out as throat-clearing, and [breath] is left out. Each suspect has favourites of their own:
[laugh]. Constable Dumpling’s written lines carry them too ([surprised] Now that doesn't add up!). The detective’s questions get feelings only: a [laugh] in the question’s sound would go into the suspect’s ears as well. Captions show none of them: Lokutor.strip_tags(line).
The helper has written lines
Constable Dumpling introduces each guest, reacts to every string tied on the board (Now that doesn’t add up!), and gives hints, computed by the game from what is known and tied. None of it is improvised: aLokutorVoice says exact lines, and the hint costs twenty minutes of the night.
Sound and settings
Every voice in the game, the agent and bothLokutorVoices, plays on its own audio bus (voice_bus = &"Voices"), next to Music and Effects, so the options menu has a slider for each. While a suspect speaks, the agent’s state ducks the music and the effects under them. The language, one of Lokutor’s nine, is picked on the title or in the options; it changes the words on screen, Constable Dumpling’s lines, the detective’s questions and the language the suspects are told to speak. English and Spanish are written into the game; each other language is one file of data, merged into the same tables when the game loads, with its own grammar hooks (contractions, a word for a man or a woman, German and Basque case endings). Their prompts stay in English with an order to speak the language, and what they must say word for word in it.
Testing it
game/demo_plan.gd writes, from a seed, the steps that solve that case, and what each suspect answers to each question: a script for the development server, with one session per conversation, chosen by the words the prompt begins with. game/demo.gd plays the steps with a pretend pointer: rooms, magnifying glasses, question buttons, pins. Against the development server it is the same every time, and can be recorded; against the API, the real suspects answer, which tests the prompts with no hands.