Saturday, July 21, 2018

The Story Thread System

It's about time...

Hello everyone, it's finally time to go into a little more detail on what the story thread system is, what it means for game play, and how it'll work! Before I dive in, I figured it'd share a couple updates. 

First, the obvious one: the website is seeing some pretty significant changes. While not horrible to the point of being unusable, it was pretty bad... A lot of it was my fault, simply from rushing to get things set up. The new site is significantly more light-weight, and should work much better than before. I'm transitioning the blog to be hosted on blogger, with a display of the recent posts on the website. This will enable some better features for posts, particularly when it comes to search and labels. It also will help with the bandwidth issues that seemed to happen during spikes of activity (usually after a post/release). 

Getting all (200+!!!) blog posts transitioned over will take a little time. It's fairly easy and straight-forward, just tedious. Aside from working on the website during this vacation, I've also been doing some more work on the AI as planned. It has been difficult to stay within the four hours-per-day time lime limit I set for myself during this break, but it has resulted in me feeling better physically in addition to some extra creativity. 

Story Threads

The idea for story threads came to me when considering the issue of how NPCs can seem very shallow unless they have their own unique story. In RPGs, it's usually just certain special NPCs that have any sort of story, while the rest just follow a basic schedule and emit a line of dialog when prompted, usually from a random pool. The TES Skyrim "arrow to the knee" meme happened because one of those random lines of dialog was rather noteworthy, so it was quite odd when everyone and their uncle was shot in the knee.

When you have all custom characters, you can write their content in a way that gives them the feeling of depth. You can take time to change their content with the time frame of the overall story, and do some neat things. Unfortunately, this is a very time-intensive approach. Games that use this approach can be quite compelling, but often feel somewhat "empty". The Mass Effect series for example used custom characters quite well, but still suffered from having supposedly busy areas feel quite empty or lifeless. 

The opposite is having no custom characters, but populating a world full of people that have schedules and other tricks to make the locations feel lifelike... but the dialog is often quite shallow, and many NPCs pull from simple pools of dialog or say the same thing for the entire game. 

Most games of course use a combination, some "real" characters mixed with the very simple background cast. 

I want to bring Appletree to life

However, it's totally infeasible to write custom stories for ALL the NPCs. Even attempts where certain traits change a few behavior items really fall short of the mark, as most NPCs end up feeling essentially the same with that approach.

Most H-games go with the approach of having a small cast of custom characters, and perhaps a few random background characters. This doesn't really work for a life sim type game. Thinking about all the tabletop RPG games I've DMed for over the years, I realized that the trick DMs use to bring their worlds to life could work quite well in a game. The issue comes down to player agency, and how the characters the player choose to interact with can't be simple one-line NPCs. 

Given that the NPCs have detailed procedural generation to make them unique, and AI to give them something of a personality, they are quite similar to how generic NPCs in a D&D game would be run. The trick is to give them depth of character, a story, when appropriate. In a D&D game, the DM can think up a story on the spot, or perhaps draw from a set of nameless "characters" set aside for just an eventuality. For some reason when the players get attached to a local wench at the tavern, and want to bring her along as "a travel ho for stress-relief purposes" you can roll with it. (Yes, this actually happened in one of my games.)

Because we have detailed information on the NPCs thanks to the procedural generator I built, including a whole set of background information like number of siblings, parents, wealth, job, marriage(s) etc. we really have the information we need to give these characters story... 

So in comes the concept of the story thread. We have a piece of background story, say something about a brother or sister, or how they like their job, or how they are their uncle's son. By itself, it's just a little tidbit of detail. But put together with other threads, we "weave" a story for the NPC. We sprinkle those bits of story into dates and other events as you get to know them. The story thread system is what connects the threads to the characters.

How it Works

We create a bunch of story thread objects. Objects are a recurring theme in this project. :D It allows for more to be easily added in development, and by players. Each thread has information on the group it fits into (such as early life, school, past relationship, etc.) and also has some checks to see what sort of NPC background fits. This may be that the character has to have, or can't have, certain attributes or background values. They also contain a simple summary of the information they contain. (for menu / character display purposes)

We create a bunch of these threads. Some of course are fairly normal, some erotic, some odd or dramatic. Story threads also include general opinion items and things relating to current events, though these tend to be more constrained in terms of possibility. I'm planning to try and commission writing, and hold contest-type things to help expand the total pool. This will really improve the replay factor with the game, and help increase the uniqueness of each character. 

When it's time for some story reveal, a random story thread that matches the group for the reveal, and the NPC doing it, is "pulled from the deck". We don't just assign threads to characters when they are created, because of this deck of cards concept. A stranger you meet doesn't reveal their whole life story when you first meet. On a date maybe you learn a thing or two about them. This allows us to pull threads from the deck (and not reuse them) as they are needed. This maximizes the uniqueness of the characters on a play-through. If we run out of cards, we shuffle the discard pile and start over.

Things that you learn about a character will be viewable in their character profile, for example "Bob Jones: product of incest" because each thread relates to a small part of the whole, characters are going to have unique overall stories, though with enough time and socialization you'll see an individual thread again.

Because threads are based on the NPC's background and personality information, they'll generally line up with the type of character they are. Unique "fixed" NPCs such as Lily and Toby have fixed story threads that don't change, but the majority of characters--semi-random such as the pharmacist, and fully-random--will use random story threads that give them a unique story that matches their data.

The end result

The story thread system is sort-of the counterpoint to the AI and personality core. The latter makes them behave a certain way programatically, while the former provides the story that matches that behavior. Together they allow us to have a town like Appletree populated with NPCs, and have those NPCs be capable of interesting interaction and engaging in things like romance or friendship with, despite just being a random cashier at Hole Foods.

It should be obvious that we still won't have a real world to play in, but the idea is creating one that feels much more real than what we've seen in the past. 

Like many things I've done for AW thus far, or plan to do, it isn't the easiest way to do things. Making things expandable and modifiable adds considerable work, for example, over simply coding things to behave a certain way. In the long term though, that pays big dividends in adding content and play value. Story threads in particular are something I feel are really going to add a lot to AW, because interacting with NPCs (be it sex, friendship, romance, or coworker rival) is such an important part of a game like this.

Slut

I'm told this is Swedish for fin.
I think I've went well over my time-limit for the day, but I'm glad to be able to share the story thread system with you. It's one of the more innovative parts of AW, so I'm really looking forward to seeing it in action!

I'll be back in a few more days for another post, I'm still planning a release as normal at the beginning of the month. Until then, ciao o/

No comments:

Post a Comment

The Springtime Release v1.26

This summary is not available. Please click here to view the post.