""" Game configurations, states, and example configs """ # Default configuration template default_config = { 'background': '/AutoGameBackgrounds/1stGameLoc123.png', 'inventory': [], 'skills': [], 'objectives': [], 'targets': [], 'story': [], 'actions': {} } #-------------------------#-------------------------#-------------------------#------------------------- # List of player engagement UI elements player_engagement_items = [ "Health Bar", "Mana/Energy Bar", "Experience Bar", "Mini-Map", "Quest Tracker", "Inventory Quick Access Slots", "Skill Cooldown Indicators", "Currency Display", "Compass", "Timer/Clock", "Action Prompts", "Reticle/Crosshair", "Enemy Health Bars", "Score Display", "Inventory Grid", "Item Tooltip", "Item Categories/Tabs", "Equip/Unequip Buttons", "Item Sorting Options", "Character Stats Panel", "Character Model Viewer", "Quick Equip Slots", "Dialogue Box", "Dialogue Choices", "Character Portraits", "Character Name Display", "Subtitle Text", "World Map", "Local Map", "Fast Travel Points", "Map Markers", "Map Legend", "Crafting Recipe List", "Ingredient Slots", "Craft Button", "Crafting Progress Bar", "Skill Nodes", "Skill Descriptions", "Skill Point Counter", "Unlock Button", "Skill Path Highlight", "Quest List", "Quest Details Panel", "Quest Objectives", "Quest Rewards", "Quest Status Indicators", "Chat Box", "Player List", "Voice Chat Indicators", "Ping/Latency Indicator", "Party/Team UI", "Scoreboard", "Matchmaking Screen", "Pop-up Notifications", "Achievement Unlocks", "System Messages", "On-screen Key Prompts", "Environmental Interaction Icons", "Save/Auto-Save Indicators", "Credits Screen" ] # List of character-based story events story_events = [ 'exploreLocation', 'discoverClue', 'meetCharacter', 'solveRiddle', 'findItem', 'faceChallenge', 'makeDecision', 'engageBattle', 'unlockAbility', 'learnSecret', 'completeMission', 'experienceSetback', 'earnReward', 'uncoverMystery', 'formAlliance', 'faceBetrayal', 'confrontNemesis', 'makeDiscovery', 'overcomeLoss', 'achieveVictory' ] #-------------------------#-------------------------#-------------------------#------------------------- # Define the states all_states = { 'village': { 'start': { "description": "You wake up in a small village. You hear a rumor about a lost treasure.", "choices": ['explore village', 'gather supplies', 'rest'], "transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'}, "consequences": { 'gather supplies': lambda player: player.add_item('basic supplies') }, "media": [] }, 'rumor': { "description": "You hear more details about the treasure hidden in the ancient ruins nearby.", "choices": ['decide to go', 'ignore'], "transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'}, "consequences": { 'decide to go': lambda player: player.update_knowledge('treasure location') }, "media": [] }, 'supplies': { "description": "You gather supplies for your journey.", "choices": ['head to forest', 'stay in village'], "transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'}, "media": [] }, }, 'forest': { 'forest': { "description": "You enter the dense forest, heading towards the ruins.", "choices": ['travel further', 'return to village'], "transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'}, "media": [] }, }, 'ruins': { 'ruins': { "description": "You reach the ancient ruins. The entrance is dark and eerie.", "choices": ['enter ruins', 'return to forest'], "transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'}, "media": [] }, 'explore': { "description": "You explore the ruins, encountering traps and puzzles.", "choices": ['solve puzzle', 'avoid traps'], "transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'}, "media": [] }, 'hiddenPassage': { "description": "You solve a challenging puzzle and unlock a hidden passage.", "choices": ['enter passage', 'go back'], "transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'}, "media": [] }, 'treasureRoom': { "description": "You enter the treasure room and find the treasure chest.", "choices": ['take treasure', 'leave'], "transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'}, "consequences": { 'take treasure': lambda player: player.add_item('treasure') }, "media": [] }, 'celebrate': { "description": "You celebrate your discovery and decide to bring the treasure back to the village.", "choices": ['return to village'], "transitions": {'return to village': 'village_return_return'}, "media": [] }, }, 'village_return': { 'return': { "description": "You return to the village with the treasure and share it with the villagers.", "choices": ['end adventure'], "transitions": {'end adventure': 'end_end'}, "media": [] }, }, 'end': { 'end': { "description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.", "choices": [], "transitions": {}, "media": [] }, } } #-------------------------#-------------------------#-------------------------#------------------------- #actual is not screen ready originalconfigatbeinningofthisspace = """{ "village": { "start": { "description": "You wake up in a small village. You hear a rumor about a lost treasure.", "choices": ['explore village', 'gather supplies', 'rest'], "transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'}, "consequences": { 'gather supplies': lambda player: player.add_item('basic supplies') }, "media": [] }, "rumor": { "description": "You hear more details about the treasure hidden in the ancient ruins nearby.", "choices": ['decide to go', 'ignore'], "transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'}, "consequences": { 'decide to go': lambda player: player.update_knowledge('treasure location') }, "media": [] }, "supplies": { "description": "You gather supplies for your journey.", "choices": ['head to forest', 'stay in village'], "transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'}, "media": [] }, }, "forest": { "forest": { "description": "You enter the dense forest, heading towards the ruins.", "choices": ['travel further', 'return to village'], "transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'}, "media": [] }, }, "ruins": { "ruins": { "description": "You reach the ancient ruins. The entrance is dark and eerie.", "choices": ['enter ruins', 'return to forest'], "transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'}, "media": [] }, "explore": { "description": "You explore the ruins, encountering traps and puzzles.", "choices": ['solve puzzle', 'avoid traps'], "transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'}, "media": [] }, "hiddenPassage": { "description": "You solve a challenging puzzle and unlock a hidden passage.", "choices": ['enter passage', 'go back'], "transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'}, "media": [] }, "treasureRoom": { "description": "You enter the treasure room and find the treasure chest.", "choices": ['take treasure', 'leave'], "transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'}, "consequences": { 'take treasure': lambda player: player.add_item('treasure') }, "media": [] }, "celebrate": { "description": "You celebrate your discovery and decide to bring the treasure back to the village.", "choices": ['return to village'], "transitions": {'return to village': 'village_return_return'}, "media": [] }, }, "village_return": { "return": { "description": "You return to the village with the treasure and share it with the villagers.", "choices": ['end adventure'], "transitions": {'end adventure': 'end_end'}, "media": [] }, }, "end": { "end": { "description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.", "choices": [], "transitions": {}, "media": [] }, } }""" #Analyzing Game Configuration Metrics - was the thread name of where the claude3_5_06072024configtips = """Example Config Development Tab - Claude 3.5 Sonnet as the LLM Assitant This config is for a basic text based game engine I made with help many llms including you. Thanks to all the help it loads which presented another problem, I dont have any structural metrics to assess the quality of the config. What JSON things can we look at to see if it may be too bland for a person testing the game Text-Based Game Configuration Analysis 1. State Variety Total number of states: 13 Number of unique locations: 5 (village, forest, ruins, village_return, end) 2. Choice Diversity Average choices per state: 1.92 States with no choices: 1 (end state) States with most choices: 3 (village_start with 3 choices) Unique choices across all states: 17 3. Transition Complexity Total number of transitions: 25 Average transitions per state: 1.92 States with most transitions: 3 (village_start with 3 transitions) 4. Consequence Implementation States with consequences: 3 Total number of consequences: 3 Types of consequences: Adding items, Updating knowledge 5. Description Length Average description length: 13.15 words Longest description: 24 words (village_return) Shortest description: 4 words (village_supplies) 6. Cyclic Paths Presence of loops: Yes (e.g., village_start -> village_supplies -> village_start) 7. Dead Ends Number of dead ends: 1 (end state) 8. Media Integration States with media: 0 Total media elements: 0 9. Narrative Progression Clear beginning (village_start) and end (end) states Multiple paths to reach the end 10. Player Agency Choices affect game progression Some choices have consequences (3 instances) 11. Game Length Minimum steps to complete: 6 (village_start -> village_supplies -> forest_forest -> ruins_ruins -> ruins_explore -> ruins_hiddenPassage -> ruins_treasureRoom -> ruins_celebrate -> village_return -> end) Maximum steps (including loops): Potentially infinite due to cycles 12. Replayability Multiple paths through the game Some variability in outcomes based on choices #============================================= To assess the quality and potential blandness of your game configuration, we can analyze several structural metrics within the JSON. Here are some aspects we can examine: Text-Based Game Configuration AnalysisClick to open document Based on this analysis, here are some observations about the potential blandness of the game: Limited state variety: With only 13 states across 5 locations, the game might feel short and lacking in diversity. Consider adding more locations or states within existing locations. Low average choices: An average of 1.92 choices per state might make the game feel linear. Increasing the number of choices in more states could improve player engagement. Limited consequences: Only 3 states have consequences, which might make player choices feel less impactful. Adding more consequences could increase the sense of agency. Short descriptions: The average description length of 13.15 words might not provide enough detail to immerse players. Consider expanding descriptions to create a richer narrative. Lack of media: No states currently use media elements, which could make the game feel less engaging. Adding images, sound effects, or other media could enhance the player experience. Limited narrative branching: While there are some loops and choices, the overall structure is relatively linear. Adding more branching paths could increase replayability and player interest. To make the game less bland, consider: Adding more states and locations Increasing the number of choices in each state Implementing more consequences for player actions Expanding descriptions to create a richer narrative Incorporating media elements Creating more diverse paths through the game #=============================================== # Text-Based Game Improvement Suggestions ## 1. Expand State Variety - Add a new location: "Mountain Pass" - Include states like "steep_climb", "avalanche_risk", "hidden_cave" - Expand the "forest" location: - Add states like "dense_thicket", "mysterious_clearing", "ancient_tree" ## 2. Increase Choice Diversity - Add more choices to existing states. For example, in "village_start": - "talk to elder" - "visit market" - "investigate strange noises" - Ensure most states have at least 3 choices ## 3. Enhance Transition Complexity - Create more interconnected states. For example: - Allow travel between "forest" and "mountain_pass" - Add shortcuts or secret passages between non-adjacent locations ## 4. Implement More Consequences - Add consequences to more choices. For example: - In "forest_forest": - "forage for food" -> `lambda player: player.add_item('wild berries')` - "take shortcut" -> `lambda player: player.update_status('lost')` ## 5. Enrich Descriptions - Expand existing descriptions with more vivid details - Example for "village_start": ```python "description": "You wake up in a small village nestled between rolling hills. The air is filled with the scent of freshly baked bread and the sound of a distant waterfall. Villagers bustle about, whispering excitedly about a rumor of lost treasure." ``` ## 6. Introduce Cyclic Content with Variations - Add time-based changes to revisited locations - Example: ```python 'village_start': { "description": lambda player: f"You return to the village square. It's now {player.time_of_day()}. " + ("The market is bustling with activity." if player.time_of_day() == "day" else "The streets are quiet, lit by flickering torches.") } ``` ## 7. Create Meaningful Dead Ends - Add optional quests or side adventures - Example: "help_lost_child" state in the village that doesn't progress main story but provides rewards ## 8. Integrate Media Elements - Add placeholder media to enhance immersion: ```python "media": [ {"type": "image", "url": "/api/placeholder/400/300", "alt": "A picturesque village at dawn"}, {"type": "sound", "url": "village_ambience.mp3"} ] ``` ## 9. Enhance Narrative Progression - Add a main quest storyline with multiple stages - Introduce side quests for additional depth ## 10. Increase Player Agency - Add more impactful choices that significantly alter the game's direction - Implement a simple inventory or skill system that affects available choices ## 11. Extend Game Length - Add more locations and states to create a longer, more involved adventure - Implement quest chains that span multiple locations ## 12. Improve Replayability - Add random events that can occur in each location - Implement multiple endings based on player choices and achievements #=============================================== # Updated Text-Based Game Configuration with Side Quest ## New State: help_lost_child Add this new state to the 'village' section of your `all_states` dictionary: ```python 'village': { # ... existing states ... 'help_lost_child': { "description": "You encounter a crying child in the village square. They seem to have lost their way home.", "choices": ['help child', 'ignore and continue'], "transitions": { 'help child': 'village_child_quest', 'ignore and continue': 'village_start' }, "consequences": { 'help child': lambda player: player.update_status('helping_child') }, "media": [] }, 'child_quest': { "description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.", "choices": ['return child', 'ask for reward'], "transitions": { 'return child': 'village_child_reunion', 'ask for reward': 'village_child_reward' }, "media": [] }, 'child_reunion': { "description": "You return the child to their grateful parents. They thank you profusely for your kindness.", "choices": ['accept thanks', 'request reward'], "transitions": { 'accept thanks': 'village_start', 'request reward': 'village_child_reward' }, "consequences": { 'accept thanks': lambda player: player.update_status('local_hero') }, "media": [] }, 'child_reward': { "description": "The child's parents offer you a small pouch of coins as a reward for your help.", "choices": ['accept reward', 'decline reward'], "transitions": { 'accept reward': 'village_start', 'decline reward': 'village_start' }, "consequences": { 'accept reward': lambda player: player.add_item('coin pouch'), 'decline reward': lambda player: player.update_status('selfless_hero') }, "media": [] }, } ``` ## Updated Transitions To incorporate this side quest into the existing game flow, we need to update some transitions in the 'village_start' state: ```python 'village': { 'start': { "description": "You're in the village square. The usual bustle of village life surrounds you.", "choices": ['explore village', 'gather supplies', 'rest', 'look around'], # Added 'look around' "transitions": { 'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start', 'look around': 'village_help_lost_child' # New transition }, "consequences": { 'gather supplies': lambda player: player.add_item('basic supplies') }, "media": [] }, # ... other states ... } ``` ## Explanation of Changes 1. New States: - `help_lost_child`: Introduces the side quest - `child_quest`: Represents the process of helping the child - `child_reunion`: Concludes the quest if you don't ask for a reward - `child_reward`: Offers a choice to accept or decline a reward 2. Updated `village_start`: - Added a new choice: 'look around' - Added a new transition to `village_help_lost_child` 3. Consequences: - Added status updates: 'helping_child', 'local_hero', 'selfless_hero' - Added item reward: 'coin pouch' These changes create a meaningful dead end by: 1. Providing an optional quest that doesn't directly progress the main treasure hunt story 2. Offering multiple choices within the side quest, allowing for different outcomes 3. Implementing consequences that affect the player's status or inventory, providing rewards for engagement 4. Allowing the player to return to the main story flow after completing (or ignoring) the side quest This side quest adds depth to the village location, gives the player more to do, and provides character-building opportunities without derailing the main narrative. It also demonstrates how you can implement similar side quests or meaningful dead ends in other locations of your game. #================================================================================ Certainly! Let's implement the "help_lost_child" side quest as a meaningful dead end in the village. This will add depth to the game without necessarily progressing the main story. Here's how we can incorporate this into your current configuration: Updated Text-Based Game Configuration with Side QuestClick to open document To further improve this side quest and make it even more engaging, you could consider: Time sensitivity: Make the quest available only at certain times or for a limited number of turns. Skill checks: If your game has a skill system, you could add checks for persuasion or perception that affect the outcome. Long-term consequences: The status changes (like 'local_hero') could affect how NPCs interact with the player later in the game. Branching outcomes: You could add more complex branches, such as the child being in actual danger, leading to a mini-adventure. Would you like me to elaborate on any of these ideas or show how to implement them in your configuration? """ tipsupdatedconfigatbeinningofthisspace = """{ "village": { "start": { "description": "You wake up in a small village. You hear a rumor about a lost treasure.", "choices": ['explore village', 'gather supplies', 'rest', 'look around'], "transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start', 'look around': 'village_help_lost_child'}, "consequences": { 'gather supplies': lambda player: player.add_item('basic supplies') }, "media": [] }, "rumor": { "description": "You hear more details about the treasure hidden in the ancient ruins nearby.", "choices": ['decide to go', 'ignore'], "transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'}, "consequences": { 'decide to go': lambda player: player.update_knowledge('treasure location') }, "media": [] }, "supplies": { "description": "You gather supplies for your journey.", "choices": ['head to forest', 'stay in village'], "transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'}, "media": [] }, "help_lost_child": { "description": "You encounter a crying child in the village square. They seem to have lost their way home.", "choices": ['help child', 'ignore and continue'], "transitions": { 'help child': 'village_child_quest', 'ignore and continue': 'village_start' }, "consequences": { 'help child': lambda player: player.update_status('helping_child') }, "media": [] }, "child_quest": { "description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.", "choices": ['return child', 'ask for reward'], "transitions": { 'return child': 'village_child_reunion', 'ask for reward': 'village_child_reward' }, "media": [] }, "child_reunion": { "description": "You return the child to their grateful parents. They thank you profusely for your kindness.", "choices": ['accept thanks', 'request reward'], "transitions": { 'accept thanks': 'village_start', 'request reward': 'village_child_reward' }, "consequences": { 'accept thanks': lambda player: player.update_status('local_hero') }, "media": [] }, "child_reward": { "description": "The child's parents offer you a small pouch of coins as a reward for your help.", "choices": ['accept reward', 'decline reward'], "transitions": { 'accept reward': 'village_start', 'decline reward': 'village_start' }, "consequences": { 'accept reward': lambda player: player.add_item('coin pouch'), 'decline reward': lambda player: player.update_status('selfless_hero') }, "media": [] }, }, "forest": { "forest": { "description": "You enter the dense forest, heading towards the ruins.", "choices": ['travel further', 'return to village'], "transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'}, "media": [] }, }, "ruins": { "ruins": { "description": "You reach the ancient ruins. The entrance is dark and eerie.", "choices": ['enter ruins', 'return to forest'], "transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'}, "media": [] }, "explore": { "description": "You explore the ruins, encountering traps and puzzles.", "choices": ['solve puzzle', 'avoid traps'], "transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'}, "media": [] }, "hiddenPassage": { "description": "You solve a challenging puzzle and unlock a hidden passage.", "choices": ['enter passage', 'go back'], "transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'}, "media": [] }, "treasureRoom": { "description": "You enter the treasure room and find the treasure chest.", "choices": ['take treasure', 'leave'], "transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'}, "consequences": { 'take treasure': lambda player: player.add_item('treasure') }, "media": [] }, 'celebrate': { "description": "You celebrate your discovery and decide to bring the treasure back to the village.", "choices": ['return to village'], "transitions": {'return to village': 'village_return_return'}, "media": [] }, }, "village_return": { "return": { "description": "You return to the village with the treasure and share it with the villagers.", "choices": ['end adventure'], "transitions": {'end adventure': 'end_end'}, "media": [] }, }, "end": { "end": { "description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.", "choices": [], "transitions": {}, "media": [] }, } }""" #-------------------------#-------------------------#-------------------------#------------------------- ExampleGameConfigs = { "Racinggametest": { "pitLane": { "start": { "description": "You're in the pit lane of a famous racing circuit. There's buzz about a legendary race coming up.", "choices": [ "check car", "talk to crew", "rest" ], "transitions": { "check car": "pitLane_carPrep", "talk to crew": "pitLane_crewInfo", "rest": "pitLane_start" }, "consequences": { "check car": {} }, "media": [] }, "crewInfo": { "description": "Your crew tells you about the challenging track and the fierce competition.", "choices": [ "start preparations", "ignore advice" ], "transitions": { "start preparations": "pitLane_carPrep", "ignore advice": "pitLane_start" }, "consequences": { "start preparations": {} }, "media": [] }, "carPrep": { "description": "You and your crew prepare the car for the race.", "choices": [ "head to grid", "more tuning" ], "transitions": { "head to grid": "track_startingGrid", "more tuning": "pitLane_start" }, "media": [] } }, "track": { "startingGrid": { "description": "You're on the starting grid. The atmosphere is tense as drivers prepare for the race.", "choices": [ "start race", "return to pit" ], "transitions": { "start race": "track_firstLap", "return to pit": "pitLane_start" }, "media": [] }, "firstLap": { "description": "The race begins! You navigate through the first lap, jostling for position.", "choices": [ "overtake", "maintain position" ], "transitions": { "overtake": "track_midRace", "maintain position": "track_midRace" }, "media": [] }, "midRace": { "description": "You're in the middle of the race, facing challenges and making split-second decisions.", "choices": [ "push harder", "conserve tires" ], "transitions": { "push harder": "track_finalLaps", "conserve tires": "track_finalLaps" }, "media": [] }, "finalLaps": { "description": "The final laps approach. Victory is within reach, but so is the risk of a mistake.", "choices": [ "give it all", "play it safe" ], "transitions": { "give it all": "track_finishLine", "play it safe": "track_finishLine" }, "consequences": { "give it all": {} }, "media": [] }, "finishLine": { "description": "You cross the finish line! The results are in.", "choices": [ "check results", "return to pit" ], "transitions": { "check results": "podium_ceremony", "return to pit": "pitLane_start" }, "media": [] } }, "podium": { "ceremony": { "description": "The podium ceremony begins. Your performance is recognized.", "choices": [ "celebrate", "prepare for next race" ], "transitions": { "celebrate": "end_celebration", "prepare for next race": "pitLane_start" }, "consequences": { "celebrate": {} }, "media": [] } }, "end": { "celebration": { "description": "You celebrate your achievement. Your team and fans are overjoyed.", "choices": [ "end race day" ], "transitions": { "end race day": "end_end" }, "media": [] }, "end": { "description": "Your racing day ends here. Your performance has impacted your standing in the championship.", "choices": [], "transitions": {}, "media": [] } } }, "Eventplanningstortytest": { "tavern": { "start": { "description": "The air crackles with anticipation as you step into the bustling event planning expo. Caterers offer tantalizing samples, florists boast breathtaking arrangements, and a charismatic DJ promises an unforgettable party atmosphere.", "choices": ["approach the DJ", "sample the catering", "admire the floral displays"], "transitions": { "approach the DJ": "tavern_rumor", "sample the catering": "tavern_grog", "admire the floral displays": "tavern_start" }, "consequences": {}, "media": [] }, "rumor": { "description": "The DJ, a master of hype, spins tales of legendary events he's orchestrated. He mentions a client, a mysterious socialite, planning an extravagant masked ball with a budget that could make your career.", "choices": ["express your interest", "dismiss him as a showman"], "transitions": { "express your interest": "tavern_map", "dismiss him as a showman": "tavern_start" }, "consequences": {}, "media": [] }, "grog": { "description": "You savor the exquisite flavors of miniature gourmet dishes. The caterer, a true artist, describes their vision for a multi-sensory dining experience.", "choices": ["inquire about their rates", "network with other attendees"], "transitions": { "inquire about their rates": "tavern_grog", "network with other attendees": "tavern_start" }, "media": [] }, "map": { "description": "The DJ, sensing your ambition, offers a tantalizing clue: the socialite is looking for a fresh perspective. He suggests you submit a proposal, highlighting your unique vision.", "choices": ["propose a themed experience", "focus on logistics and budget"], "transitions": { "propose a themed experience": "docks_prepare", "focus on logistics and budget": "tavern_haggle" }, "consequences": {}, "media": [] }, "haggle": { "description": "The DJ warns you that the socialite is notoriously demanding. \"She expects perfection,\" he cautions.", "choices": ["assure him you deliver excellence", "reconsider your options"], "transitions": { "assure him you deliver excellence": "docks_prepare", "reconsider your options": "tavern_start" }, "consequences": {}, "media": [] }, "fight": { "description": "You overhear another event planner bragging about securing the masked ball contract. Jealousy burns, and you're tempted to challenge their claim.", "choices": ["confront the planner", "stay focused on your goals"], "transitions": { "confront the planner": "tavern_victory", "stay focused on your goals": "tavern_defeat" }, "consequences": {}, "media": [] }, "victory": { "description": "You confront the planner, exposing their lies. The truth prevails, and word of your integrity reaches the socialite.", "choices": ["prepare your proposal"], "transitions": { "prepare your proposal": "docks_prepare" }, "consequences": {}, "media": [] }, "defeat": { "description": "You decide not to stoop to their level. Trusting your instincts, you continue networking and refining your pitch.", "choices": ["continue networking"], "transitions": { "continue networking": "tavern_start" }, "consequences": {}, "media": [] } }, "docks": { "prepare": { "description": "Armed with a killer concept, you retreat to your studio to craft the perfect proposal. It's time to gather your team: the best florists, caterers, entertainers...", "choices": ["contact your florist", "secure a caterer"], "transitions": { "contact your florist": "docks_ship", "secure a caterer": "docks_crew" }, "media": [] }, "ship": { "description": "Your trusted florist presents a stunning array of options, from elegant orchids to whimsical fairy lights. You envision transforming the venue into a magical landscape.", "choices": ["finalize the floral arrangements", "explore additional decor"], "transitions": { "finalize the floral arrangements": "docks_captain", "explore additional decor": "docks_prepare" }, "media": [] }, "crew": { "description": "You browse through portfolios of caterers, each offering a unique culinary experience. The decision is crucial: the food must be as unforgettable as the event itself.", "choices": ["choose a gourmet caterer", "opt for a themed buffet"], "transitions": { "choose a gourmet caterer": "docks_captain", "opt for a themed buffet": "docks_captain" }, "consequences": {}, "media": [] }, "captain": { "description": "With each element falling into place, your vision for the masked ball comes alive. The proposal is complete - a masterpiece of creativity and meticulous planning.", "choices": ["submit your proposal"], "transitions": { "submit your proposal": "openSea_start" }, "media": [] } }, "openSea": { "start": { "description": "Days turn into nights as you await a response. The uncertainty is agonizing, your hopes rising and falling with every ring of the phone.", "choices": ["check your emails obsessively", "distract yourself with another project"], "transitions": { "check your emails obsessively": "openSea_storm", "distract yourself with another project": "openSea_mutiny" }, "media": [] }, "storm": { "description": "A wave of despair crashes over you as you receive a generic rejection email. Your carefully crafted proposal, your dreams... dashed.", "choices": ["analyze the email for feedback", "move on to the next opportunity"], "transitions": { "analyze the email for feedback": "openSea_ghostShip", "move on to the next opportunity": "openSea_start" }, "media": [] }, "mutiny": { "description": "Your phone vibrates - an unknown number. Your heart races as you answer. It's the socialite's assistant, and they're impressed.", "choices": ["accept their invitation to meet", "negotiate your terms"], "transitions": { "accept their invitation to meet": "openSea_ghostShip", "negotiate your terms": "openSea_start" }, "consequences": {}, "media": [] }, "ghostShip": { "description": "You meet the socialite - an enigmatic figure radiating elegance and power. They're intrigued by your vision, your passion.", "choices": ["present your ideas in detail", "listen to their expectations"], "transitions": { "present your ideas in detail": "ghostShip_deck", "listen to their expectations": "openSea_start" }, "media": [] } }, "ghostShip": { "deck": { "description": "The socialite listens intently as you unveil your plans, their eyes sparkling with approval. They love your innovative concepts, your attention to detail.", "choices": ["discuss the budget and timeline", "negotiate your fee"], "transitions": { "discuss the budget and timeline": "ghostShip_brig", "negotiate your fee": "ghostShip_quarters" }, "media": [] }, "brig": { "description": "Negotiations are swift and decisive. The socialite appreciates your professionalism and agrees to your terms. The masked ball is yours to create!", "choices": ["celebrate your success", "start planning immediately"], "transitions": { "celebrate your success": "ghostShip_clue", "start planning immediately": "ghostShip_treasure" }, "media": [] }, "quarters": { "description": "You secure a contract that exceeds your wildest dreams. The masked ball, a testament to your talent and dedication, will be your masterpiece.", "choices": ["assemble your dream team", "order the first batch of champagne"], "transitions": { "assemble your dream team": "ghostShip_clue", "order the first batch of champagne": "ghostShip_treasure" }, "media": [] }, "clue": { "description": "Excitement courses through you as you share the good news with your team. The best in the business, they're ready to help you execute this extraordinary event.", "choices": ["begin the preparations"], "transitions": { "begin the preparations": "ghostShip_treasure" }, "media": [] }, "treasure": { "description": "Weeks of tireless work culminate in the grand opening of the masked ball. It's a triumph - a symphony of elegance, enchantment, and pure joy.", "choices": ["bask in the glory of your success", "network with potential clients"], "transitions": { "bask in the glory of your success": "ghostShip_victory", "network with potential clients": "openSea_return" }, "consequences": {}, "media": [] }, "victory": { "description": "The masked ball becomes legendary, exceeding all expectations. Your name is on everyone's lips, synonymous with unforgettable events.", "choices": ["claim your place as an event icon"], "transitions": { "claim your place as an event icon": "openSea_return" }, "consequences": {}, "media": [] } }, "openSea_return": { "return": { "description": "Your star continues to rise as you orchestrate one successful event after another. Your creativity knows no bounds, your reputation solidified.", "choices": ["embrace your destiny as an event maestro"], "transitions": { "embrace your destiny as an event maestro": "end_end" }, "media": [] } }, "end": { "end": { "description": "From humble beginnings at an industry expo, you've become an icon, transforming dreams into dazzling reality. The world is your canvas, and every event is a masterpiece.", "choices": [], "transitions": {}, "media": [] } } }, "TimelineStructurePlanningAttempt": { "actualtimeline": { "A1": { "description": "You arrive at the Windfall Orchard. Tall, swaying fruit trees dance in the breeze, and birds chirp secrets you can’t quite decipher.", "events": [ "arrived" ], "choices": [ "continue actual", "explore orchard story (N3)", "investigate orchard hidden (H1)" ], "transitions": { "continue actual": "actualtimeline_A2", "explore orchard story (N3)": "narrativetimeline_N3", "investigate orchard hidden (H1)": "hiddentimeline_H1" }, "media": [], "developernotes": [ "Location 1 in Actual Timeline", "Connects to Narrative N3 and Hidden H1" ] }, "A2": { "description": "You travel to the Misty Bazaar. Aromas of exotic spices fill the air as merchants barter, and you sense secrets around every corner.", "events": [ "traveled", "observed" ], "choices": [ "continue actual", "uncover bazaar story (N1)", "probe bazaar hidden (H2)" ], "transitions": { "continue actual": "actualtimeline_A3", "uncover bazaar story (N1)": "narrativetimeline_N1", "probe bazaar hidden (H2)": "hiddentimeline_H2" }, "media": [], "developernotes": [ "Location 2 in Actual Timeline", "Connects to Narrative N1 and Hidden H2" ] }, "A3": { "description": "You stand upon the Northern Cliffs. Sea winds roar beneath the clouds as distant waves crash, calling you to reflect on deeper mysteries.", "events": [ "arrived", "reflected" ], "choices": [ "continue actual", "witness cliffside story (N4)", "examine cliffside hidden (H3)" ], "transitions": { "continue actual": "actualtimeline_A4", "witness cliffside story (N4)": "narrativetimeline_N4", "examine cliffside hidden (H3)": "hiddentimeline_H3" }, "media": [], "developernotes": [ "Location 3 in Actual Timeline", "Connects to Narrative N4 and Hidden H3" ] }, "A4": { "description": "You approach the Heartwood Temple, feeling an otherworldly calm. The walls glow with faint runes that hint at ancient truths.", "events": [ "approached", "pondered" ], "choices": [ "loop actual", "unearth temple story (N2)", "search temple hidden (H4)" ], "transitions": { "loop actual": "actualtimeline_A4", "unearth temple story (N2)": "narrativetimeline_N2", "search temple hidden (H4)": "hiddentimeline_H4" }, "media": [], "developernotes": [ "Location 4 in Actual Timeline", "Connects to Narrative N2 and Hidden H4", "Loops to itself for demonstration purposes" ] } }, "narrativetimeline": { "N1": { "description": "Narrative Event 1: In the bazaar, you hear a whispered rumor about a powerful relic hidden beyond the cliffs.", "events": [ "heard", "questioned" ], "choices": [ "continue narrative", "return to actual A2", "peek hidden (H2)" ], "transitions": { "continue narrative": "narrativetimeline_N2", "return to actual A2": "actualtimeline_A2", "peek hidden (H2)": "hiddentimeline_H2" }, "media": [], "developernotes": [ "Narrative event linked to Actual A2" ] }, "N2": { "description": "Narrative Event 2: Within the temple, a monk reveals a crucial secret that ties orchard, bazaar, and cliffs together.", "events": [ "uncovered" ], "choices": [ "continue narrative", "return to actual A4", "peek hidden (H4)" ], "transitions": { "continue narrative": "narrativetimeline_N3", "return to actual A4": "actualtimeline_A4", "peek hidden (H4)": "hiddentimeline_H4" }, "media": [], "developernotes": [ "Narrative event linked to Actual A4" ] }, "N3": { "description": "Narrative Event 3: Back at the orchard, a forgotten memory surfaces—hinting all is connected by a hidden thread.", "events": [ "remembered" ], "choices": [ "continue narrative", "return to actual A1", "peek hidden (H1)" ], "transitions": { "continue narrative": "narrativetimeline_N4", "return to actual A1": "actualtimeline_A1", "peek hidden (H1)": "hiddentimeline_H1" }, "media": [], "developernotes": [ "Narrative event linked to Actual A1" ] }, "N4": { "description": "Narrative Event 4: At the cliffside, you discover the final piece of the story. Only by uniting all locations can true revelation be found.", "events": [ "realized" ], "choices": [ "finish narrative", "return to actual A3", "peek hidden (H3)" ], "transitions": { "finish narrative": "narrativetimeline_N4", "return to actual A3": "actualtimeline_A3", "peek hidden (H3)": "hiddentimeline_H3" }, "media": [], "developernotes": [ "Narrative event linked to Actual A3", "Loops to itself for demonstration of an end state" ] } }, "hiddentimeline": { "H1": { "description": "Hidden Event 1: A hushed whisper in the orchard suggests all paths are part of a larger design.", "events": [ "listened" ], "choices": [ "continue hidden", "return to A1", "narrative check (N3)" ], "transitions": { "continue hidden": "hiddentimeline_H2", "return to A1": "actualtimeline_A1", "narrative check (N3)": "narrativetimeline_N3" }, "media": [], "developernotes": [ "Hidden event connected to orchard (A1) and story event (N3)" ] }, "H2": { "description": "Hidden Event 2: Faint footprints in the bazaar’s back alley reveal someone else is guiding your steps.", "events": [ "noticed" ], "choices": [ "continue hidden", "return to A2", "narrative check (N1)" ], "transitions": { "continue hidden": "hiddentimeline_H3", "return to A2": "actualtimeline_A2", "narrative check (N1)": "narrativetimeline_N1" }, "media": [], "developernotes": [ "Hidden event connected to bazaar (A2) and story event (N1)" ] }, "H3": { "description": "Hidden Event 3: You decipher ancient runes carved under the cliffs, learning that orchard, bazaar, and cliffs are intertwined.", "events": [ "deciphered" ], "choices": [ "continue hidden", "return to A3", "narrative check (N4)" ], "transitions": { "continue hidden": "hiddentimeline_H4", "return to A3": "actualtimeline_A3", "narrative check (N4)": "narrativetimeline_N4" }, "media": [], "developernotes": [ "Hidden event connected to cliffs (A3) and story event (N4)" ] }, "H4": { "description": "Hidden Event 4: In the temple’s deepest chamber, you comprehend the final revelation—everything converges at Heartwood.", "events": [ "comprehended" ], "choices": [ "close hidden", "return to A4", "narrative check (N2)" ], "transitions": { "close hidden": "hiddentimeline_H4", "return to A4": "actualtimeline_A4", "narrative check (N2)": "narrativetimeline_N2" }, "media": [], "developernotes": [ "Hidden event connected to temple (A4) and story event (N2)", "Loops to itself for demonstration of an end state" ] } } }, "MemoryFragments": { "mind": { "awakening": { "description": "Your eyes open. White ceiling. Hospital? No... somewhere else. Your head throbs. Memories float just out of reach, fragmented and hazy. You sense four distinct moments trying to surface...", "choices": [ "focus on the burning smell", "focus on the sound of waves", "focus on the face in shadows", "focus on the cold metal" ], "transitions": { "focus on the burning smell": "memory_fire", "focus on the sound of waves": "memory_boat", "focus on the face in shadows": "memory_betrayal", "focus on the cold metal": "memory_safe" }, "media": [] }, "hub": { "description": "The memory fades, leaving you gasping. More fragments swirl in the darkness of your mind. What else happened that night?", "choices": [ "focus on the burning smell", "focus on the sound of waves", "focus on the face in shadows", "focus on the cold metal", "try to piece it all together", "sink deeper into the darkness" ], "transitions": { "focus on the burning smell": "memory_fire", "focus on the sound of waves": "memory_boat", "focus on the face in shadows": "memory_betrayal", "focus on the cold metal": "memory_safe", "try to piece it all together": "mind_convergence", "sink deeper into the darkness": "deeper_nightmare" }, "media": [] }, "convergence": { "description": "The fragments align. You remember now: The safe in Marcus's office. The documents proving the conspiracy. The boat waiting at the dock. Marcus's betrayal. The fire he set to cover his tracks. And you... you escaped with the evidence. It's still in your coat pocket.", "choices": [ "check your coat pocket", "rest and recover more" ], "transitions": { "check your coat pocket": "reality_evidence", "rest and recover more": "mind_hub" }, "media": [] } }, "memory": { "fire": { "description": "MEMORY: Flames lick the walls of the old warehouse. Smoke burns your lungs. You're running, papers clutched to your chest. Behind you, a voice shouts - angry, desperate. The heat is unbearable. You see a window, already cracked from the heat...", "choices": [ "remember jumping through", "remember who was shouting", "let the memory fade" ], "transitions": { "remember jumping through": "memory_fire_detail", "remember who was shouting": "memory_fire_voice", "let the memory fade": "mind_hub" }, "media": [] }, "fire_detail": { "description": "Glass shatters around you. You hit water - cold, shockingly cold. The canal. You surface, gasping, the papers still somehow in your grip. The warehouse is an inferno now. No one could survive inside...", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "fire_voice": { "description": "The voice... it was Marcus. Your partner. Your friend. He was screaming for you to stop, to give back what you'd taken. But you knew what those documents meant. You couldn't let him destroy them.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "boat": { "description": "MEMORY: Salt air. The creak of ropes. A small boat rocks gently at a hidden dock. Someone helped you here - a woman with kind eyes and a captain's hat. 'You'll be safe,' she said. 'Sleep now.'", "choices": [ "remember her face clearly", "remember what she said next", "let the memory fade" ], "transitions": { "remember her face clearly": "memory_boat_face", "remember what she said next": "memory_boat_words", "let the memory fade": "mind_hub" }, "media": [] }, "boat_face": { "description": "Elena. Her name surfaces with her face. She's the journalist you contacted weeks ago. She believed you when no one else would. She arranged the boat, the safe house... she saved your life.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "boat_words": { "description": "'When you wake, everything will hurt. But you'll have the proof. That's all that matters now. The world needs to know what they did.' She pressed something into your hands - a phone. 'Call this number when you're ready.'", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "betrayal": { "description": "MEMORY: Marcus's office. Late at night. You weren't supposed to be there. The safe was open - he'd forgotten to close it. Inside: documents, transfers, names. A conspiracy bigger than you imagined. And Marcus... at the center of it all.", "choices": [ "remember taking the documents", "remember Marcus finding you", "let the memory fade" ], "transitions": { "remember taking the documents": "memory_betrayal_theft", "remember Marcus finding you": "memory_betrayal_caught", "let the memory fade": "mind_hub" }, "media": [] }, "betrayal_theft": { "description": "Your hands shook as you photographed each page, then took the originals. Years of friendship, partnership, trust - all built on lies. He'd been using the company to launder money for people who destroyed lives. And you'd signed off on it, unknowing.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "betrayal_caught": { "description": "The light flicked on. Marcus stood in the doorway, his face cycling through surprise, fear, and finally cold fury. 'I wish you hadn't seen that,' he said, reaching for his phone. You ran. He chased. The warehouse. The fire. Everything that followed.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "safe": { "description": "MEMORY: Cold steel under your fingertips. The click of a combination lock. Numbers you overheard Marcus mumble in his sleep during a conference trip: 7-23-91. His mother's birthday. The door swings open...", "choices": [ "remember what was inside", "remember the smell of the room", "let the memory fade" ], "transitions": { "remember what was inside": "memory_safe_contents", "remember the smell of the room": "memory_safe_smell", "let the memory fade": "mind_hub" }, "media": [] }, "safe_contents": { "description": "Stacks of cash. Foreign passports with Marcus's face but different names. And the documents - transaction records, shell companies, names of officials on the take. Enough to bring down not just Marcus, but everyone connected to him.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] }, "safe_smell": { "description": "Cigar smoke and old paper. Marcus's office always smelled like success and secrets. You never questioned it before. Now the smell makes you sick, knowing what that 'success' was built on.", "choices": [ "return to the present" ], "transitions": { "return to the present": "mind_hub" }, "media": [] } }, "reality": { "evidence": { "description": "Your fingers find paper. Crumpled, water-damaged, but legible. The documents. The proof. It's all here. On the nightstand: a phone you don't recognize. Elena's phone. A number already saved: 'Press Contact - NYT'. Your head still pounds, but your mind is clear now. You know what happened. You know what you have to do.", "choices": [ "make the call", "review the documents first", "wait until you're stronger", "confront Marcus yourself" ], "transitions": { "make the call": "reality_call", "review the documents first": "investigation_review", "wait until you're stronger": "ending_wait", "confront Marcus yourself": "ending_confrontation" }, "media": [] }, "call": { "description": "The phone rings twice. 'This is Sarah Chen, New York Times.' You take a breath. 'I have documents proving a money laundering conspiracy involving a dozen city officials. I have names, amounts, dates. And I have proof that my former partner tried to kill me to keep it quiet.'", "choices": [ "tell her everything" ], "transitions": { "tell her everything": "ending_expose" }, "media": [] } }, "ending": { "expose": { "description": "Three weeks later, you watch from a safe house as Marcus is led away in handcuffs. Twelve officials have resigned. Four more are under investigation. The story is everywhere. Elena sits beside you, smiling. 'You remembered,' she says. 'When it mattered most, you remembered everything.' The memories still hurt. But now they mean something.", "choices": [], "transitions": {}, "media": [] }, "wait": { "description": "You set the phone down. Not yet. You need to be sure, to remember everything clearly. You close your eyes and drift back into the fragments, searching for more details, more proof, more certainty. The truth can wait a little longer. It has to be perfect.", "choices": [ "rest and remember" ], "transitions": { "rest and remember": "mind_hub" }, "media": [] }, "confrontation": { "description": "You chose to confront Marcus yourself. Standing in the shadows of the rebuilt warehouse, you wait. He arrives alone, as you demanded. His face is gaunt, aged years in weeks. 'You should have died in that fire,' he says quietly.", "choices": [ "demand answers", "offer him a choice", "signal Elena to call the police" ], "transitions": { "demand answers": "ending_answers", "offer him a choice": "ending_mercy", "signal Elena to call the police": "ending_justice" }, "media": [] }, "answers": { "description": "'Why?' you ask. He laughs bitterly. 'You think I wanted this? They approached me ten years ago. One favor became ten, became a hundred. By the time I realized what I'd become, I was in too deep. You were never supposed to find out. I was protecting you.' His words ring hollow. Protection isn't built on lies.", "choices": [ "turn him in", "let him run" ], "transitions": { "turn him in": "ending_justice", "let him run": "ending_escape" }, "media": [] }, "mercy": { "description": "'I have the documents,' you say. 'I could destroy them. You could disappear. Start over somewhere far away.' Marcus stares at you, hope flickering in his eyes. 'You would do that? After everything?' The question hangs in the air. Would you?", "choices": [ "yes, for our old friendship", "no, the victims deserve justice" ], "transitions": { "yes, for our old friendship": "ending_escape", "no, the victims deserve justice": "ending_justice" }, "media": [] }, "justice": { "description": "Blue and red lights fill the warehouse. Marcus doesn't run. He stands still as they cuff him, meeting your eyes one last time. 'I hope it was worth it,' he says. Six months later, he's sentenced to twenty-five years. The network is dismantled. The victims' families send you letters of thanks. You read them when the guilt gets heavy. It was worth it. It has to be.", "choices": [], "transitions": {}, "media": [] }, "escape": { "description": "You watch him drive away into the night. The documents burn in a metal barrel behind you. Elena finds you an hour later, staring at the ashes. 'What did you do?' she asks. You don't answer. Some truths are too heavy to speak. The conspiracy continues, smaller now but alive. And you carry the weight of everyone who will never see justice.", "choices": [], "transitions": {}, "media": [] } }, "investigation": { "review": { "description": "Before making the call, you spread the documents across the bed. Water-stained but legible. You need to understand the full scope of what you're about to unleash. Where do you start?", "choices": [ "study the financial records", "read the list of names", "examine the photographs", "just make the call already" ], "transitions": { "study the financial records": "investigation_finances", "read the list of names": "investigation_names", "examine the photographs": "investigation_photos", "just make the call already": "reality_call" }, "media": [] }, "finances": { "description": "The numbers are staggering. Millions moved through shell companies, laundered through real estate, funneled into offshore accounts. Each transaction is a crime. Each signature is a confession. Marcus's initials appear on dozens of documents. But so do others - people you've seen on television, in newspapers, at charity galas. This goes higher than you imagined.", "choices": [ "continue investigating", "this is enough - make the call" ], "transitions": { "continue investigating": "investigation_review", "this is enough - make the call": "reality_call" }, "media": [] }, "names": { "description": "A list of names. Some you recognize - city council members, police captains, a federal judge. Others mean nothing to you, but they will soon. Red lines connect them in a web of corruption. At the center: a name you've never seen before. Someone who stayed completely hidden. The real architect. You photograph the page three times to be sure.", "choices": [ "continue investigating", "this is enough - make the call" ], "transitions": { "continue investigating": "investigation_review", "this is enough - make the call": "reality_call" }, "media": [] }, "photos": { "description": "Surveillance photos. Meetings in parking garages, exchanges in restaurants, handshakes at private clubs. Timestamps and locations carefully noted. Insurance, you realize. Marcus was keeping records in case they ever turned on him. These photos could protect you too, or make you a target. Knowledge is dangerous. You've seen too much to go back now.", "choices": [ "continue investigating", "this is enough - make the call", "hide the photos separately as insurance" ], "transitions": { "continue investigating": "investigation_review", "this is enough - make the call": "reality_call", "hide the photos separately as insurance": "investigation_insurance" }, "media": [] }, "insurance": { "description": "You photograph the surveillance images with Elena's phone, then upload them to three different cloud services under fake names. If something happens to you, these images will surface. It's not much, but it's something. A dead man's switch. You hope you never need it.", "choices": [ "now make the call" ], "transitions": { "now make the call": "reality_call" }, "media": [] } }, "deeper": { "nightmare": { "description": "You're not awake. Not truly. The memories have pulled you under, into something darker. The warehouse burns around you, but this time you can't move. Marcus stands over you, face shifting between the friend you knew and the stranger he became. 'You shouldn't have looked,' he says, and his voice echoes infinitely.", "choices": [ "fight to wake up", "let the nightmare show you more", "try to talk to dream-Marcus" ], "transitions": { "fight to wake up": "mind_hub", "let the nightmare show you more": "deeper_vision", "try to talk to dream-Marcus": "deeper_confrontation" }, "media": [] }, "vision": { "description": "The fire fades. You stand in a vast office, looking down at the city through floor-to-ceiling windows. A desk behind you holds a nameplate you can't quite read. This is the future, you realize. Or a possible one. You could take Marcus's place. Use the network for good, or for yourself. The power is intoxicating, even in dreams.", "choices": [ "reject this future", "explore what you could become" ], "transitions": { "reject this future": "mind_hub", "explore what you could become": "deeper_temptation" }, "media": [] }, "temptation": { "description": "In the dream, you become the one behind the desk. Years pass in moments. The network grows under your control. You tell yourself it's different when you're in charge. But the faces of the people you step on to climb... they look familiar. They look like you. You wake gasping, cold sweat soaking the sheets. Some paths should never be walked.", "choices": [ "shake off the nightmare" ], "transitions": { "shake off the nightmare": "mind_hub" }, "media": [] }, "confrontation": { "description": "Dream-Marcus tilts his head, considering you. 'You want to understand,' he says. 'Fine. I'll show you.' The warehouse dissolves. You're in his memory now - the first meeting, the first compromise, the first step down a road with no return. You feel what he felt: the fear, the greed, the slow erosion of everything he thought he was.", "choices": [ "pull away from his perspective", "see it through to the end" ], "transitions": { "pull away from his perspective": "mind_hub", "see it through to the end": "deeper_understanding" }, "media": [] }, "understanding": { "description": "You live his choices. Every justification, every small betrayal that led to larger ones. You feel the moment he decided you had to die - not hate, but cold calculation. Survival. By the time you wake, you understand him completely. It doesn't make you forgive him. But you know now: anyone can become a monster, one small choice at a time. The question is whether you're strong enough to choose differently.", "choices": [ "wake with new resolve" ], "transitions": { "wake with new resolve": "reality_evidence" }, "media": [] } } }, # ============================================================ # LOGIC GATES EXAMPLE - Demonstrates conditional choices, # dynamic transitions, effects, and encounter injection # ============================================================ "LogicGatesDemo": { "tavern": { "entrance": { "description": "You push open the heavy oak door and step into the Rusty Tankard. The smell of ale and roasted meat fills your nostrils.", "choices": [ "approach the bar", "sit at a corner table", "talk to the mysterious stranger", "use the back door" ], "choice_config": { "talk to the mysterious stranger": { "condition": {"flag": "noticed_stranger"}, "visible_text": "Approach the hooded figure", "hidden_text": "[Look around more carefully first]" }, "use the back door": { "condition": { "or": [ {"has_item": "back_door_key"}, {"flag": "knows_shortcut"} ] } } }, "transitions": { "approach the bar": "tavern_bar", "sit at a corner table": { "random": [ ["tavern_quiet_corner", 0.7], ["tavern_eavesdrop", 0.3] ] }, "talk to the mysterious stranger": { "if": {"flag": "stranger_trusts_you"}, "then": "tavern_stranger_mission", "else": "tavern_stranger_suspicious" }, "use the back door": "alley_escape" }, "effects": { "approach the bar": { "increment": {"tavern_visits": 1} }, "sit at a corner table": { "set_flag": "observed_tavern" } }, "on_enter": { "set_flag": "visited_tavern", "add_location": "tavern" }, "encounter_chance": { "probability": 0.15, "pool": ["tavern_brawl", "tavern_drunk"], "bypass_conditions": {"flag": "tavern_regular"} }, "media": [] }, "bar": { "description": "The bartender, a burly woman with a knowing smile, polishes a mug while watching you approach.", "choices": [ "order a drink", "ask about rumors", "bribe for information" ], "choice_config": { "bribe for information": { "condition": {"money": {"gte": 20}}, "visible_text": "Slip her some coins (20 gold)", "hidden_text": "[Not enough gold - need 20]" } }, "transitions": { "order a drink": "tavern_drinking", "ask about rumors": { "conditions": [ {"if": {"counter": {"bartender_trust": {"gte": 3}}}, "then": "tavern_secret_rumor"}, {"if": {"flag": "bought_drink"}, "then": "tavern_common_rumor"}, {"default": "tavern_no_rumor"} ] }, "bribe for information": "tavern_bribed_info" }, "effects": { "order a drink": { "remove_money": 2, "set_flag": "bought_drink", "increment": {"bartender_trust": 1} }, "bribe for information": { "remove_money": 20, "increment": {"bartender_trust": 2}, "set_flag": "noticed_stranger" } }, "media": [] }, "drinking": { "description": "The ale is strong and warming. You notice a hooded figure in the corner watching you.", "choices": ["return to entrance", "keep drinking"], "transitions": { "return to entrance": "tavern_entrance", "keep drinking": "tavern_bar" }, "on_enter": { "set_flag": "noticed_stranger" }, "media": [] }, "quiet_corner": { "description": "You find a quiet corner to observe the room. The usual patrons go about their business.", "choices": ["return to entrance"], "transitions": {"return to entrance": "tavern_entrance"}, "media": [] }, "eavesdrop": { "description": "From your corner seat, you overhear a conversation about a secret meeting happening tonight.", "choices": ["investigate further", "ignore and leave"], "transitions": { "investigate further": "tavern_stranger_suspicious", "ignore and leave": "tavern_entrance" }, "on_enter": { "set_flag": "knows_secret_meeting", "set_knowledge": {"overheard": "secret meeting tonight"} }, "media": [] }, "no_rumor": { "description": "The bartender shrugs. 'Buy a drink first, then we can talk.'", "choices": ["return to bar"], "transitions": {"return to bar": "tavern_bar"}, "media": [] }, "common_rumor": { "description": "The bartender leans in. 'There's talk of bandits on the north road. Be careful if you're traveling.'", "choices": ["return to bar"], "transitions": {"return to bar": "tavern_bar"}, "on_enter": { "set_knowledge": {"bandit_warning": True} }, "media": [] }, "secret_rumor": { "description": "The bartender whispers conspiratorially. 'The hooded stranger in the corner? He's looking for someone with... special skills. Pays well, they say.'", "choices": ["return to bar"], "transitions": {"return to bar": "tavern_bar"}, "on_enter": { "set_flag": "knows_stranger_job", "set_flag": "noticed_stranger" }, "media": [] }, "bribed_info": { "description": "The bartender pockets the coins smoothly. 'The stranger? Name's Vex. Looking for someone to retrieve something from the old ruins. Dangerous work, but the pay...' She trails off with a knowing look.", "choices": ["return to bar"], "transitions": {"return to bar": "tavern_bar"}, "on_enter": { "add_person": "vex", "set_knowledge": {"vex_job": "ruins retrieval"}, "set_flag": "knows_stranger_job" }, "media": [] }, "stranger_suspicious": { "description": "The hooded figure eyes you warily. 'I don't know you. Why should I trust a stranger?'", "choices": [ "mention the bartender sent you", "offer to prove yourself", "leave them alone" ], "choice_config": { "mention the bartender sent you": { "condition": {"flag": "knows_stranger_job"} } }, "transitions": { "mention the bartender sent you": "tavern_stranger_mission", "offer to prove yourself": "tavern_stranger_test", "leave them alone": "tavern_entrance" }, "on_enter": { "add_person": "mysterious_stranger" }, "media": [] }, "stranger_test": { "description": "The stranger slides a small lockbox across the table. 'Open this without the key. Prove you have useful skills.'", "choices": [ "try to pick the lock", "admit you can't", "offer gold instead" ], "choice_config": { "try to pick the lock": { "condition": {"has_item": "lockpicks"} }, "offer gold instead": { "condition": {"money": {"gte": 50}} } }, "transitions": { "try to pick the lock": "tavern_stranger_mission", "admit you can't": "tavern_entrance", "offer gold instead": "tavern_stranger_mission" }, "effects": { "try to pick the lock": { "set_flag": "stranger_trusts_you" }, "offer gold instead": { "remove_money": 50, "set_flag": "stranger_trusts_you" } }, "media": [] }, "stranger_mission": { "description": "The stranger nods approvingly. 'I am Vex. I need someone to retrieve an artifact from the old ruins. The pay is 500 gold. Are you interested?'", "choices": ["accept the job", "decline"], "transitions": { "accept the job": "tavern_mission_accepted", "decline": "tavern_entrance" }, "on_enter": { "add_person": "vex", "set_flag": "stranger_trusts_you" }, "media": [] }, "mission_accepted": { "description": "Vex hands you a worn map. 'The ruins are north of town. Bring me the Obsidian Amulet, and the gold is yours. Don't fail me.'", "choices": ["head to the ruins", "prepare first"], "transitions": { "head to the ruins": "ruins_entrance", "prepare first": "tavern_entrance" }, "on_enter": { "add_item": "worn_map", "start_mission": {"ruins_artifact": {"target": "obsidian_amulet", "reward": 500}}, "add_location": "ruins" }, "media": [] }, "brawl": { "description": "A fight breaks out! Mugs fly and patrons scramble for cover.", "choices": ["join the fight", "duck and cover", "slip out the back"], "choice_config": { "slip out the back": { "condition": {"flag": "knows_shortcut"} } }, "transitions": { "join the fight": "tavern_entrance", "duck and cover": "tavern_entrance", "slip out the back": "alley_escape" }, "effects": { "join the fight": { "increment": {"reputation_tough": 1}, "remove_money": 5 } }, "media": [] }, "drunk": { "description": "A drunk patron stumbles into you, spilling ale on your clothes. 'Sorry, friend! Let me make it up to ya...' He presses something into your hand.", "choices": ["accept the gift", "push him away"], "transitions": { "accept the gift": "tavern_entrance", "push him away": "tavern_entrance" }, "effects": { "accept the gift": { "add_item": "lucky_coin", "set_flag": "knows_shortcut" } }, "media": [] }, "mission_complete": { "description": "Vex examines the amulet, a rare smile crossing their face. 'You've done well.' They hand you a heavy pouch of gold. 'Perhaps we'll work together again.'", "choices": ["celebrate your success", "ask about more work"], "transitions": { "celebrate your success": "tavern_entrance", "ask about more work": "tavern_entrance" }, "effects": { "celebrate your success": { "add_money": 500, "remove_item": "obsidian_amulet", "adjust_reputation": {"vex": 10} }, "ask about more work": { "add_money": 500, "remove_item": "obsidian_amulet", "adjust_reputation": {"vex": 15}, "set_flag": "vex_ally" } }, "media": [] } }, "alley": { "escape": { "description": "You slip through the back door into a narrow alley. The night air is cool and quiet.", "choices": ["return to tavern", "explore the alley"], "transitions": { "return to tavern": "tavern_entrance", "explore the alley": "alley_escape" }, "on_enter": { "set_flag": "used_back_door" }, "media": [] } }, "ruins": { "entrance": { "description": "The ancient ruins loom before you, crumbling stone covered in ivy. The entrance is dark and foreboding.", "choices": ["enter the ruins", "return to town"], "choice_config": { "enter the ruins": { "condition": {"has_item": "worn_map"}, "hidden_text": "[Need a map to navigate]" } }, "transitions": { "enter the ruins": "ruins_interior", "return to town": "tavern_entrance" }, "on_enter": { "visit_location": "ruins" }, "media": [] }, "interior": { "description": "Inside the ruins, faded murals line the walls. In the center of the chamber, you see a pedestal with an obsidian amulet.", "choices": ["take the amulet", "examine the murals", "leave"], "transitions": { "take the amulet": "ruins_success", "examine the murals": "ruins_interior", "leave": "ruins_entrance" }, "effects": { "take the amulet": { "add_item": "obsidian_amulet", "complete_mission": "ruins_artifact" } }, "media": [] }, "success": { "description": "You hold the Obsidian Amulet in your hands. Time to return to Vex and collect your reward.", "choices": ["return to the tavern"], "transitions": { "return to the tavern": "tavern_mission_complete" }, "media": [] } } }, # ============================================================ # COMPREHENSIVE STATE SYSTEM REFERENCE # Demonstrates ALL condition types, effect types, and transition patterns # Use this as a reference for the full capability of the state system # ============================================================ "StateSystemReference": { "hub": { # ============================================================ # HUB: Central navigation to all feature demonstrations # ============================================================ "start": { "description": "Welcome to the State System Reference! This comprehensive demo showcases all available conditions, effects, and transition patterns. Choose a category to explore.", "choices": [ "explore conditions", "explore effects", "explore transitions", "explore state features", "view current state" ], "transitions": { "explore conditions": "conditions_menu", "explore effects": "effects_menu", "explore transitions": "transitions_menu", "explore state features": "features_menu", "view current state": "hub_state_viewer" }, "on_enter": { "set_flag": "tutorial_started", "add_location": "hub" }, "media": [] }, "state_viewer": { "description": "=== CURRENT STATE ===\n\n📍 Location: {current_location} / {current_state}\n💰 Money: {money}\n🎒 Inventory: {inventory}\n🚩 Flags: {flags}\n🔢 Counters: {counters}\n👥 People Met: {people_met}\n🗺️ Visited: {locations_visited}\n📋 Active Missions: {missions_active}\n✅ Completed: {missions_completed}", "choices": ["return to hub"], "transitions": {"return to hub": "hub_start"}, "on_enter": { "increment": {"hub_views": 1} }, "media": [] } }, "conditions": { # ============================================================ # CONDITIONS MENU # ============================================================ "menu": { "description": "CONDITION TYPES REFERENCE - Conditions determine when choices are available and how transitions resolve. Select a category:", "choices": [ "inventory conditions", "flag conditions", "numeric conditions", "social conditions", "location conditions", "mission conditions", "compound conditions", "return to hub" ], "transitions": { "inventory conditions": "conditions_inventory", "flag conditions": "conditions_flags", "numeric conditions": "conditions_numeric", "social conditions": "conditions_social", "location conditions": "conditions_location", "mission conditions": "conditions_mission", "compound conditions": "conditions_compound", "return to hub": "hub_start" }, "media": [] }, "inventory": { "description": "INVENTORY CONDITIONS: has_item checks if player has item, not_has_item checks if missing. Try getting the key to see choice visibility change.", "choices": [ "pick up demo key", "use demo key", "check for missing item", "back to conditions menu" ], "choice_config": { "use demo key": { "condition": {"has_item": "demo_key"}, "visible_text": "Use the demo key (has_item passed)", "hidden_text": "[Requires: demo_key]" }, "check for missing item": { "condition": {"not_has_item": "nonexistent_item"}, "visible_text": "Confirm missing item (not_has_item passed)" } }, "transitions": { "pick up demo key": "conditions_inventory", "use demo key": "conditions_inventory_used", "check for missing item": "conditions_inventory", "back to conditions menu": "conditions_menu" }, "effects": { "pick up demo key": {"add_item": "demo_key"}, "use demo key": {"remove_item": "demo_key"} }, "media": [] }, "inventory_used": { "description": "Success! The has_item condition passed. Key was consumed.", "choices": ["return"], "transitions": {"return": "conditions_inventory"}, "media": [] }, "flags": { "description": "FLAG CONDITIONS: flag checks if true, not_flag checks if false/unset. Flags are boolean switches.", "choices": [ "set demo flag", "action requiring flag", "action requiring no flag", "clear demo flag", "back to conditions menu" ], "choice_config": { "action requiring flag": { "condition": {"flag": "demo_flag_set"}, "visible_text": "Proceed (flag check passed)", "hidden_text": "[Requires: demo_flag_set]" }, "action requiring no flag": { "condition": {"not_flag": "demo_flag_set"}, "visible_text": "Alternative path (not_flag passed)" } }, "transitions": { "set demo flag": "conditions_flags", "action requiring flag": "conditions_flags_ok", "action requiring no flag": "conditions_flags_ok", "clear demo flag": "conditions_flags", "back to conditions menu": "conditions_menu" }, "effects": { "set demo flag": {"set_flag": "demo_flag_set"}, "clear demo flag": {"clear_flag": "demo_flag_set"} }, "media": [] }, "flags_ok": { "description": "Condition passed!", "choices": ["return"], "transitions": {"return": "conditions_flags"}, "media": [] }, "numeric": { "description": "NUMERIC CONDITIONS: money and counter checks with operators gte(>=), lte(<=), gt(>), lt(<), eq(==), neq(!=)", "choices": [ "get 100 gold", "spend 50 gold", "buy expensive item", "increment demo counter", "action at counter >= 3", "back to conditions menu" ], "choice_config": { "spend 50 gold": { "condition": {"money": {"gte": 50}}, "visible_text": "Spend 50 gold (money >= 50)", "hidden_text": "[Need 50 gold]" }, "buy expensive item": { "condition": {"money": {"gte": 200}}, "visible_text": "Buy rare artifact (200 gold)", "hidden_text": "[Need 200 gold]" }, "action at counter >= 3": { "condition": {"counter": {"demo_counter": {"gte": 3}}}, "visible_text": "Unlock reward (counter >= 3)", "hidden_text": "[demo_counter must be >= 3]" } }, "transitions": { "get 100 gold": "conditions_numeric", "spend 50 gold": "conditions_numeric", "buy expensive item": "conditions_numeric", "increment demo counter": "conditions_numeric", "action at counter >= 3": "conditions_numeric_reward", "back to conditions menu": "conditions_menu" }, "effects": { "get 100 gold": {"add_money": 100}, "spend 50 gold": {"remove_money": 50}, "buy expensive item": {"remove_money": 200, "add_item": "rare_artifact"}, "increment demo counter": {"increment": {"demo_counter": 1}} }, "media": [] }, "numeric_reward": { "description": "Counter check passed! Reward granted.", "choices": ["continue"], "transitions": {"continue": "conditions_numeric"}, "on_enter": {"add_item": "counter_reward"}, "media": [] }, "social": { "description": "SOCIAL CONDITIONS: met_person, not_met_person, reputation checks. Track NPCs and relationships.", "choices": [ "meet the merchant", "talk to merchant", "increase merchant reputation", "get merchant discount", "back to conditions menu" ], "choice_config": { "talk to merchant": { "condition": {"met_person": "demo_merchant"}, "visible_text": "Chat with merchant (met_person)", "hidden_text": "[Haven't met merchant]" }, "get merchant discount": { "condition": {"reputation": {"npc": "demo_merchant", "gte": 5}}, "visible_text": "Ask for discount (rep >= 5)", "hidden_text": "[Need reputation >= 5]" } }, "transitions": { "meet the merchant": "conditions_social", "talk to merchant": "conditions_social", "increase merchant reputation": "conditions_social", "get merchant discount": "conditions_social_discount", "back to conditions menu": "conditions_menu" }, "effects": { "meet the merchant": {"add_person": "demo_merchant"}, "increase merchant reputation": {"adjust_reputation": {"demo_merchant": 2}} }, "media": [] }, "social_discount": { "description": "Discount granted! Reputation check passed.", "choices": ["continue"], "transitions": {"continue": "conditions_social"}, "on_enter": {"add_item": "discount_token"}, "media": [] }, "location": { "description": "LOCATION CONDITIONS: visited (been there), discovered (know about), visit_count (times visited)", "choices": [ "discover secret cave", "visit the cave", "tell about cave", "veteran check (visit 3+ times)", "back to conditions menu" ], "choice_config": { "visit the cave": { "condition": {"discovered": "secret_cave"}, "visible_text": "Enter cave (discovered)", "hidden_text": "[Discover first]" }, "tell about cave": { "condition": {"visited": "secret_cave"}, "visible_text": "Share stories (visited)", "hidden_text": "[Must have visited]" }, "veteran check (visit 3+ times)": { "condition": {"visit_count": {"state": "conditions_location", "gte": 3}}, "visible_text": "Veteran reward (3+ visits)", "hidden_text": "[Visit 3+ times]" } }, "transitions": { "discover secret cave": "conditions_location", "visit the cave": "conditions_location_cave", "tell about cave": "conditions_location", "veteran check (visit 3+ times)": "conditions_location_veteran", "back to conditions menu": "conditions_menu" }, "effects": { "discover secret cave": {"add_location": "secret_cave"} }, "media": [] }, "location_cave": { "description": "You enter the crystal cave!", "choices": ["return"], "transitions": {"return": "conditions_location"}, "on_enter": {"visit_location": "secret_cave"}, "media": [] }, "location_veteran": { "description": "Veteran explorer badge earned!", "choices": ["continue"], "transitions": {"continue": "conditions_location"}, "on_enter": {"add_item": "veteran_badge"}, "media": [] }, "mission": { "description": "MISSION CONDITIONS: mission_active, mission_complete, mission_failed - track quest states", "choices": [ "start demo quest", "report progress", "complete the quest", "fail the quest", "collect reward", "back to conditions menu" ], "choice_config": { "report progress": { "condition": {"mission_active": "demo_quest"}, "visible_text": "Report progress (active)", "hidden_text": "[No active quest]" }, "complete the quest": { "condition": {"mission_active": "demo_quest"}, "visible_text": "Turn in quest" }, "fail the quest": { "condition": {"mission_active": "demo_quest"}, "visible_text": "Abandon quest" }, "collect reward": { "condition": {"mission_complete": "demo_quest"}, "visible_text": "Collect reward (complete)", "hidden_text": "[Complete quest first]" } }, "transitions": { "start demo quest": "conditions_mission", "report progress": "conditions_mission", "complete the quest": "conditions_mission", "fail the quest": "conditions_mission", "collect reward": "conditions_mission_reward", "back to conditions menu": "conditions_menu" }, "effects": { "start demo quest": {"start_mission": "demo_quest"}, "complete the quest": {"complete_mission": "demo_quest"}, "fail the quest": {"fail_mission": "demo_quest"} }, "media": [] }, "mission_reward": { "description": "Quest reward: 100 gold!", "choices": ["continue"], "transitions": {"continue": "conditions_mission"}, "on_enter": {"add_money": 100}, "media": [] }, "compound": { "description": "COMPOUND CONDITIONS: and (all true), or (any true), not (invert). Can be nested!", "choices": [ "get key and 50 gold", "locked door (AND)", "vip or wealthy (OR)", "not tourist (NOT)", "complex nested", "back to conditions menu" ], "choice_config": { "locked door (AND)": { "condition": {"and": [{"has_item": "compound_key"}, {"money": {"gte": 50}}]}, "visible_text": "Open door (key AND 50g)", "hidden_text": "[Need key AND 50g]" }, "vip or wealthy (OR)": { "condition": {"or": [{"flag": "vip_status"}, {"money": {"gte": 500}}]}, "visible_text": "VIP area (VIP OR 500g)", "hidden_text": "[Need VIP OR 500g]" }, "not tourist (NOT)": { "condition": {"not": {"flag": "tourist_mode"}}, "visible_text": "Locals only (NOT tourist)" }, "complex nested": { "condition": {"and": [{"has_item": "compound_key"}, {"or": [{"flag": "vip_status"}, {"money": {"gte": 100}}]}]}, "visible_text": "Ultimate (key AND (VIP OR 100g))", "hidden_text": "[Need key AND (VIP OR 100g)]" } }, "transitions": { "get key and 50 gold": "conditions_compound", "locked door (AND)": "conditions_compound_ok", "vip or wealthy (OR)": "conditions_compound_ok", "not tourist (NOT)": "conditions_compound_ok", "complex nested": "conditions_compound_ok", "back to conditions menu": "conditions_menu" }, "effects": { "get key and 50 gold": {"add_item": "compound_key", "add_money": 50} }, "media": [] }, "compound_ok": { "description": "Compound condition passed!", "choices": ["return"], "transitions": {"return": "conditions_compound"}, "media": [] } }, "effects": { # ============================================================ # EFFECTS MENU # ============================================================ "menu": { "description": "EFFECT TYPES REFERENCE - Effects modify game state. Select a category:", "choices": [ "inventory effects", "money effects", "flag effects", "counter effects", "social effects", "location effects", "mission effects", "knowledge effects", "return to hub" ], "transitions": { "inventory effects": "effects_inventory", "money effects": "effects_money", "flag effects": "effects_flags", "counter effects": "effects_counters", "social effects": "effects_social", "location effects": "effects_location", "mission effects": "effects_mission", "knowledge effects": "effects_knowledge", "return to hub": "hub_start" }, "media": [] }, "inventory": { "description": "INVENTORY EFFECTS: add_item (single or list), remove_item (single or list)", "choices": [ "add single item", "add multiple items", "remove single item", "remove multiple items", "back to effects menu" ], "transitions": { "add single item": "effects_inventory", "add multiple items": "effects_inventory", "remove single item": "effects_inventory", "remove multiple items": "effects_inventory", "back to effects menu": "effects_menu" }, "effects": { "add single item": {"add_item": "demo_sword"}, "add multiple items": {"add_item": ["demo_shield", "demo_potion", "demo_scroll"]}, "remove single item": {"remove_item": "demo_sword"}, "remove multiple items": {"remove_item": ["demo_shield", "demo_potion"]} }, "media": [] }, "money": { "description": "MONEY EFFECTS: add_money, remove_money, set_money", "choices": [ "add 100 gold", "add 500 gold", "remove 50 gold", "set to 1000", "reset to zero", "back to effects menu" ], "transitions": { "add 100 gold": "effects_money", "add 500 gold": "effects_money", "remove 50 gold": "effects_money", "set to 1000": "effects_money", "reset to zero": "effects_money", "back to effects menu": "effects_menu" }, "effects": { "add 100 gold": {"add_money": 100}, "add 500 gold": {"add_money": 500}, "remove 50 gold": {"remove_money": 50}, "set to 1000": {"set_money": 1000}, "reset to zero": {"set_money": 0} }, "media": [] }, "flags": { "description": "FLAG EFFECTS: set_flag (single/list/dict), clear_flag, toggle_flag", "choices": [ "set single flag", "set multiple flags", "set with dict", "clear flag", "toggle flag", "back to effects menu" ], "transitions": { "set single flag": "effects_flags", "set multiple flags": "effects_flags", "set with dict": "effects_flags", "clear flag": "effects_flags", "toggle flag": "effects_flags", "back to effects menu": "effects_menu" }, "effects": { "set single flag": {"set_flag": "flag_a"}, "set multiple flags": {"set_flag": ["flag_b", "flag_c"]}, "set with dict": {"set_flag": {"flag_explicit": True, "flag_false": False}}, "clear flag": {"clear_flag": "flag_a"}, "toggle flag": {"toggle_flag": "flag_toggle"} }, "media": [] }, "counters": { "description": "COUNTER EFFECTS: set_counter, increment, decrement", "choices": [ "set to 10", "increment by 1", "increment by 5", "decrement by 2", "reset to 0", "back to effects menu" ], "transitions": { "set to 10": "effects_counters", "increment by 1": "effects_counters", "increment by 5": "effects_counters", "decrement by 2": "effects_counters", "reset to 0": "effects_counters", "back to effects menu": "effects_menu" }, "effects": { "set to 10": {"set_counter": {"score": 10}}, "increment by 1": {"increment": {"score": 1}}, "increment by 5": {"increment": {"score": 5}}, "decrement by 2": {"decrement": {"score": 2}}, "reset to 0": {"set_counter": {"score": 0}} }, "media": [] }, "social": { "description": "SOCIAL EFFECTS: add_person (single/list), adjust_reputation, set_reputation", "choices": [ "meet single NPC", "meet multiple NPCs", "increase reputation", "decrease reputation", "set reputation to 50", "back to effects menu" ], "transitions": { "meet single NPC": "effects_social", "meet multiple NPCs": "effects_social", "increase reputation": "effects_social", "decrease reputation": "effects_social", "set reputation to 50": "effects_social", "back to effects menu": "effects_menu" }, "effects": { "meet single NPC": {"add_person": "blacksmith"}, "meet multiple NPCs": {"add_person": ["baker", "guard", "innkeeper"]}, "increase reputation": {"adjust_reputation": {"blacksmith": 5}}, "decrease reputation": {"adjust_reputation": {"guard": -3}}, "set reputation to 50": {"set_reputation": {"innkeeper": 50}} }, "media": [] }, "location": { "description": "LOCATION EFFECTS: add_location (discover), visit_location (mark visited)", "choices": [ "discover single", "discover multiple", "visit location", "back to effects menu" ], "transitions": { "discover single": "effects_location", "discover multiple": "effects_location", "visit location": "effects_location", "back to effects menu": "effects_menu" }, "effects": { "discover single": {"add_location": "temple"}, "discover multiple": {"add_location": ["forest", "lake", "mountain"]}, "visit location": {"visit_location": "temple"} }, "media": [] }, "mission": { "description": "MISSION EFFECTS: start_mission (simple/with data), complete_mission, fail_mission, update_mission", "choices": [ "start simple mission", "start with data", "update mission", "complete mission", "fail mission", "back to effects menu" ], "transitions": { "start simple mission": "effects_mission", "start with data": "effects_mission", "update mission": "effects_mission", "complete mission": "effects_mission", "fail mission": "effects_mission", "back to effects menu": "effects_menu" }, "effects": { "start simple mission": {"start_mission": "simple_quest"}, "start with data": {"start_mission": {"complex_quest": {"objective": "Find artifact", "reward": 500}}}, "update mission": {"update_mission": {"complex_quest": {"progress": 50}}}, "complete mission": {"complete_mission": "simple_quest"}, "fail mission": {"fail_mission": "complex_quest"} }, "media": [] }, "knowledge": { "description": "KNOWLEDGE EFFECTS: set_knowledge (any JSON value), remove_knowledge", "choices": [ "learn boolean", "learn string", "learn object", "forget single", "forget multiple", "back to effects menu" ], "transitions": { "learn boolean": "effects_knowledge", "learn string": "effects_knowledge", "learn object": "effects_knowledge", "forget single": "effects_knowledge", "forget multiple": "effects_knowledge", "back to effects menu": "effects_menu" }, "effects": { "learn boolean": {"set_knowledge": {"secret_known": True}}, "learn string": {"set_knowledge": {"villain_name": "Lord Darkmore"}}, "learn object": {"set_knowledge": {"coords": {"x": 100, "y": 250}}}, "forget single": {"remove_knowledge": "secret_known"}, "forget multiple": {"remove_knowledge": ["villain_name", "coords"]} }, "media": [] } }, "transitions": { # ============================================================ # TRANSITIONS MENU # ============================================================ "menu": { "description": "TRANSITION PATTERNS - Different ways to route between states. Select a pattern:", "choices": [ "deterministic", "weighted random", "random from pool", "conditional if/then/else", "chained conditions", "return to hub" ], "transitions": { "deterministic": "transitions_deterministic", "weighted random": "transitions_weighted", "random from pool": "transitions_pool", "conditional if/then/else": "transitions_conditional", "chained conditions": "transitions_chained", "return to hub": "hub_start" }, "media": [] }, "deterministic": { "description": "DETERMINISTIC: Simple string targets - always goes to same place", "choices": [ "go to result A", "go to result B", "back to menu" ], "transitions": { "go to result A": "transitions_det_a", "go to result B": "transitions_det_b", "back to menu": "transitions_menu" }, "media": [] }, "det_a": { "description": "Result A - deterministic transition", "choices": ["return"], "transitions": {"return": "transitions_deterministic"}, "media": [] }, "det_b": { "description": "Result B - deterministic transition", "choices": ["return"], "transitions": {"return": "transitions_deterministic"}, "media": [] }, "weighted": { "description": "WEIGHTED RANDOM: {random: [[state, prob], ...]} - Try multiple times to see different outcomes!", "choices": [ "roll dice (70/30)", "rare attempt (90/9/1)", "back to menu" ], "transitions": { "roll dice (70/30)": { "random": [["transitions_common", 0.7], ["transitions_rare", 0.3]] }, "rare attempt (90/9/1)": { "random": [["transitions_common", 0.90], ["transitions_uncommon", 0.09], ["transitions_legendary", 0.01]] }, "back to menu": "transitions_menu" }, "media": [] }, "common": { "description": "COMMON outcome (highest probability)", "choices": ["try again"], "transitions": {"try again": "transitions_weighted"}, "media": [] }, "rare": { "description": "RARE outcome (30% chance)", "choices": ["try again"], "transitions": {"try again": "transitions_weighted"}, "on_enter": {"add_item": "rare_drop"}, "media": [] }, "uncommon": { "description": "UNCOMMON outcome (9% chance)", "choices": ["try again"], "transitions": {"try again": "transitions_weighted"}, "on_enter": {"add_item": "uncommon_drop"}, "media": [] }, "legendary": { "description": "LEGENDARY outcome (1% chance)! Extremely lucky!", "choices": ["try again"], "transitions": {"try again": "transitions_weighted"}, "on_enter": {"add_item": "legendary_drop", "set_flag": "got_legendary"}, "media": [] }, "pool": { "description": "RANDOM FROM POOL: {random_from: [states]} - Equal probability for each", "choices": [ "enter mystery door", "back to menu" ], "transitions": { "enter mystery door": { "random_from": ["transitions_treasure", "transitions_trap", "transitions_monster", "transitions_empty"] }, "back to menu": "transitions_menu" }, "media": [] }, "treasure": { "description": "TREASURE! (1/4 equal chance)", "choices": ["try again"], "transitions": {"try again": "transitions_pool"}, "on_enter": {"add_money": 50}, "media": [] }, "trap": { "description": "TRAP! (1/4 equal chance)", "choices": ["try again"], "transitions": {"try again": "transitions_pool"}, "on_enter": {"remove_money": 10}, "media": [] }, "monster": { "description": "MONSTER! (1/4 equal chance)", "choices": ["try again"], "transitions": {"try again": "transitions_pool"}, "on_enter": {"increment": {"monsters": 1}}, "media": [] }, "empty": { "description": "EMPTY room (1/4 equal chance)", "choices": ["try again"], "transitions": {"try again": "transitions_pool"}, "media": [] }, "conditional": { "description": "CONDITIONAL: {if: cond, then: target, else: fallback} - Routes based on state", "choices": [ "set vip flag", "clear vip flag", "try enter club", "back to menu" ], "transitions": { "set vip flag": "transitions_conditional", "clear vip flag": "transitions_conditional", "try enter club": { "if": {"flag": "vip_access"}, "then": "transitions_vip_ok", "else": "transitions_vip_denied" }, "back to menu": "transitions_menu" }, "effects": { "set vip flag": {"set_flag": "vip_access"}, "clear vip flag": {"clear_flag": "vip_access"} }, "media": [] }, "vip_ok": { "description": "VIP lounge! Condition was TRUE", "choices": ["return"], "transitions": {"return": "transitions_conditional"}, "media": [] }, "vip_denied": { "description": "Bounced! Condition was FALSE", "choices": ["return"], "transitions": {"return": "transitions_conditional"}, "media": [] }, "chained": { "description": "CHAINED CONDITIONS: {conditions: [{if, then}, ..., {default}]} - First match wins", "choices": [ "become wealthy (500g)", "become VIP", "become both", "reset status", "check status", "back to menu" ], "transitions": { "become wealthy (500g)": "transitions_chained", "become VIP": "transitions_chained", "become both": "transitions_chained", "reset status": "transitions_chained", "check status": { "conditions": [ {"if": {"and": [{"flag": "chain_vip"}, {"money": {"gte": 500}}]}, "then": "transitions_elite"}, {"if": {"flag": "chain_vip"}, "then": "transitions_vip_only"}, {"if": {"money": {"gte": 500}}, "then": "transitions_wealthy_only"}, {"default": "transitions_commoner"} ] }, "back to menu": "transitions_menu" }, "effects": { "become wealthy (500g)": {"set_money": 500}, "become VIP": {"set_flag": "chain_vip"}, "become both": {"set_money": 500, "set_flag": "chain_vip"}, "reset status": {"set_money": 0, "clear_flag": "chain_vip"} }, "media": [] }, "elite": { "description": "ELITE! First condition: VIP AND wealthy", "choices": ["return"], "transitions": {"return": "transitions_chained"}, "media": [] }, "vip_only": { "description": "VIP only - second condition matched", "choices": ["return"], "transitions": {"return": "transitions_chained"}, "media": [] }, "wealthy_only": { "description": "WEALTHY only - third condition matched", "choices": ["return"], "transitions": {"return": "transitions_chained"}, "media": [] }, "commoner": { "description": "COMMONER - default case", "choices": ["return"], "transitions": {"return": "transitions_chained"}, "media": [] } }, "features": { # ============================================================ # STATE FEATURES MENU # ============================================================ "menu": { "description": "SPECIAL STATE FEATURES - Beyond choices and transitions. Select a feature:", "choices": [ "choice configuration", "on_enter effects", "encounter chances", "return to hub" ], "transitions": { "choice configuration": "features_choice_config", "on_enter effects": "features_on_enter", "encounter chances": "features_encounters", "return to hub": "hub_start" }, "media": [] }, "choice_config": { "description": "CHOICE CONFIG: condition (when available), visible_text (override), hidden_text (locked text)", "choices": [ "always available", "requires key", "requires 100 gold", "get key", "get 100 gold", "back to features" ], "choice_config": { "requires key": { "condition": {"has_item": "feature_key"}, "visible_text": "Use key to unlock", "hidden_text": "[Locked - Need key]" }, "requires 100 gold": { "condition": {"money": {"gte": 100}}, "visible_text": "Pay 100g for access", "hidden_text": "[Need 100 gold]" } }, "transitions": { "always available": "features_choice_config", "requires key": "features_cc_ok", "requires 100 gold": "features_cc_ok", "get key": "features_choice_config", "get 100 gold": "features_choice_config", "back to features": "features_menu" }, "effects": { "get key": {"add_item": "feature_key"}, "get 100 gold": {"add_money": 100}, "requires 100 gold": {"remove_money": 100} }, "media": [] }, "cc_ok": { "description": "Access granted! Condition passed.", "choices": ["return"], "transitions": {"return": "features_choice_config"}, "media": [] }, "on_enter": { "description": "ON_ENTER EFFECTS: Automatically run when entering state. This state increments visit counter each entry.", "choices": [ "leave and return", "back to features" ], "transitions": { "leave and return": "features_on_enter_away", "back to features": "features_menu" }, "on_enter": { "increment": {"on_enter_visits": 1}, "set_flag": "saw_on_enter_demo" }, "media": [] }, "on_enter_away": { "description": "Step outside...", "choices": ["return to on_enter demo"], "transitions": {"return to on_enter demo": "features_on_enter"}, "media": [] }, "encounters": { "description": "ENCOUNTER CHANCE: probability, pool of states, bypass_conditions. 30% chance here (bypassed by safe_passage flag).", "choices": [ "explore area", "get safe passage", "remove safe passage", "back to features" ], "transitions": { "explore area": "features_encounters", "get safe passage": "features_encounters", "remove safe passage": "features_encounters", "back to features": "features_menu" }, "effects": { "get safe passage": {"set_flag": "safe_passage"}, "remove safe passage": {"clear_flag": "safe_passage"} }, "encounter_chance": { "probability": 0.30, "pool": ["features_enc_bandit", "features_enc_merchant"], "bypass_conditions": {"flag": "safe_passage"} }, "media": [] }, "enc_bandit": { "description": "ENCOUNTER: Bandits appeared! (30% chance triggered)", "choices": ["flee"], "transitions": {"flee": "features_encounters"}, "on_enter": {"increment": {"bandits_met": 1}}, "media": [] }, "enc_merchant": { "description": "ENCOUNTER: Traveling merchant! (30% chance triggered)", "choices": ["continue"], "transitions": {"continue": "features_encounters"}, "on_enter": {"add_person": "random_merchant"}, "media": [] } } } } #-------------------------#-------------------------#-------------------------#------------------------- finished_product_demo = { 'village': { 'start': { "description": "You wake up in a small village. You hear a rumor about a lost treasure.", "choices": ['explore village', 'gather supplies', 'rest'], "transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'}, "consequences": { 'gather supplies': lambda player: player.add_item('basic supplies') }, "media": ["testmedia/fpe_small_village.webp", "testmedia/fpe_rumor_about_a_lost_treasure.webp", "testmedia/fpe_gathering_supplies_in_a_village.webp"] }, 'rumor': { "description": "You hear more details about the treasure hidden in the ancient ruins nearby.", "choices": ['decide to go', 'ignore'], "transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'}, "consequences": { 'decide to go': lambda player: player.update_knowledge('treasure location') }, "media": ["testmedia/fpe_rumor_about_a_lost_treasure.webp"] }, 'supplies': { "description": "You gather supplies for your journey.", "choices": ['head to forest', 'stay in village'], "transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'}, "media": ["testmedia/fpe_person_looking_away_Listening_I_cant_hear_you_pose.webp", "testmedia/fpr_person_looking_away_Listening_hand_over_ear.webp", "testmedia/fpe_You_gather_supplies_for_your_journey.webp", "testmedia/fpe_head_to_forest.webp"] }, }, 'forest': { 'forest': { "description": "You enter the dense forest, heading towards the ruins.", "choices": ['travel further', 'return to village'], "transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'}, "media": ["testmedia/fpe_village_start_collage.png", ] }, }, 'ruins': { 'ruins': { "description": "You reach the ancient ruins. The entrance is dark and eerie.", "choices": ['enter ruins', 'return to forest'], "transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'}, "media": [] }, 'explore': { "description": "You explore the ruins, encountering traps and puzzles.", "choices": ['solve puzzle', 'avoid traps'], "transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'}, "media": [] }, 'hiddenPassage': { "description": "You solve a challenging puzzle and unlock a hidden passage.", "choices": ['enter passage', 'go back'], "transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'}, "media": [] }, 'treasureRoom': { "description": "You enter the treasure room and find the treasure chest.", "choices": ['take treasure', 'leave'], "transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'}, "consequences": { 'take treasure': lambda player: player.add_item('treasure') }, "media": [] }, 'celebrate': { "description": "You celebrate your discovery and decide to bring the treasure back to the village.", "choices": ['return to village'], "transitions": {'return to village': 'village_return_return'}, "media": [] }, }, 'village_return': { 'return': { "description": "You return to the village with the treasure and share it with the villagers.", "choices": ['end adventure'], "transitions": {'end adventure': 'end_end'}, "media": [] }, }, 'end': { 'end': { "description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.", "choices": [], "transitions": {}, "media": [] }, } } #-------------------------#-------------------------#-------------------------#------------------------- # Convenience exports for commonly used configs LogicGatesDemo = ExampleGameConfigs.get("LogicGatesDemo", {}) StateSystemReference = ExampleGameConfigs.get("StateSystemReference", {})