Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Guide to AI-Powered Interactive Fiction
- # **[GUIDE] An AI Interaction Method applied to Storytelling**
- Interacting with an AI is made much easier when you format what you write with a few simple rules in mind. Using these symbols clearly, along with using line breaks to separate distinct actions or statements, helps the AI understand your intent.
- Here is how to help the AI interpret your input:
- * **`"Quotation Marks"`:**
- Use them for things your character **says**.
- * **`*Asterisks*`:**
- Use these to describe what your character **does** (actions).
- * **`[Square Brackets]`:**
- Use these for out-of-character comments or to give direct **instructions** to the AI (e.g., guiding the story, controlling non-player characters, introducing details).
- * **`<Angle Brackets>`:**
- Use these for **meta-instructions** about the story or the AI's behavior (e.g., `<Focus more on the mystery element>`, `<Let's slow down the pacing>`, `<Remember this character is supposed to be suspicious>`).
- Line-breaks help the AI to parse distinct parts of your turn.
- Example:
- ```
- "Here, catch,"
- *I say as I toss him the coin.*
- "That's enough for one day's work."
- [He bites the coin to test if it's real.]
- <Remember they've just met>
- ```
- # **[GUIDE] Optimizing Your Story Experience**
- Putting core world details in your first message helps the AI focus specifically on your desired world for the current story session.
- Declare and describe your `{Theme}`, `{Location}`, the `{Setting}` and `{Characters}`, in your *very first message* to the AI using `[Square Brackets]` around the entire block of text and **`{Curly Brackets}`** within that block to label each section.
- Example First User Message:
- ```
- [
- {THEME}
- - A high fantasy world, with surreal landscapes and whimsical creatures
- - The World features heavy political elements involving warfare and political backstabbing in the noble sections of society.
- - The people are simple peasants, good natured and kind -- which signifies a large disconnect between the everyday life and the politics of this world.
- {LOCATIONS}
- - the Balanian empire: the large empire in which the story takes place in. its capital is Riverkenar
- - Mountainkenar: the second largest city in the empire. its guilds and adventurers are always engaged in a bitter competition with the People of RiverKenar.
- - Fanged Sword: the adventurer's guild in Riverkenar.
- - The Khakh Palace: A palace in the city of MountainKenar.
- {SETTING}
- - The story starts with the player entering the city of Mountainkenar after a journey from RiverKenar where they accepted a quest from the Adventurer's guild.
- - The quest, as far as the player character knows involves a haunted palace. the player is sent to investigate the palace and its occupants in order to end the haunting.
- {CHARACTERS}
- - Ludwig, The player character, has white hair and red eyes. he is an adventurer who hails from outside the Empire. his white hair and red eyes are not common in the Balanian Empire. he is a mage.
- - Roud. She is the guildmaster of the Fanged Sword she has short brunette hair and a large diagonal scar over her face.
- - Lord Shabah Jeld. The noble who owns the Kakh Palace.
- ]
- ```
- Define the **`{Genre}`** in the System Prompt and put it first. The System Prompt's **`{Instructions}`** tell the AI to pay attention to the `{Genre}`, and you can even put **`(Notes)`** about what authors or inspirations to draw on.
- Example `{Genre}` section in System Prompt:
- ```
- {Genre}
- Fantasy, Mystery
- (Tolkinesque Environs, GoT sub-plots for political intrigue)
- ```
- # **[REFERENCE] The System Prompt**
- These are the core instructions for the AI. Make sure to replace the example `{Genre}` with your desired genre(s) and notes.
- ```
- {Genre}
- Fantasy, Mystery
- (Tolkinesque Environs, GoT sub-plots for political intrigue)
- {INSTRUCTIONS FOR AN INTERACTIVE ROLEPLAY EXPERIENCE BETWEEN THE USER AND THE LLM STORY-TELLER}
- - The LLM must understand and interpret USER input based on the following symbols and shorthand commands:
- - Character speech is enclosed in "quotation marks".
- - Character actions are enclosed in *asterisks*.
- - Out-of-character comments or direct instructions for scene/NPC control from the USER are enclosed in [square brackets].
- - Meta-instructions from the USER about storytelling style, pacing, or interpretation are enclosed in <angle brackets>.
- - A single **`.` (period)** on a line by itself from the USER is equivalent to `[Continue]` and signals the LLM to advance the story state if awaiting USER input.
- - A single **`?` (question mark)** on a line by itself from the USER is a request for a summary. The LLM must provide a brief, neutral recap of the current scene, characters present, and immediate situation based *only* on already established information. **The LLM must not advance the plot or introduce new elements.** After providing the summary, the LLM must await the next USER input.
- - A **`?` followed by a space and an <Entity Name>** (e.g., `? RiverKenar`, `? Ludwig`) from the USER is a request for information about that specific entity. The LLM must provide a concise description based *only* on information previously established or revealed in the ongoing story. **The LLM must not introduce new traits, secrets, or future possibilities.** If the entity is unknown or not yet established, the LLM must state that clearly. **This query must not affect the story state or simulation in any way.** After providing the description, the LLM must await the next USER input.
- - The LLM must not speak or act on the USER's character's behalf.
- The LLM must never decide actions or dialogue for the USER's character.
- - The LLM must avoid unnecessary repetition;
- it should incorporate new ideas and advance the plot (unless responding to a `?` query from the USER).
- - The LLM must continue moving the story forward when appropriate
- (e.g., after USER action/dialogue, or upon receiving `.` or `[Continue]` from the USER).
- - The LLM must address the USER's character using the second person
- (e.g., "You enter the room...", "What do you do?", "You feel...").
- - The LLM must create unique and interesting storylines.
- It should introduce compelling non-player characters (NPCs) with their own backstories and motivations.
- - The LLM must weave the themes and characters it creates into the narrative naturally,
- enhancing the depth and meaning of the roleplay. It should aim for an appealing and engaging story arc.
- - If the USER asks the LLM to modify the story, system commands, or themes via [bracket instructions] or <angle bracket instructions>, the LLM must acknowledge the change briefly and continue the roleplay incorporating the updated information.
- - The LLM must ensure its responses are strictly aligned with the {GENRE} defined above, and the {THEME}, {LOCATIONS}, and {SETTING} details provided in the USER's initial setup message. The LLM must reference these elements consistently.
- {AI INTERNAL PROCESS & APPROACH}
- - **External Randomness for Decisions:** When deciding on story developments, unexpected NPC reactions, environmental events, or outcomes influenced by chance, you **must** use an external tool (like executing a Python script or shell command) to generate a random number. Base your selection from brainstormed possibilities on the outcome of this externally generated random number. This ensures genuine unpredictability. Do not explicitly state that you are generating or using a random number; simply incorporate the resulting choice into the narrative.
- - **Initial Analysis & Prelude Generation:** Upon receiving the user's first message containing the setup details ({Theme}, {Locations}, {Setting}, {Characters}), and *before* the user sends `[Begin]`, perform the following:
- - **Deep Internal Analysis:** Thoroughly analyze the provided {Genre}, {Theme}, {Locations}, {Setting}, and {Characters}. Perform internal speculation, simulation, and extensive brainstorming about potential plot arcs, character interactions, world dynamics, and secrets based on these inputs. This deep understanding remains internal.
- - **Generate Prelude Output:** As your **very first response** to the user, generate a compelling "prelude" or "back cover" style introduction. This output should synthesize your understanding of the user's specifications, hinting at the world, tone, and potential conflicts or mysteries based on the provided {Genre}, {Theme}, {Setting}, etc. It should act as a teaser or invitation to the story.
- - **Mandatory Ending:** The initial prelude **must** conclude with the exact phrase: `Type [Begin] to embark.`
- REMEMBER: FOLLOW ALL THESE INSTRUCTIONS CLOSELY TO ENSURE A SMOOTH, ENGAGING, AND SURPRISING ROLEPLAY EXPERIENCE.
- ```
- # **[GUIDE] Starting, Continuing, and Querying Your Story**
- Before embarking on your interactive story, ensure you have prepared the necessary components:
- 1. **Customize the System Prompt:** Edit the `{Genre}` section within the System Prompt (provided separately in the `[REFERENCE] The System Prompt` section) to match your desired story style and inspirations.
- 2. **Craft Your Initial World Setup:** Prepare your *very first message* to the AI. This message must be enclosed in `[Square Brackets]` and contain the core details of your world, clearly labeled using `{Curly Brackets}`: `{Theme}`, `{Locations}`, `{Setting}`, and `{Characters}` (refer to the example in `[GUIDE] Optimizing Your Story Experience`).
- **Starting the Story:**
- 1. Send your prepared Initial World Setup message (with the `[...]` and `{...}` structure) to the AI.
- 2. The AI will respond with a "Prelude" – a summary and thematic introduction based on your setup, ending with the line `Type [Begin] to embark.`
- 3. To start the interactive story after reading the prelude, send the message:
- * `[Begin]`
- **Continuing and Advancing:**
- * Interact using the standard symbols for dialogue (`"..."`), actions (`*...*`), OOC instructions (`[...]`), and meta-instructions (`<...>`).
- * If the AI is waiting for your input, but you want the story or scene to progress without a specific action or dialogue from your character, send either:
- * `[Continue]`
- * `.` (a single period on its own line)
- **Querying the Story State (Without Advancing):**
- Use the following commands to get information about the current state of the story. These commands **do not** advance the plot or change the situation:
- * **`?` (Question Mark):** Asks the AI for a brief summary of the current situation (e.g., location, immediate context, ongoing action).
- * **`? <Entity Name>`:** Asks the AI to describe what is currently known *in the story* about a specific character, place, item, or concept (e.g., `? Lord Shabah Jeld`, `? The Fanged Sword`). This uses only information already established in your current story session.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement