Quoted Commands in Interactive Fiction: Is the Player Acting or Quoting?
Determine what the whole input is doing before deciding whether an action inside a quotation has been requested. Fill out a quoted-input decision card using the same command, “close the window,” to distinguish direct action, character speech, reported material, and questions about commands—and preserve quotation boundaries even when quotation marks are missing.

Introduction
When an input contains quotation marks, examine the outer intent before the quoted content. Is the player requesting an action, making their character speak, reporting written material, or asking about a command? Only after identifying an action request should you check its execution conditions. The mere appearance of “close the window” in a sentence does not authorize the story to change the window’s state.
Authors can turn this principle into a quoted-input decision card: record the outer intent, quoted content, what gets executed, what the response should address, and any clarification needed. The key is to separate “saying the words” from “performing the action described by the words,” and to keep responses that explain commands at the level of explanation.
1. Establish the Scene and Input Conventions
The following is an original, fictional teaching example. It is not a real user case or a test result, and it does not represent DramaFork product features. Imagine that the player’s character is standing beside an open window. Their companion Ahe is present, and a note reading “close the window” is already on the table. The window is within reach, with nothing obstructing it.
For this example, a standalone action phrase means that the player’s character attempts the action; “I say…” means character speech; “The note says…” reports written material; and questions about a command’s meaning receive an explanation of the input rules. Whether time advances is a separate author-defined rule. In this example, explanations and clarification do not advance story time.
Actual inputs appear in code formatting below. Thus, close the window contains no quotation marks, while “close the window” includes an actual pair. Quotation marks added by the article to introduce a phrase must not be confused with characters the player actually enters.
There is one more premise: the note’s contents have already been established in the scene. If only an unread piece of paper has appeared so far, a player entering “The note says ‘close the window’” does not establish that those words are on it. First determine whether the player is examining the note or proposing a guess. Quotation boundaries do not grant the player authority to invent facts about the world.
2. Fill Out the Card Using the Same Command
The “What gets executed” column must specify what is performed, rather than simply saying “yes” or “no.” Speaking is an action too, but it establishes different facts from closing a window.
| Actual input | Outer intent | Quoted content | What gets executed | What the response addresses | Clarification needed |
|---|---|---|---|---|---|
close the window |
Request to act directly | None | Close the window after checking conditions | The player’s character and the window | None in this scene |
I say ‘close the window’ |
Character speech | The line to be spoken | Speak the words; do not directly close the window | The act of speaking and the listener | Ask if the listener is unclear and their identity affects the result |
The note says ‘close the window’ |
Report written material | The note’s established text | Do not close the window | The note’s contents | None in this scene |
What does ‘close the window’ mean? |
Ask what a command means | The command under discussion | Explain only; do not execute | The input rules | None in this scene |
Write out a response for each entry to see whether the classification is reflected in the narrative.
Input close the window: respond, “You step up to the window and close it.” The request is clear, and this example’s execution conditions are satisfied, so the window changes from open to closed.
Input I say ‘close the window’: respond, “You say, ‘Close the window.’ Ahe hears you. The window remains open.” This confirms only that the words were spoken. Any subsequent decision about whether Ahe complies must follow established conditions, such as whether the words were addressed to him and whether he is willing to act.
Input The note says ‘close the window’: respond, “The words on the note are ‘close the window.’” This confirms known material. It means neither that the player complies nor that the note has the authority to command a character.
Input What does ‘close the window’ mean?: respond, “Under this example’s conventions, entering close the window on its own asks your character to attempt to close the window. You are currently asking what it means; you have not acted.” This explains the input’s grammatical meaning. It should not also deliver the result of closing the window.
Work through all four rows separately from the same initial scene. Do not carry the closed window from the first row into the second, or the comparison will be affected by the previous run.
3. Use the Outer Expression to Determine Who Does What
A consistent processing order is: identify the outer predicate, mark the content it governs, determine the speaker, actor, and focus of the response, then decide which changes are justified. Do not first search the entire input for “close the window” and then try to use quotation marks to undo an action that should never have been executed.
In I say to Ahe, ‘close the window’, the outer action is “say”; Ahe interprets the instruction inside the line. The input expresses the player’s character making a request of someone else. It does not express the player personally reaching out to close the window. Ahe may comply, refuse, or ask why, depending on the author’s established character and scene rules.
If the rules allow companions to respond immediately, a single response can contain two events: “You ask Ahe to close the window. He nods, walks over, and closes it.” But the second sentence must follow from a decision about the companion’s behavior. A verb appearing inside a quotation is not enough to justify it.
Now consider I do what the note says: ‘close the window’. Here the outer expression “I do what the note says” explicitly adopts the quoted action, so the quotation can supply the content of an action request. Quotation marks are therefore not a switch that always prevents execution; the basis for execution comes from the outer request. Even once an action has been identified as requested, you must still check whether the window is within reach and whether it is already closed.
4. Preserve Reported Speech Even Without Quotation Marks
A player might enter he said close the window. Despite the lack of punctuation, “he said” still indicates that the following words are reported speech. At the very least, the input cannot be interpreted directly as the player closing the window. If the identity of “he” affects the story, ask, “Who does ‘he’ refer to here?” If the player is merely recalling established dialogue, there is no need to interrupt them just to complete the formatting.
he said close the window and then leave is harder: is the speaker leaving, or is leaving something he asks someone else to do? Preserve the reported speech that is already clear, then ask, “Is ‘and then leave’ also part of what he said, or are you describing him leaving afterward?” Do not send anyone out of the room first.
An input consisting only of “close the window” also lacks a sufficiently explicit outer expression. An author can establish in advance that standalone quotations count as dialogue, or ask the player to clarify their intent. This example uses a question: “Do you want to close the window yourself, say these words, or ask what they mean?” The window stays as it is until the intent is confirmed.
This adds an interaction in exchange for clarity about who performs the action. If the context is already “What are you going to say?”, a standalone quotation can be treated as dialogue without asking again. The context must be specific enough to resolve the ambiguity. The fact that the current task requires closing a window is not enough to decide for the player.
5. Turn the Card into Input Rules You Can Review
To reuse the card, replace “close the window” with the target action, then add two records to each row: facts that should be added and facts that must remain unchanged. For example, the speech row adds “the character has said these words” while preserving “the player has not personally closed the window.” The question row provides only an explanation and does not record a completed action.
Three mistakes are particularly easy to miss: stripping quotation marks and executing the content directly, losing the quotation boundary; treating every quotation as invalid input, rejecting ordinary dialogue; and saying “this is only an explanation” while the stored state already marks the window as closed. Review both the written response and the state changes, rather than checking only whether the wording sounds cautious.
This card is useful for constraining a text-command interface. It does not guarantee coverage of irony, complex nested quotations, or omitted information in conversations involving multiple speakers. In those cases, clarify only the parts that would change who performs the action. Nor does the card determine how far a sequence of actions gets or resolve disputes about character authority. It addresses an earlier question: does this text actually request that action?






