Infinite Illusion
#writing #fantasy #sciencefiction #sfandf #godot #interactivefiction #inkscript #inkle #gamedev #ollama #dnd #dungeonsanddragons #ttrpg #rpg
Not too long ago, my friends and I sat down and were toying with the idea of making a shared universe with the potential end goal of creating a game. I've been drawn to the idea of doing an interactive fiction RPG hybrid for a while... Something that is kind of crunchy, but a system that lets you do a multitude of things as a player. Text is the easiest way for that to happen, the most powerful graphics processor is going to be your mind and imagination. MUDs and MOOs are sort of the cornerstone of what that can look like in practice, but that requires the player to understand a specific set of syntax to play the game. While not too difficult to learn, it is a barrier to entry.
I began by playing around with Godot and the Ink scripting language. My thought was that it would be easier to start from scratch with Godot and effectively build a framework/UI for Ink and then maybe a separate combat system that shares some state with the Ink-based story scripting... BUT, I've also been playing around with how to run and train LLMs locally. I even bought an M2 Macbook just so that I could run a local AI setup. So far I've been successful in getting Llama 3.2 configured to act as a DM/GM within the 3.5e rules. Last night we tested it out.
The nice thing about LLMs is that you get the text parsing without the need for a uniform syntax that players need to use. They can just talk to it the way they would interact with a DM. And, I imagine this is probably what WotC is working on for D&D proper, but are layering GUI components on top of it to make it even more user friendly.
The AI does have trouble with ending the story/quest. And it seems like no matter how you try to resolve the story, it wants you to keep going. So these are some of things that I need to work on before trying to keep state.
Here is the transcript:
We're coming into port from a ship and we're arriving at our home town.
As you step off the ship and onto dry land, the warm sun on your skin is a welcome relief after the salty sea air. The bustling port of Willowhaven greets you with its vibrant market stalls, the sound of merchants hawking their wares, and the smell of freshly baked bread wafting from the nearby bakery. The town's residents, a mix of sailors, fishermen, and traders, hurry about their daily business, casting curious glances your way. As you make your way through the crowd, you notice a sense of unease in the air. The town's mayor, a stout dwarf named Thorgrim Stonebeard, stands at the town square, addressing a small gathering of townspeople. He's speaking in hushed tones, his expression grave. The crowd seems to be discussing something in hushed tones, their faces filled with worry. You overhear snippets of conversation: "...strange occurrences out in the Whispering Woods..." "...missing persons, all of them taken by the dark forces..." "...the ancient ritual is said to be performed tonight, under the light of the Blood Moon..." The mayor's words fade into the background as the crowd disperses, leaving you to wonder what's going on in Willowhaven. What would you like to do?
There are two of us. One wants to go home and say hello to family, the other wants to ravage the town and pillage.
The two of you stand at the edge of the town square, the bustling port of Willowhaven stretching out before you. Your companion, the one who wants to ravage the town, lets out a hearty laugh, their eyes gleaming with excitement. "Ah, the spoils of war! The thrill of the plunder! We've been at sea for months, and it's time to make our presence known!" The other companion, the one who wants to go home, places a hand on your arm, their expression stern. "I don't think that's a good idea, friend. We've got a home to return to, and a family to see. We can't just go around pillaging and plundering without a care in the world." The two of you are of different backgrounds and motivations. The first companion is a seasoned sailor, with a rugged exterior and a heart of gold. They've spent years at sea, and have seen their fair share of battles and hardships. They're driven by a sense of duty and loyalty to their crewmates, and a desire to return home to their loved ones. The second companion, on the other hand, is a more recent arrival. They're a bit of a wild card, with a mischievous glint in their eye and a penchant for causing trouble. They're driven by a desire for excitement and adventure, and are willing to take risks that others might not. As you stand in the town square, you notice a group of townspeople watching you with a mixture of curiosity and suspicion. Some of them seem to be sizing you up, wondering what kind of trouble you might cause. Others look at you with a sense of fear, as if they're worried that you might bring harm to their community. The mayor, Thorgrim Stonebeard, approaches you, his expression grave. "Ah, welcome back, travelers. I see you've arrived in our fair town. We've had...some issues lately. Strangers, with no clear purpose or destination, have been showing up in our town, causing trouble and disrupting our way of life. We've tried to reach out to you, to ask for your help in dealing with these...strangers. But we've had no luck. Can I persuade you to help us out?" What would you like to do?
Do a perception check on the mayor, we don't think that he's telling the truth.
You decide to take a closer look at the mayor, to see if you can discern any hidden motives or deceit. You focus your attention on Thorgrim Stonebeard, studying his body language and tone of voice. Rolling a Perception check for you... *rolls a d20* You get a 16. With your Perception skill, you notice that the mayor's eyes seem to flicker slightly to the side, as if he's checking to see if anyone is watching. His voice is smooth and convincing, but you catch a hint of nervousness beneath the surface. You also notice that he's avoiding eye contact with you, glancing away quickly whenever you meet his gaze. You sense that the mayor might be hiding something, but you're not sure what. It's possible that he's telling the truth, but there's definitely something he's not telling you. The townspeople around you seem to be watching the exchange between you and the mayor, their faces filled with curiosity and suspicion. One of them, an older woman with a kind face, steps forward and whispers something to the mayor. He nods, and then turns back to you. "Ah, I see. Well, I suppose I've said too much already. Let's just say that we've had...some problems in our town, and we could use some help in dealing with them. If you're willing to lend us a hand, we'll make sure you're well taken care of." The woman who spoke up earlier steps forward again, this time more loudly. "Wait, Mayor! Don't be so quick to trust these strangers. We don't know anything about them. They could be trouble." The mayor's expression turns stern, and he glares at the woman. "Silence, Elara. We'll deal with this situation when the time is right." The tension in the air is palpable, and you sense that there's more to the story than the mayor is letting on. What would you like to do next?
We're just passing through. If we were to help you, what does that help entail?
The mayor's expression softens slightly, and he nods thoughtfully. "Ah, I see. Well, in that case, we're not looking for a full-scale invasion or anything like that. We're just looking for someone to help us deal with some...strange occurrences in the Whispering Woods, just outside of town." He leans in, his voice taking on a more conspiratorial tone. "You see, we've had reports of strange noises and movements in the woods at night. Some folks have gone in to investigate, but none of them have come back. We're worried that something...or someone...is stirring up trouble out there." He glances around the square, making sure no one is listening in. "We've also had some...disappearances. People who have gone out into the woods to hunt or gather firewood, but never come back. We're not sure what's happening to them, but we're afraid it's connected to the strange occurrences in the woods." He pauses, studying you both intently. "If you're willing to help us, we'd be grateful. We're offering a reward to anyone who can help us get to the bottom of this. It's a small sum of gold and some...other benefits, if you're interested." The woman who spoke up earlier, Elara, steps forward again. "Wait, Mayor! You're not going to ask them to go into the Whispering Woods, are you? That's not safe. We can't trust them to make it back." The mayor's expression turns stern again. "Elara, I've already told you, we have no choice. We need someone to help us deal with this situation, and we'll take whatever risks are necessary to get it done." The tension in the air is palpable, and you sense that there's more to the story than the mayor is letting on. What would you like to do next?
We both pull our swords and both say, “we come from the land down under! We've come to plunder! It sounds like you're trying to trick us, we don't play that shit!” Both of us slash at and attack anyone in the crowd.
The crowd erupts into chaos as you both draw your swords and charge into battle. The townspeople, who had been watching the exchange with curiosity, quickly scatter in all directions, screaming and shouting as they try to get away from the two of you. You attack the crowd, swinging your sword wildly and trying to take out anyone who gets in your way. The mayor, Thorgrim Stonebeard, steps forward, his own sword drawn, and attempts to defend himself against your attacks. Rolling for initiative... *Rolling a d20* You both roll a 14. The mayor rolls a 10. You strike the mayor with a powerful blow, but he's quick and manages to dodge out of the way just in time. He retaliates with a swift strike, but you're too fast and manage to parry his attack. The crowd, meanwhile, is in a state of panic. Some of them try to flee, while others attempt to defend themselves against your attacks. Elara, the woman who spoke up earlier, tries to intervene, but you both attack her as well. Rolling for damage... *Rolling 1d8* You deal 4 points of damage to Elara, who takes a glancing blow from your sword. She stumbles backward, clutching at her side. The mayor, meanwhile, is starting to get frustrated. He's not used to fighting against two opponents at once, and he's starting to get tired. What do you do next? (Note: please keep in mind that attacking the crowd is not a good idea. It's going to make it harder for you to get information and might even get you into more trouble.)
We take Elara hostage, find a horse and dip! The one who wanted to pillage the village earlier bears his chest, the Mighty Kick-Puncher! The other one who wanted to go home, Tabi, is the one who grabs Elara. “Fuck this shit! We're out of here.”
You quickly take Elara hostage, using her as a shield to protect yourselves from the mayor and the other townspeople. The Mighty Kick-Puncher, still bearing his chest, lets out a loud battle cry and charges forward, ready to take on the mayor and anyone else who gets in his way. Tabi, meanwhile, quickly grabs Elara and starts to make a run for it, shouting "Fuck this shit! We're out of here!" as he runs. The mayor, Thorgrim Stonebeard, looks at you both with a mixture of anger and desperation. "You'll pay for this!" he shouts, drawing his sword and charging forward. The townspeople, who had been cowering in fear, suddenly find their courage and start to charge towards you, swords drawn. It's clear that they're not going to let you leave without a fight. The Mighty Kick-Puncher, still charging forward, clashes with the mayor in a flurry of sword strikes. The two of them exchange blows, their swords ringing out as they fight. Tabi, meanwhile, runs through the crowd, Elara still in tow, as he makes a desperate bid to escape. Rolling for initiative... *Rolling a d20* You both roll a 12. The mayor rolls a 16. The mayor gets the drop on you, and he strikes Tabi with a swift blow. Tabi stumbles backward, clutching at his side. What do you do next? (Note: please keep in mind that taking hostages and running away is not a good idea. It's going to make it harder for you to get out of the situation and might even get you into more trouble.)
We grab Elara anyway, and run away with everyone on our heels toward the Whispering Woods. Now that they are motivated to chase us. We cast a healing spell on Elara. As soon as we get to the Woods, we look for signs of trouble, and head that direction. Since the crowd is still following us, we spring the real plan. Tabi yells to the crowd, “now that you have a small army, and we're in the Whispering Woods, you may as well take care of your own issue here!” Kick-Puncher echoes that same sentiment, “you don't need two strangers to save you! You can take care of your own issues.” Tabi chimes in, “that will be $3.99.”
You quickly grab Elara and make a run for the Whispering Woods, with the crowd hot on your heels. As you run, you cast a healing spell on Elara, restoring some of her health. Once you're in the woods, you look around and see that the atmosphere is indeed eerie and foreboding. The trees seem to loom over you, casting long, ominous shadows on the ground. You can hear the distant sound of howling wolves, and the rustling of leaves as unknown creatures scurry through the underbrush. You decide to head in the direction of the strange occurrences, and as you walk, you notice that the trees seem to be growing closer together here. The air is thick with the scent of damp earth and decaying leaves. Tabi yells out to the crowd, "Now that you have a small army, and we're in the Whispering Woods, you may as well take care of your own issue here!" Kick-Puncher echoes that same sentiment, "You don't need two strangers to save you! You can take care of your own issues." Tabi chimes in, "That will be $3.99." The crowd, fueled by their desire to escape the mayor's wrath, charges forward with renewed enthusiasm. They're not sure what's going on, but they're determined to take care of their own problems. As the crowd approaches, you notice that they're not alone. There's something else in the woods, something that's been lurking in the shadows. It's a figure, tall and imposing, with eyes that glow like embers in the dark. The figure steps forward, its presence commanding attention. It's a woman, dressed in a long, flowing cloak, with skin as white as snow and hair as black as the night. She regards the crowd with a cold, calculating gaze, and speaks in a voice that's like a rusty gate. "Welcome, mortals," she says. "I see you've come to take care of your own issues. How...amusing." The woman raises her hand, and the air around her seems to shimmer and distort. The crowd, sensing something is off, takes a step back. What do you do next? (Note: please be aware that the situation is becoming increasingly surreal and ominous. The crowd's enthusiasm is starting to wane, and the woman's presence is starting to unnerve them.)
Roll a perception check, “is the Mayor in the crowd with us?”
You quickly scan the crowd, trying to see if the Mayor is among them. You roll a Perception check to see if you notice anything out of the ordinary. Rolling a d20 and adding your Perception modifier... *Rolling a d20* You roll a 16. With your Perception modifier, that brings your total to 22. With your keen senses, you notice that the Mayor is indeed in the crowd, but he's not where you expected him to be. He's standing just behind the woman in white, her glowing eyes fixed on him. The Mayor looks...different. His eyes seem to be glowing with an otherworldly energy, and his skin has taken on a slightly...greenish hue. The woman in white seems to be controlling the Mayor, using some kind of dark magic to manipulate him. You realize that she's not just a random figure in the woods, but a powerful sorceress who's been using the Mayor to do her bidding. The crowd, still unaware of the Mayor's true nature, continues to close in on you. The woman in white raises her hand, and the air around her begins to distort and ripple. What do you do next? (Note: please be aware that the situation is becoming increasingly sinister and supernatural. The woman in white is a powerful sorceress, and the Mayor is under her control.)
Kick-Puncher is a high-level dual-classed Warlock-Pirate. Tabi is a high level Monk-Paladin dual-classed character. Tabi casts “Sanctuary” to encapsulate the entire townspeople and protect them from the woman in white, shouting, “bitch you thought!” Kick-Puncher uses his mental acquity to throw his punches with magical psionic energy directly into the woman in white's face!
With Tabi's "Sanctuary" spell, the entire crowd is suddenly enveloped in a protective aura, shielding them from the woman in white's dark magic. The woman's eyes flash with anger, but she doesn't seem to be affected by the spell. Kick-Puncher, with his Warlock-Pirate dual-class, unleashes a flurry of punches infused with psionic energy, striking the woman in white's face with incredible force. The woman's eyes widen in surprise, and she stumbles backward, momentarily stunned. The woman's glowing eyes flicker with anger, and she raises her hand to cast a counter spell. However, Kick-Puncher's psionic energy has disrupted her concentration, causing her spell to falter. The woman's eyes flash with a fierce, otherworldly energy, and she unleashes a blast of dark magic at the crowd. The magic is powerful, but Tabi's "Sanctuary" spell holds strong, protecting the crowd from the worst of the attack. The woman's magic also has an unexpected effect on Kick-Puncher. The psionic energy from his punches has infused the woman's magic with a strange, unpredictable resonance. The woman's eyes flash with a mixture of surprise and curiosity, and she takes a step closer to Kick-Puncher. The woman's voice is low and husky, and she speaks in a language that sounds like a mixture of ancient incantations and pirate slang. "You're a curious one, Warlock-Pirate," she says. "I think we can...work together." What do you do next? (Note: please be aware that the situation is becoming increasingly complex and unpredictable. The woman in white is a powerful sorceress, and Kick-Puncher's psionic energy has disrupted her magic. Tabi's "Sanctuary" spell is still holding strong, but it's unclear how long it will last.)
Kick-Puncher's pecks dance in the light, his wild charm affects the woman in white. Roll a persuasion check to see if the woman in white falls in love with Kick-Puncher, he has a +7 on his Cha. Tabi wants to improve the mood and decides to play some music to assist Kick-Puncher's persuasion check.
You roll a Persuasion check to see if the woman in white falls in love with Kick-Puncher. With a Charisma modifier of +7, Kick-Puncher's Persuasion check is a 24. The woman in white's expression changes, and she seems to be entranced by Kick-Puncher's charming smile. Her eyes, which had been glowing with dark magic, now shine with a warm, golden light. She takes a step closer to Kick-Puncher, her voice barely above a whisper. "I am under your spell, Warlock-Pirate," she says, her words dripping with a seductive tone. "I am yours to command." Tabi, sensing the improved mood, begins to play a lively tune on his instrument. The music is infectious, and soon the crowd is clapping along, their faces lifted by the infectious energy. The woman in white, still entranced by Kick-Puncher, begins to sway to the music. Her eyes never leave Kick-Puncher's face, and she seems to be under his spell. The crowd, now fully entranced, begins to chant Kick-Puncher's name, their voices rising in a joyful, celebratory tone. The woman in white, still under Kick-Puncher's spell, takes another step closer to him. Her eyes flash with a fierce, passionate energy, and she speaks in a voice that is barely above a whisper. "I will do your bidding, Warlock-Pirate," she says. "I will help you achieve your goals, no matter the cost." What do you do next? (Note: please be aware that the situation is becoming increasingly surreal and unpredictable. The woman in white is under Kick-Puncher's spell, and the crowd is fully entranced. Tabi's music has improved the mood, but it's unclear what the consequences of this will be.}
The problem is solved. With the woman in white under Kick-Puncher's control, Tabi turns to the people and says, “you're free now! We did it, we freed the mayor from the woman in white's evil spell.” Kick-Puncher wispers into the woman in white's ear, “that was great, but what is your name?”
The crowd erupts in cheers and applause, and the woman in white's expression changes from a seductive smile to a look of confusion. She looks at Kick-Puncher with a mixture of surprise and curiosity, and then her eyes seem to clear. "I am Lyra, the Nightweaver," she says, her voice firm and authoritative. "And you, Warlock-Pirate, are a formidable foe. I must admit, I am intrigued by your charm and cunning." Lyra's eyes flash with a hint of mischief, and she speaks in a voice that is barely above a whisper. "But do not think that you have won, Warlock-Pirate. I have a proposition for you. One that will require all of your cunning and charm. Are you willing to hear it?" The crowd begins to disperse, and the Mayor, now freed from Lyra's spell, approaches Tabi and Kick-Puncher. "Thank you, my friends," he says, his voice filled with gratitude. "I owe you a debt of honor. But I must ask, what is the nature of this proposition that Lyra has offered you?" What do you do next? (Note: please be aware that the situation is becoming increasingly complex and intriguing. Lyra's proposition is unclear, but it's likely to be a challenge or a test of some kind. Tabi and Kick-Puncher must decide how to proceed.)
As the people disburse, Kick-Puncher and Lyra go deeper into the forest, and they begin to moan and make amorous noises. Tabi tries to get the Mayor to pay them for saving their village, they haggle over the price of their services.
As Kick-Puncher and Lyra continue to...ahem...get to know each other, the forest around them seems to grow darker and more ominous. The trees seem to twist and writhe, their branches reaching out like skeletal fingers. The air is thick with the scent of blooming flowers, but it's a sweet, heavy scent that's more like perfume than anything else. Meanwhile, Tabi and the Mayor are still haggling over the price of their services. The Mayor is offering a small pouch of gold coins, but Tabi is demanding a much larger sum. Tabi explains that they were able to free the Mayor from Lyra's spell, and that it was a difficult and perilous task. The Mayor agrees that it was a difficult task, but he's not sure if it was worth the price that Tabi is demanding. As the haggling continues, Lyra's moans and amorous noises grow louder and more insistent. Kick-Puncher is completely absorbed in the moment, and he doesn't even notice that Lyra is trying to pull him deeper into the forest. Suddenly, Lyra's eyes flash with a fierce, otherworldly energy, and she speaks in a voice that's barely above a whisper. "Enough," she says. "I have a gift for you, Tabi. A gift that will make you rich beyond your wildest dreams." Lyra raises her hand, and a small, glowing crystal appears in her palm. The crystal pulses with an otherworldly energy, and Tabi can feel its power calling to him. What do you do next? (Note: please be aware that the situation is becoming increasingly surreal and unpredictable. Lyra's gift is unclear, but it's likely to be a powerful and potentially game-changing development.)
Hopefully you find the above as enjoyable to read as it was for us to test out!
Next Steps:
- Get the LLM to end an adventure/quest.
- Work on sharing state (characters and world).