Showing posts with label game design. Show all posts
Showing posts with label game design. Show all posts

Monday, July 21, 2014

A Soft Touch

This is how you make adaptive NPCs that are actually fun for the player to interact with long-term.

...

I want NPCs that change based on what the player does. Not on linear character arcs, but in a living, breathing world. And I've created a lot of systems to do that, created a lot of prototypes.

The problem is that the more complex an NPC is, the more opaque everything is. In theory it's fun to have a very nuanced NPC reacting to the player's actions over time, but in practice it's impossible to tell what's going on.

So let's throw out the idea of a personality.

The NPCs have no personality. They have no internal tendency towards one thing or another, behaving one way or another.

Despite that, we're going to have the player absolutely convinced that not only do they have a personality, they have meaningful interactions and grow in meaningful ways.

...

The secret is board games.

While NPCs don't have a personality, they do have a lot of situations they are in. This NPC is ill. This NPC wears mod clothes. This NPC has a kid. Regardless of where they are physically, those sorts of things shape their behavior. This creates their personality.

The key to making all of thing interesting is to accept that we're not modeling a person, we're modeling a piece of the world. We're modeling a complex and slowly evolving situation.

Anna is a parent. However, it's not a check box. It's a mistake to simply tick "is a parent" and then rely on Anna's personality to determine what sort of parent she is. Instead, Anna's parenthood is a board game where she and the kid go in endless loops. Which loop she's on, which loop the kid's on, what the tile says to do today... that's what we mean when we say "Anna is a parent".

Anna wears mod clothes. What we mean by that is that Anna wears the same kinds of clothes in an inertial loop. Each day she wears clothes, she stitches those in as tiles on her board, into the future. She proceeds down a track of her own making, and each tile is a reference to something she's worn before. She'll try to wear something similar, now that she's landed on it.

Anna is ill. In addition to screwing up her stats, the illness has a board game layout full of forks and loops. You can tell exactly what is going on with Anna's illness, because it is proceeding down this layout. Medicine can change the statistical penalties. Medical care can change whether you go left or right at this next fork.

This method of representing someone's personal life is flexible and powerful, but most importantly it is easy to understand.

No matter how many things affect an NPC, if each of them is a game board, the player can clearly see what is happening.

The only problem is that there are a lot of game boards. Not three - dozens. At the very least, every relationship between two people is its own game board.

Now the issue is which game boards matter, when.

...

There are three kinds of "mattering".

One is when an NPC is directly involved with the subject of the game board. For example, if Anna is talking to her kid, Anna's status on parental game board will strongly influence her behavior. When Anna buys more clothes, Anna's track record will strongly influence her choices.

This is very simple, but doesn't really give the characters a personality. Their personality arises from mixing their various concerns together.

The latter two kinds of mattering help to mix these things together, and they serve to create a personality the player can both understand and get interested in.

The second kind of mattering is "resonance".

When you and your target have similar boards, you can compare your positions on those boards. Anna is married to Bob. They are both parents of the same kind. If Anna and Bob are talking, they may talk about their parenting, because they both have a parenting board. They can compare: oh, little Jimmy likes you better than me, oh, I grounded him, oh, I keep telling everyone how great a kid he is...

This can also be used to compare paths between the two positions. "Little Jimmy likes you better..." (calculate path) "Well, you could try helping him on his homework, that might (cause him to go left next time instead of right)". Or (calculate path) "Well, it can't be helped (there is no path from there to here)".

This resonance works fine for all kinds of boards. Compare clothes. Compare illnesses. You can even compare friendships, although there are likely to be so many of that board it should probably be exempt to keep every conversation from being about friendships.

There are a few things that weight when you bring boards up. For example, the further "behind" someone is on their board, the less likely they are to try and compare.

The third kind of mattering is "proximity".

We can't quiiiiite talk about that yet, but soon.

...


Every board can be queried for the categories of actions it recommends. That query takes a lot of arguments, so the board can be pretty adaptive. For example, Anna and Bob are married. The kinds of activities the board will recommend are obviously going to be completely different based on whether Anna is with Bob or with some other guy, and whether Anna is outside at noon or in bed at midnight.

The board is always ready to give its advice, but the NPC is going to ignore that advice much of the time. For example, if you have a kid, the board is probably going to recommend you behave yourself, don't swear, and be a good example for your kid.

If your kid isn't around, you can ignore that.

That's because the NPC only cares about a board based on proximity. So if your kid is at school, you might swear like a sailor and watch TV in your underpants. If your kid is at your side, the board's suggestions are a lot more important all the sudden. And, of course, there's a whole range between.

It's the range inbetween where things get complex and interesting.

First off, there is a percentage of actual concern. The board will tell you how much you personally believe that you should actually be a good example for your kid even when your kid isn't around. That will depend on where you are on the board, rather than on any personality you might have. The parenting board has many loops of different quality, and each loop has its own rating for that.

Between the "actually care" percent and the "actually need to" percent is the "would like to if I can get away with it" percent. That's where the swearing softly lies: as long as your kid isn't affected (can't hear), there's no problem with swearing. Right?

This is a meaty region. The interplay of "actually care" and "need to keep up appearances".

If you actually care, then your personality will be "swear less, behave better" - you'll be a goodie two-shoes. If you care too much, you'll be an annoying nanny figure telling other people to stop swearing. It's the same if you're a kid, of course - behave well in front of your parents... or behave well everywhere?

It's not binary. You want to actually behave like a role model maybe 25% worth, and you need to keep up appearances 75% worth. That doesn't make you 75% sleazy. It makes you 75% "behave appropriately" - behave well in the situations that call for it, and don't let your personal activities screw up your kid. That's pretty good!

Now consider Anna and Bob's marriage.

Obviously, the marriage will tell Anna and Bob to only get romantic with each other. But... how much of that ends up being "I really only want to sleep with my spouse" and how much of that is "I need to keep my spouse from finding out"? It can be hard to tell, and it can evolve over time as their positions on the board of marriage change.

This also gets complex because the "keep it from affecting X" is complicated. Consider this: your kid is very sick, and you're trying to get the doctor to treat him. If the doctor is being reluctant, you may find yourself swearing at him. In theory the parent board says you shouldn't swear in front of your kid (most of the time), but that's overridden, a minor concern next to the massive "protect!" imperative. It's just that your "protect!" imperative doesn't normally have much to say.

Also, consider someone threatening to tell your kid or your spouse something about your behavior. What if your sister says she's going to tell your kid you swear like a sailor? Well, that's a rather minor issue. It'd be better if she didn't, but as tiers of infractions go, swearing is a pretty minor one. On the other hand, if your sister says she'll tell your kid that you killed a cop, that's... a bit more serious.

So there are hooks for playing cover-up.

...

The point of this system is to make it the most interesting experience possible for the player.

Everything is pretty easy to understand. Even if you don't know precisely what an NPC has been up to recently, you can look at their position on the board and see where they must have come from. You can see where they are going, and perhaps persuade them to do something to change how things will evolve.

You can change their situation, and in doing so change how they act and react. The situation can evolve in big ways, sure - a kid could get kidnapped, or a house could burn down - but you can also evolve the situation in small ways. Push someone's token just one step further on one board. Convince them to try to get along with one person for one day. Tiny details that can change the flow of the future - and you can see how.

Moreover, there's room for mods.

Each personality element is a situation represented by a board. Adding more boards is relatively easy - just create a new situation or category of relationship, and the board simply runs. No problems. You want to add in a mentor/pupil relationship? No problem. You want to add in a "werewolf" "illness"? No problem. You want to upgrade the fashion system to a more complex board rather than a pattern of repeating clothing decisions? No problem!

"But how about making the game interesting?"

The key there is to set things up so there is tension. This arises naturally from the way each board calls for specific behaviors and responses that interact with other boards.

For example, Anna and Bob have a kid, and they're all in pretty good relationships. However, times are rough - their job boards are languishing, which means their household board is staggering around, taking the bad loops because the cash requirements aren't being met.

This is already interactive, but the situation is a little bit more interactive because the parental boards demand Anna and Bob protect their kid and serve as good examples. This means they attempt to downplay how difficult a time they have, and keep debt collectors from encountering their kid.

That's already a pretty interesting situation to drop the player into, either as a third party or as one of the three family members. It's adaptive - it's possible for you to improve the situation in various ways, or hammer away at the cracks if you're a vile person.

However, the overall scene is also set.

Little Jimmy has a classmate who is very rich and not very nice - makes fun of Jimmy for having crappy parents. Jimmy, as a child, has a "defend" requirement in his child board, and beats the rich kid up. Drama is born!

But why does the rich kid make fun of Jimmy?

Resonance. The rich kid and Jimmy both have a household board. The rich kid compares them as part of standard operation: "my parents are doing soooo much better than your parents and (path search) your parents will NEVER be as rich as mine!" The scale of the insult is pretty high, and Jimmy's response is also scaled appropriately.

The idea sounds good to me.

As a way of building worlds, it's an easy way to make a compelling world that creates ongoing life stories.

As a way of allowing players to participate in that world, it's crystal clear without being simplistic, and well-chosen small actions can have a long-term effect.

As a way of modding, it's easy to add more options!

Anyone read this far?

Wednesday, July 16, 2014

Species in Not-Star-Trek

While designing my not-Star-Trek game, I needed to design some species.

Designing sci fi species is always an interesting challenge because it is constrained by the nature of the setting. Trying to come up with something interesting and avoiding stereotypes is fun.

My game, being lighthearted, can design species lightheartedly. This is a big advantage.

Since it's Not Star Trek, the species are all humanoid and largely based on Star Trek tropes. It's important that we are all humanoid so I can reuse body assets instead of having species-unique assets. The "funny-shaped-head" is valuable because the high angle focuses on the character's heads.

Each species has a species trait that affects how it socializes as part of a crew, and within each species there are a variety of personalities for individuals which change the flavor of their socialization.

Right now, the species I'm thinking of are:

HUMAN
Newcomers to the interstellar arena, humans are mostly known for their obsession with secrets. They want to be the galaxy's information brokers, but in truth they are just big gossips. Humans generate a resource known as "gossip", which can be transformed into drama by hanging out with others in the canteen. (Drama can only be generated during plot events if humans are not around.)

Human personalities include shouty, beguiling, chatterbox, curious, etc.

SPACE ELF
Space elves are an older, more mature race with a more mature demeanor. While most races think of them as extremely dull, oppressive bureaucrats, humans like them because space elves gave the humans a crap-ton of technology. A space elf can turn loneliness into inspiration by hanging out in the library.

Space elf personalities include stodgy, cold, overanalytical, observant, etc.

ONION
Onions are a young species that joined into the Star Collective because they were convinced it would be interesting. They were too young to realize that space elves are the most boring species anywhere. Still, they keep a cheerful face: onions generate a resource called "cheer", which is automatically substituted into any social resource conversion when an onion does not have enough of the required resource.

Onion personalities include cheerful, heroic, passionate, etc.

ROBOMAN
Robomans are synthetic humans created by the space elves as a test run for creating the Star Collective with humans. They aren't very good at being human, but they are very strong and clever. Robomans have extremely high physical and mental stats, but can only generate one social resource at a time, instead of all of them at once. You can change which gets generated at any time.

Roboman personalities include wannabee human, simhuman, "Danger Will Robinson" robot, logical, etc.

Anyway, each of these has their own unique head decoration for use with the tiny pixel view, so they should be easy enough to tell apart even though they all have the same shared body sprites (different builds are available, but not species-specific builds).

Monday, July 14, 2014

Driving Complex Arrangements

Games where you build things rely heavily on the complexity of building things. Constructed objects are placed relative to each other and serve various roles.

Adding depth to the game usually features either adding physics or adding a chain of resources. Physics is much more interesting because it allows for the player to really come up with unusual solutions and makes even small changes to the construction matter a lot. Chains of resources are useful mostly because they are a very easy way to add complexity - it requires very little balancing or assets, and can also easily be added by mods.

I've been thinking of another method, though.

What I really like is machinery that moves and does stuff.

It's a bit difficult to make physics about moving pieces, because fundamentally the most useful machines to deal with physics challenges are stiff things with a few wheels or jets or whatever, not something that changes. Similarly, a tiered system doesn't normally require any movement, just more things placed cleverly.

You can force them to require machinery by changing how things interact and proceed. For example, if you have to change from plane to boat to space ship, you can create a game where that's best done by mechanically moving things around. However, that's simple "hiding and exposing" - the mechanical version of turning things on and off.

You can make a tiered system require mechanics by having to move either the resource in question or the processing units manually. For example, if you're creating a robot, but you have to dunk the chassis in coolant every few steps to keep it from melting, you have a lot of freedom as to how to do that. You could create a long track with all the construction arms and occasional pools of coolant, or you could just have a single pool of coolant that the chassis gets dunked in over and over, while the construction arms revolve in to do their work.

This gets especially interesting if the player can choose the robot's specs and they make the construction method vary, because then there is no "best".

This seems like an interesting way to do it, but the idea of "heat" that needs to be "dumped" made me start thinking about the idea of side effects creating mechanical play.

For example, let's say you're putting crew in a space ship. Your first order of business is making sure to assign crew to each station, so the space ship runs. The crew gets tired, though, so you build bunks and set the crew up on a schedule to sleep and work. The crew gets lonely, so you set up a schedule where they hang out in the canteen together.

The point isn't to play The Sims in space. These things - loneliness, exhaustion, hunger, and whatever else you put in the game - they aren't simply negatives to be deleted. They are a resource.

Removing loneliness generates camaraderie, which can be used to trigger crew events. Removing hunger generates waste, which can be used to grow plants or processed into biofuel. And so on.

Introducing different species into your ship can add a lot of complexity to this if we would like to. For example, camaraderie might come in a number of flavors, which can be mixed in specific amounts to produce diplomacy points, which can be used to trigger international events.

Allowing for flavors and advanced mixing allows for players to set up an almost unlimited variety of setups, with no obvious "optimal". Maybe someone creates a crew and ship that are engineered for optimally triggering international events as fast as possible. Another might be focusing mostly on science production, but carefully save up the rare flavors to trigger an international event now and then.

This sort of game would allow for a very "Star Trek" feel, but with a mechanistic backend. The ship components don't move, but the crew are constantly in motion. Building your crew (at least, your command crew) would be interesting. Their skill sets obviously matter, but so do their fundamental ways of life.

Anyway, that's it. A tired Monday essay.

Friday, July 11, 2014

Density

I've been struggling to talk about density of space in games. Here's my latest attempt!


What's Density?

There are a lot of ways to measure 'density' of space. How far you can see, how quickly and freely you can move, how many enemies are around, how many resources, how many NPCs.

But I find these are all proportional. If you can see further, then you can move more quickly/freely and there are fewer encounters per square meter. Similarly, if you are stuck in a cramped little maze, you can't see very far, you don't move very freely, and there are more encounters per square meter.

These things vary over the course of a level. That's the heart of good level design. Here's a huge area with a ravine you can't cross, a monster closet, an area with a bunch of resources clumped up. However, if you average all the variations together, you'll find that the level revolves around a specific density, and all the different elements that can be used to measure density all reflect that choice.

Because of that, we can really use any of these things as a measure of density. We don't have to painstakingly consider them separately.

I'm going to use how the player sees as my measure of density. The more space the player sees at once, the sparser the space is.

Of course, this isn't just camera-view space - it includes HUD popups and overlay maps. If you have a map that's easy to reference, or floating decals showing points of interest outside of your view, then you can see a lot further than your camera view indicates. That means your space is sparser, which means you'll move faster/more freely, and you'll have fewer resources/encounters per meter.

With those assumptions in mind, let's get a bit aggressive with the concept now that it's been laid out.


How Dense is Dense?

When people think about spatial density, they normally think in terms of something like "rooftops are sparse, vents are dense".

They aren't wrong. However, in most games those are outliers, not part of the core experience. You can tell, because if you pretend that vents or rooftops are the point of the game, you can easily see that there would be different mechanics in place to make the game more fun. In most games, rooftops and vents are changes of pace, not distinct levels.

You can see the core gameplay break down in these places. In fact, in most modern games, the vent sequence is guaranteed to not have any enemies in it, since you're too cramped to even fight. Space is too dense to maneuver.

That said, you can get a lot more sparse than rooftops. What about the boat sequences in Windwaker? What about the "lost in the desert" sequences in Quest For Glory 2? You can get very sparse!

The thing I noticed is that you can't really get very sparse or cramped before violent gameplay disintegrates. Violent gameplay is about removing enemies from play, and that fundamentally doesn't work if there are too few enemies. As you get sparse, the gameplay becomes about getting to the few things you think you see, rather than removing them from play.

You can get very dense and still have violent gameplay - old robotron games show that - but there's still a limit. As your movement gets more and more constrained, maneuvering gets tighter and tighter. As density goes up, violent gameplay slowly changes from violence into racing with obstacles. A good example of this is Tempest 2000, which is technically a "violent" game but it's mostly about desperately trying to wiggle from side to side in the tight confines given you.

However, other kinds of gameplay work fine in dense and sparse spaces.

Most games have one core kind of play, and it revolves around a specific kind of density. Density fluctuates from level to level, moment to moment, but the gameplay is intended to work at a specific density and that's the density their levels keep flowing back towards. In contrast, consider Skyrim. It has several largely unrelated kinds of play that allow it to support dense and sparse spaces natively, rather than as exceptions.

Skyrim has three kinds of gameplay that live side by side. It has the violent medium-density-space gameplay - raiding dungeons, clearing bandit camps, fighting dragons. But it also has the low-density gameplay of exploring the world and the high-density gameplay of stealing things from townsfolk.

Each type of space has a different kind of fundamental gameplay, even though they all use the same user interface.

This isn't to say Skyrim is very good at it. Skyrim is notable mostly for this existing at all, not for doing it well. The different kinds of play do not offer meaningfully intertwined reward systems, a heroic character will never see the denser half of the game, and the play balance is completely awful unless you mod the hell out of your game. But it exists!

I think this is the future of open world games.

I look at games like Saints Row or older GTA games (haven't played the new one), and I see games struggling to have multiple densities. You can be on foot, you can be in a car, you can be in a jet. These are obviously trying to see space from different perspectives, trying to change the density of the play. Unfortunately, they don't quite have it figured out. They don't seem to be sure what they actually want.

Being in a jet does change how you see the world, but it doesn't change how the world interacts with you. This means the new sparseness is not a native density, but an exception: it's typical space smeared awkwardly into a jet's visor, rather than a different kind of play supporting that new sparseness at a deep level.

The spaces don't need to clash and feel disconnected, like with Skyrim. But they do have to change.


Let's Talk Gameplay

If we wanted to come up with an open-world game that supports a wide variety of densities, we would need to consider how to link them together.

Let's start stock, with a typical open-world game setting. Rather than fantasy, let's set it in modern times - we'll call this a GTA-like rather than an RPG.

The medium-density setting of the urban environment is what most players are used to. In this environment they run around, jump cars off riverbanks, shoot cops, etc. Basically every GTA clone ever made.

We also need a lower- and higher-density way to play. And, importantly, they have to reflect on each other.

Let's say the high-density space would be places you actually go into. Shops, homes, and the like. In these spaces there wouldn't be very much call for violence - you could shoot a shopkeep and go on a rampage, but there's not any significant reward for it. Instead, these tight spaces are about arranging people and things.

It's about stocking a friend up with beer he likes by putting it on his shelf, or about hooking up some people that have never met each other by introducing them and kicking off a conversation, or its about sabotaging the air conditioning so it gets abysmally hot. It's about the things in this dense space and your inventory, and using them to affect each other. As a key part of this: these aren't quests. It's all open world. Sabotaging an air conditioner always has the same kind of effect everywhere. Putting something on someone's shelf - or taking something from their fridge - registers in the same way even if people have different responses.

Some possible rewards are obvious - you get resources if you steal them, and havok can be its own reward. However, we want our rewards to echo properly, they need to affect the player in other spaces. In this case, a good reward might be whether or not someone will follow you as an NPC if you phone them, and how powerful they will be when they do.

That's high-density.

Low-density, we have a lot of options. We could make some kind of wilderness/outskirts thing. But this is a techie wonderland, so I have two ideas.

The first is drone flying. You can use a drone to wander the city. Unlike wandering as a human, the drone cannot stop and chat - it doesn't even go down to street level unless you want to crash it. Instead, the drone scans for specific people whose phones you've bugged, open wifi networks, and so on. The city is a glowing map of flowing data, allowing you to search for points of interest, tidbits of data to harvest, and track individuals. The city is also large - real city size.

The second option is exactly the opposite: drone evasion. After curfew, drones watch the city. You can't use vehicles - they'll be spotted immediately. Instead, you have to move on foot. Everyone's gone home, the city is much less dense. It's just you and the glowing patterns of light that indicate where the drones can see. Change your gear to change how long it takes a drone to realize you're a person, or how hard it is for street-level cameras to identify you.

These kinds of play can all feed back on each other in relatively interesting ways. Cause a ruckus during the day in medium-density space, and that area will be crawling with cops and drones at night - leaving fewer in the rest of the city. Sneak somewhere at night to hack into security and change what you can see during a drone expedition. Do a good drone expedition to find a weak point in the mafia's defenses.

Normally this would all be scripted missions, but if the play exists, these can be emergent situations. Scripted missions are mostly useful for hiding parts of the game that don't flow well, don't emerge naturally. If our spaces blend together well and support each other, we don't need nearly as much scripting.

This is a pretty conservative kind of design, too. There are a lot of much more out-there designs where the spaces get a whole lot more dense and less dense. A game on a starship where you get stuck in your crew's dreams at night, for example. A camping game where you spend the day hiking and the night trapped in a two-person tent with three other people.

There's lots of options. I just wanted to show you that density goes a whole lot further than most people might think.

Monday, June 30, 2014

XBlaze Etc

So, I decided to try a visual novel out for my morning commute game, and I picked the most recent one: XBlaze. Or XBLA*ZE, whatever. It's by the BlazBlue folks, so I knew that it'd be full of grim dark grimness with grim grim darkness and one joke character.

What I didn't expect is that it would be the most stereotypical thing possible. Literally, it is impossible to cram any more stereotypicality into this game, because every character, every set, every story beat, and every plot point is the most stereotypical rehash of a common trope they could find. Every single character is a fetish stamped on tissue paper, every plot event would have been considered old and tired in 1989.

The format is easy to consume while standing with one hand on a train rail, so I've played it through a fair amount. Nothing has been even vaguely new or interesting.

See, the basic problem with XBlaze is actually the basic strength in BlazBlue.

Arc (the devs) are pretty good at throwing tons of polished stereotypes into a game. In BlazBlue, every character is a stereotype, but that's actually good in a fighting game. You have to know who someone is within 1.5 seconds in a fighting game. So you walk a narrow line: stereotypical enough to identify, but interesting enough to look at that people will remember them later. It's actually advantageous to not have any character development - so all the character "development" is actually just revealing the past to the players. That way the characters don't change over time, and everyone who plays the game will always face the same version of the same characters.

Moreover, a wide variety of instantly recognizable characters means everyone will find someone they are interested in playing. It's the "shotgun" method of character design: put a ton of instantly-recognizable characters in your game and let the player sort out which ones they like. If they dislike 80% of the characters, that's fine: they don't have to play them.

While that's good in a fighting game, that's awful in a visual novel.

Visual novels work in exactly the opposite manner. It's less important that a character be immediately identifiable, and more important that they evolve over the course of the story. Hidden backstories being revealed are common, but it's a way to make the characters behave differently. Since no two players are competing, it's not important for characters to be the same between multiple players.

The selection of characters is also less important, because a player cannot really choose to spend time with one character and ignore another. All the characters are always interwoven. Maybe in a dating sim a player can choose a particular favorite and it will matter, but in a typical visual novel you are always stuck with all the characters. If you only like one of the ten characters that you're stuck with, that's considered 9 fails rather a success.

Fundamentally, Arc took the same approach in their visual novel as their fighting game. They filled their story with a huge variety of instantly-recognizable stereotypes.

Unfortunately, none of them are even slightly interesting.

They attempted to make the characters evolve by applying the standard story for each standard stereotype. For example, the cute robot girl slowly learns human emotions and, I presume, will die while betraying her creators in favor of her new friends in the third act. Doubt I'll play long enough to know for sure, because the robot learning emotions is so painfully standard that it predates robots, and there's no spice in this particular dish.

The hope with XBlaze is that you will find at least one of the story lines to your taste, at least one of the characters. Unfortunately, that's not how stories work. That's how fights work, sure, but this is a story.

A story is much more cohesive. While a reader can technically ignore large parts of the story, that's a sign that a story has failed. Instead, each of the pieces of the story - whether a character, place, or event - needs to contribute to the core of the story.

In a fighting game the core of the game is the fighting. The characters, settings, and events all contribute to the feel of the fighting, giving it a strong flavor and unique texture.

In a visual novel the core of the game is the heart of the story. The characters, settings, and events need to contribute to that.

In XBlaze, the story is theoretically about a pacifist having his worldview challenged by harsh realities.

Having three different kinds of magic does not help the story any - it just allows you to have three different kinds of stereotypical magicians. This is a sacrifice made to enable more characters at the expense of the story.

Having a robot learning emotions could actually be a powerful echo of the story. The robot could go from being a militaristic, violent, order-following machine to being a dedicated pacifist at the same time that the pacifist main character is pushed into fighting. But instead of serving that end, the robot is simply allowed to trundle along their trope's default plot line regardless of the fact that it doesn't have even the slightest bit to do with the core storyline.

You have to balance your characters and how they relate to the core story in the same way that you would balance the character's fighting styles in the fighting game.

What I'm saying is that Arc has misunderstood what a visual novel is.

Friday, June 27, 2014

Context-Driven NPCs

Most NPCs are scripted with a lot of personality. They have character arcs and opinions and a backstory and a romance arc and all sorts of stuff to try and make them interesting.

The problem with these NPCs is that they are pretty oblivious to when they should actively express themselves, and relative to which people and things. If they are active, they tend to run roughshod over other dialog, current missions, and the player's current intentions. Even if they are just commenting in a small way (such as '-5: Lilliana doesn't like you helping magicians') it distracts from the player's intention and simply makes things muddy and awkward.

So most of the time, the NPCs are put into extremely passive roles. They are only allowed to express themselves when the player returns to base and actively seeks them out. This gives them explicit permission to activate and express themselves.

Unfortunately, it also limits how they can interact. They can't interact much with other NPCs, the world at large, or the ongoing central quest. All they can do is sit in a safe little spot and wait for the player to strike up a conversation. This is very awkward and forced at the best of times.

There have been a lot of NPCs I've wanted to spend time with, but these games don't allow you to do so. Sure, you can put them in your party, but they leave their personality back at base. Sometimes they will judge something you do, but rather than being interesting and fun, it blindsides you and leaves you feeling cheated or caged-in.

For example, almost all of the characters in all the Mass Effect games were interesting enough that I wanted to hang out with them. Mass Effect didn't let me. While I could go through their personal character arcs and learn their backstories, it was impossible to simply shoot the breeze. Mass Effect 3 was especially notable for this because many of the shipside conversations ended up being hanging out. You'd talk to Garrus and he'd take you on a drinking-and-skeet-shooting hangout. It was fun.

But it was only once.

I couldn't get Garrus to go drinking with me again. I couldn't get Solus to sing any more songs. I couldn't get Tali to geek out over random pieces of tech lying around in the various places I went. I couldn't get Liara to do psychic hang-outs. I couldn't go bar-fighting with Wrex. I could only march along the scripted course and reach the scripted destination. The only thing I had control over is which person I wanted to see half-naked for 3 seconds.

Even that was, of course, a one-off event.

...

The only times NPCs are active is when you are in one of their personal sidequests.

Sure, they are scripted to respond to events in their personal sidequest, but that's actually only a minor issue. It's easy to script general responses to general events in every kind of scenario. No, the reason they are active in their sidequests is because you have given them implicit permission to be active. By going on their personal mission, you have implicitly stated that you care about what they have to say, at least for the next hour or so.

There's nothing difficult about programming Tali to run up to every significant piece of tech randomly found in the game world, scan it, geek out over it, say random clips of dialog about it. That would have been very easy to program. But it also would have trampled my gameplay, and walking around would have become more like herding children than being on a mission.

The core issue is that Tali has no way to tell whether it is contextually appropriate for her to geek out over something. At any given moment, her running off to geek out could screw up my pre-combat arrangements, or talk over an important meeting, or just be incredibly socially inappropriate.

There are a lot of heuristics you could use to try and keep Tali's commentary reasonable, but the core problem isn't the exact timing or number of her outbursts. The problem is that the game devs can't read the player's mind. Even if you know exactly where all the enemies are and exactly where all the socially constrained areas are, you don't know what the player is thinking. If you were really there, you would: the player's body language and facial expression would give it away pretty quick. But you obviously can't read that through an XBox controller.

The solution is to create a way to give implicit consent.

Basically, you trigger the same kind of "consent to act" that is usually associated with loyalty sidequests.

You need to do this in a way that isn't annoying to the player, and the easiest way to do that is to use it to enhance immersion rather than detract from it. By spending time with Tali on your ship, a counter begins. For the next 30 minutes or so, Tali will be active, happily running around. Afterwards, the context fades and Tali reverts. You can prolong the context - or change it to an even more permissive context - by interacting with her out in the field. The interactions you have available to you depend on the context you've established.

If you've talked to Tali about her pilgrimage, most of your options will be related to that facet of her character - talking about whether something is suitable to send home, or can be learned from, or how it contrasts with home. If you've invited Tali out on a date, then most of your options will be related to that - and she'll spend less time geeking out over tech and more time considering whether you're having fun. And the context can be changed, if you can find the right opportunity.

You can revert faster by changing the context. You don't have to call an excitable Tali over and say "stop it! You're annoying!" Instead, you simply ask her whether she's ready for the mission. This painlessly changes the context from "Tali is important to me" to "Mission time!"

I propose we increase the number of times the player interacts with the NPC while decreasing the amount of time each interaction takes.

The intention is that the player will often "nudge" the NPC gently into a mode which suits the player's current mood and play intentions. As the situation changes, the nudges wear off or the player nudges in new ways. This constant low-level interaction allows the player to enjoy an NPC without getting sideswiped by annoyingly overactive NPCs.

A few things are required to make this work well, though.

One is that there needs to be a reward for active NPCs. For example, if Tali geeks out over a piece of tech, Tali should gain 5 XP or something. A small reward that makes you feel like they are either evolving or useful to you when let off their leash.

Another thing is that you still have tiered relationships.

When you first meet Tali or Garrus or Mordin, you can't simply go "OK let's date and get kissyface". I mean, it's a viable route, but you'll have to establish that kind of relationship by letting them be active while in less romantic contexts. But what kinds of relationships are viable with what ease will vary: Tali's romance route is tough because she will literally get sick if you even touch her. Liara, on the other hand, would probably be very easy to woo - not only does she start right off with a crush on you, but her species is not exactly puritanical.

Whatever relationship you aim for isn't a "final goal", and is instead a "fun place to be". Sometimes that's closer or further from where you start.

...

The last thing is "passive evolution" and "simple judging". Even when not active, the NPCs need to exist. The easiest way to do this is to have them gently react to the player's actions.

However, this is a trap you need to be careful of. In most games "react to the player's actions" translates to "judge her dialog tree choices". This is an obnoxious thing to try to do, because you can't read the player's mind and have no way of knowing why she chose that option. It's also obnoxious because the player often doesn't know it's coming, can't predict it, and can't easily fix the damage it causes. It's just not a great approach.

"Simple judging" is probably a better answer. With this, the characters feel differently about the player inch by inch as the player performs various basic gameplay feats. Most of these should be positive, very few should be negative: hanging out for a long time should make you more friendly and accepting rather than less, even if that person is kind of annoying.

So Liara might respect you more each time you use a powerful psychic attack or kill a psychic in combat. Mordin would like you more each time you used a medpack. Garrus would like you more each time you sniped or used a grenade. Etc.

In a less restricted world, these could be applied to a wider variety of interactions, but I think that's enough talking about it.

That's my basic idea! Small, frequent context shifts under the player's control give the NPCs all the information they need to know about whether they can express themselves, and how.

To be honest, I have this whole big algorithm thing involving nodes and context pipes and crap, but I really don't think discussing a specific implementation will help this essay much.

So I'm done!

Friday, June 20, 2014

Play Echoes

I wrote this essay a while back. The basic idea is that you can save chunks of worldstate, then use those chunks flexibly in context-sensitive applications rather than having to use some kind of natural-language system or whatever.

Then I read this long essay by Ian Bogost about Darmok, the episode about those Star Trek aliens that talked only in references to old stories. He came up with the idea that they are actually talking about process - context-heavy processes stored as references to situations where such things played out before.

Then I read these tweets by Zach Gage, and things started to slowly congeal, like ideas sometimes do.

So, let's start at the end, then I'll describe why it is the way it is.



This is an open-world sci-fi RPG. You can make friends with any NPC, and they can join your team. But the universal translator is only capable of so much, and communication is difficult.

So you create and share memes.

You and Hjilsb are together, fighting against an onslaught of voracious, hopping fungi. Together you best the fungi.

In another game, Hjilsb might gain a "friendship point". Maybe she gains one here, too. But more importantly, in the quiet time later, Hjilsb is talking to others - or perhaps to you - and she does a flumpy hopping fungi impression, then goes "BLEAAAHHH" and fake-dies.

This is a nascent meme. It is a tiny piece of your relationship, your past. It is the part of that sequence of events that Hjilsb remembers most - her personality was most drawn to that particular thing. If she had a different personality, she might have re-enacted the back-to-the-wall gunfire moment, or the fungus dropping from the ceiling in their initial surprise attack, or the flat "whut?" look you gave each other when you first saw them, or the "click-click-" moment she ran out of ammo and you saved her.

These are not simply "oh, we had an event together" markers. They represent a specific start state, progression, and end state that struck that character as personally and emotionally important.

Hjilsb remembers the start state of a goofy enemy, the progression of shooting it full of lead, and the end state of it goofily dying. If she had a different personality, she might remember a different tiny portion of the fight. As the events of the fight stream by, the personality filters for whichever events seem most interesting, and forgets the rest.

At time goes on, that goofy little "bleah!" might fade from use, only a momentary idiosyncrasy. But it could easily become useful.

Yeah, useful.

You can't talk to Hjilsb very well, and she can't talk to you very well. The mocking "bleah!" can potentially stand in for any situation where Hjilsb wants to say "let's kill these idiots". If she remembered the "click-click-" out of ammo thing, she might use that whenever she wants to tell you she's totally screwed. The back-to-the-wall blammies could be used to say "we can do this if we do it together".

Because the personality algorithm chose these events to remember, the personality algorithm knows what sort of situations echo it: the ones that have the same algorithmic response, or are predicted to.

You can use the memes yourself. Once you see the silly "bleah!" you can use it as an emote yourself. Hjilsb knows what the emote means to her, so she assumes you are talking about the same situation. You can use this not simply to establish camaraderie, but to actively change her thinking about a situation. After all, it's hard to be scared when your boss is making fun of the enemy.

There's no reason the "bleah!" emote can't be used to other NPCs as well, although it may not translate well into all personalities.

There's no reason the emotes can't be used on other PCs. There's no reason the emotes can't be used in constructed challenges or quest lines to specifically tint content so an NPC will judge it in a given way.

What's more, there's no reason that the "bleah!" emote has to continue to represent stupid jumping fungus.

Every time a similar situation comes up, Hjilsb won't create a similar emote. She already has a response to dumb-looking creatures getting shot, she doesn't need a new one. She just adds it to the mix, with a sly sideways glance at you and a "BLEAH!"

A new starting state, a new progression, and a new end state added in. Not just hopping fungus, but also purple wombats and big-eared mouse-mecha.

Why keep track? Why does it matter?

Because each progression adds more vibrancy and variation to the meme. If you decide to use the "bleah!" meme when constructing a quest line for your friends, the quest will vary from instance to instance, each time choosing a different flavor out of the giant roster of "bleah!" instances. Not necessarily different monsters or guns or whatever, but a different exact progression, or exact numerical value.

And if "bleah!" happens on a mission that another player is experiencing, his NPCs will use the "bleah!" emote, and it will spread to his game. Creating a shared reality, without any shared content. And when he goes to the forum, or records a YouTube video, "bleah!" will be there, too.

...

Now, what am I talking about?

Well, for starters, I'm not actually recommending that game design. It's a bit clunky. I just wanted to be clear what we're talking about.

The kind of... meme-like thing we're talking about is not exactly a process, nor is it solely a stored context, nor is it simply a feeling, nor is it a combination of all three. It's a bit complex.

We do this all the time. In GTA, you and a friend might be playing together. You leap a car off a riverbank and onto a boat. Your friend says "whoa!" and decides to one-up you. Soon you're trying to jump cars onto the wings of flying planes.

This is what gives an experience life. Not just that something happened, not just what you felt during a given moment, but how you refined that feeling and experience and time passes. Long after you've stopped playing GTA, you'll probably remember those epic jumps fondly. It's the same with scripted events: you play FFVI, you probably have strong memories of the opera. But these memories are not simply your memories. They have been tinted and reinterpreted many times, and the opera in FFVI has come to have a shared meaning among those that have played the game.

This sort of thing is becoming more and more common as YouTube and Let's Players grow in popularity. I have revisited games I disliked because I saw someone enjoying them, and since I was now "in on it", I was able to enjoy them the same way.

I don't have a good name for these bundles of shared, refined experiences. Something like "experiential clusters" would probably be accurate, but it's not very catchy. How about "play echoes"?

For now, I'll call them "play echoes". These are events that catch your eye, you have an emotional response to them, and in some manner merge this with other people's similar responses to similar events.

These vary wildly. For example, the strained puns of Dark Souls etchings are a kind of play echo. So is the deep hatred for Road To Hell. In Dark Souls, the etchings are shared in the game, through the game engine itself. But in Road To Hell, the derision is shared via the internet, with videos and posts laughing together, sharing the same judgments.

Play echoes can easily make or break a game. Sharing your game world with others can add a lot of depth as it attunes you to details you wouldn't have noticed, or would have judged in a less interesting way. But sharing can also pollute the experience, screwing up the sense of place, the level of loneliness, and the fundamental skill progression (you learn too much).

So, I have a few questions:

1) Can you create a game where players can create and share play echoes in a way which maximizes "making" the game and minimizes "breaking" the game?

2) If so, can you create a game where the game understands the concept of play echoes?

3) If so, can you create a game where the players can script new content, quests, and so on out of play echoes rather than painstakingly scripting and balancing everything?

Wednesday, June 18, 2014

Growing NPCs

I've been thinking about NPCs.

A while back I came up with a "chatter" system that allowed NPCs to remember chunky bits of worldstate, then allowed both them and the player to use those memories to talk about things.

The idea was simple: NPCs are normally scripted to do specific things to further the player's adventure. They have a specific role they are assigned. But that doesn't sit well with me. To me, the NPCs are the player's adventure.

The most powerful experiences I've had in open-world games were when someone was with me. Whether it was another player or a good NPC, it's a powerful experience. The important thing about an NPC, to me, is not the design or the personality. It's that the NPC feels like they are moving through the same space as me.

Chatting with an NPC at a home base is all well and good, but I don't need it. It's extraneous. The NPCs don't need to have a compelling backstory, or a secret they refuse to tell you. They don't need to have a loyalty mission. All they need to do is move with me.

Probably the most powerful NPCs in this regard are from Dragon Age, because they react to each other. Their reactions to me are pretty bad, but their reactions to each other are really good, creating a real personal dynamic to the party. It kept me playing even as the gameplay disintegrated and the story collapsed into mush.

When it comes to interacting with my specific movements through space, the characters fall flat. They do sometimes comment on the spaces we pass through, but always in a passive and passing way. They do occasionally act in response to my actions, but their responses tend to feel arbitrary and annoying because they tend to judge something without allowing any explanation.

For example, if I choose to help someone, my party members will judge that in a particular way no matter what I was thinking. This was a big issue in the Dragon Age games, because I would often find myself blindsided by a character's judgment. The reasons I decided to take a particular action were obviously not the reasons any of the devs thought anyone would, and it often took me quite a while to figure out why a character would be upset with that, or like it.

We can learn from smaller projects, though.

In the original Skyrim, the companions basically didn't exist as anything other that combat flunkies. They had almost no personality after being put into your team. But since then many companion mods have been added.

One of the most interesting to us today is the thief character, Arissa.

She follows many of the same patterns as a Dragon Age character, but she does those patterns much better. She has more active rather than passive location-triggered comments, and she can be released to explore a city on her own, which is very interesting. But those require a lot of custom content for relatively small payoff. Let's talk about her most effective advantage:

She will judge your actions similar to a Dragon Age character. But she does it in a way that doesn't have an opportunity for misunderstanding.

She doesn't judge you based on which quests you accept or that sort of thing. She judges you based on how awesome a thief you are. Sneak attacks, picking locks, and picking pockets will earn her friendship. Murdering friendlies will earn her distrust. This is really interesting, because it ends up painting a very powerful picture of her personality: she appreciates your ability to rob townsfolk blind while they sleep, but if you hurt them physically she'll get pretty upset.

Relatedly, she gives you a very clear progression. You are told when she appreciates or doesn't appreciate things, and once her opinion has changed enough it unlocks new features. A bit of appreciation and she'll carry things for you. More, and she'll let you equip her. More, and you can ask her for lockpicks. More, and you can ask her for poisons. And so on. While these seem minor, they are important rewards to guide players onto the path.

After about half an hour of Arissa as my (only) follower, I found something odd: I was changing my behavior for Arissa. I was pulling off unnecessary stealth kills and stealing things I didn't need specifically to impress her. I can't recall ever doing that for any other NPC - normally I would just choose the NPCs that get along with my play style.

When I was finally caught pickpocketing by a civilian, rather than kill the civilian to cancel the bounty like normal for a villain run, I actually paid my bounty (after giving all the illegal stuff to Arissa to carry).

This story of my adventures was very different from what it would have been with any other companion. An NPC had shaped my adventures in a very open, simple way. No quest lines. No ethical dropdown box. No trying to read my mind and getting it wrong. I had the adventure I was having, and an NPC was a big part of it.

Arissa was flexible enough to fit into my adventure. No matter where it took me, or what mods I had enabled, Arissa's simple preferences held up. She could participate in any setting, any scenario, any specific adventure.

This is the heart of what I'm trying to do with my new prototypes. Basically, I want the overarching megaplot to be a mod. I want people to be able to "mod in" any end-of-the-world storyline they want, and all the NPCs will function in that adventure without an issue.

I would like to expand the functionality of the NPCs. Although Arissa was good for the limits of the engine, she was basically stuck just judging things rather than participating in any kind of meaningful way. The line dividing her active systems (combat AI) and passive systems (judgments) was far too stark.

A more active character can be created, but you need to be careful to keep chaos under control. That means that the game's fundamental systems have to be built with this kind of active NPC in mind.

If Arissa (or Morrigan or whatever) takes loot that I was aiming for, or kills something I wanted to kill, or otherwise disrupts my immediate plans, they are suddenly annoying. The game needs to be built with their free action in mind.

Another problem is the number of NPCs. Arissa works well as the only NPC judging things, but if there were another three of her, each with their own values, it would become a mess. If you're going to have a lot of NPCs, you need a different approach.

In my game engine, the tentative plan right now is to only allow for one or two active companions. You might have many people willing to go with you or be in a dance party together, but they exist as part of the world when they aren't in your party. There are rewards for letting them continue their daily life uninterrupted, at least for decent stretches of time.

The other part of my plan is to have "plan triggers".

In order to not disrupt your plan, all the NPCs really have to do is understand what your plan is. Also, if they understand what the plan is, they can be "moving through space with you" much more effectively, participating in your adventure much more clearly.

So, when you walk into town, click to tell your party to ask around for rumors but not get in trouble. Click a different button to tell them to stay close and on alert. Click a different button to tell them to go straight to the inn, or wander as they see fit, or stay hidden... all associated with you saying something, and them saying something back.

I'm thinking you can even expand this to targeted actions. Control-click to tell a party member to execute the plan there - whether it's talking to those people, stealing those things, blowing away those monsters... sort of like turn-based controls, but much vaguer and faster to trigger. More like saying "There!" rather than "attack goblin B with your fireball spell".

I've also been thinking about a lot of alternatives to the concept of "you". A big part of the problem with open-world games is that the player avatar is a specific person and therefore everything has to revolve around this one person. This one person has to be friends with everyone, know everything, act in a specific way...

To me, that only works for a small game. If an open-world game is going to be longer than a few hours, I think they would benefit from being able to switch avatars. To that end, I've been considering a variety of avatar-switching ideas.

Right now, my favorite is that you are some kind of ghost or godling. You have your own presence, but you can't really do anything without possessing a willing host. As time passes, hosts get steadily more burned out and you have to stop possessing them to allow them to recover. So you'd have a "primary" NPC that you are probably directly controlling most of the time, and one or two secondaries that act with you.

This would allow for a much wider variety of experiences without crowding in too many characters at once.

Well, nothing is set in stone. These are just my thoughts.

Wednesday, June 11, 2014

NPC Growth and Personality

Most open-world games give you the option to either ignore or hurt an NPC. Some, like Skyrim, give you more complex variations and gameplay within that spectrum. But very few games allow you to be constructive, to help random NPCs.

I came up with a way to do it. Originally, this was a way to make a science fiction setting work for an open-world game. The concept I'm about to describe started off as sci-fi Facebook. But it's easier to explain in a fantasy setting.

Fundamentally, it's a conversation engine overhaul. When you talk to an NPC, the things they say are stored forever in your memory. If you want, you can scroll back and see all the things they've said. You can also tag favorites, to keep from drowning in ancient conversations.

This means they have to say more than a few canned lines. And they do: each thing they say is a state reveal.

Behind the scenes, an engine is introduced to make NPCs more complete. When you create a house for an NPC, rather than specifying a wooden table covered in wooden plates, you would specify a spot for a "small table". The engine would fill in which small table goes there based on the NPC's affluence rating, location, personality, and/or culture. The stock game might just have a bad and a good small table, making the choice pretty easy. But subsequent mods could add in more tables, including some that only appeal to specific personalities or are regional specialties. The mod just registers the new tables into the item list and they are automatically in rotation.

This is also advantageous since it means any NPC can move into any home and it'll become theirs without any scripting required. If a weird foreign NPC moves in, they'll automatically buy or craft weird foreign furniture and clothing.

The NPCs obviously have some stats to drive this engine. They have affluence, relationships to other NPCs (who may be their caretakers/dependents), specific jobs, a personality, a mood, an optional home culture or second set of stats for a secret or seasonal lifestyle.

The player cannot simply see these stats. Instead, they are revealed through the conversation tidbits. Each conversation tidbit is about a specific in-world condition that reflects a specific NPC state.

For example, Anna might say "Have you seen my new horse? I love this horse!"

The in-world state here is "Anna bought a (valuable) horse". The NPC state behind it is "Anna has an affluence of 120".

The moment Anna says it, you can reply with various social niceties and try to become slightly better friends with Anna. But this chatter is just social lubricant. This is not why the system is powerful or useful.

The system is powerful and useful because "Anna bought a (valuable) horse" is concrete.

You can refer to that concrete statement and pull out the pieces of it by simple context. Pick it out of the list and bring it up in conversation with a party member. Point to it and say "do this". The party member knows you want them to buy a good horse.

But you could say "steal this", and the party member would know you want them to steal that specific horse. Say "steal one of these", and the part member knows you just want them to steal any decent horse they can find. Go up to Anna and say "I want this", and negotiate a price for her horse.

You can even manually redirect the context: "this lady..." or "this place..." and now you're talking about Anna and her stable, rather than the horse buying.

All of this works because the game not only keeps track of the state of things in-world, but also the state as it was when the statement is made. Anna has a horse, and she once said she bought that horse.

This knowledge might be valuable to you if you want to butter Alice up - giving her a nice saddle for her horse, or carrots to feed it, or a book on horse grooming. That value comes not from the statement itself, but from the stable world state of her having a horse. If her horse gets stolen, she might not be so happy to get a book on horse grooming, though.

The knowledge is also valuable as a kind of verb to talk to others with, allowing the player to rack up a huge number of in-world contexts to talk about without needing a natural-language parser or worrying about spelling. Moreover, mods will fluidly join ranks without any issue at all. Not only could Anna easily buy a dragonette instead of a horse, she also could easily talk about gablonging the zuzufrass. And now you can tell your followers to gablong things, or get you some damn zuzufrass already!



This system is highly extensible in every direction.

For example, the game can take regular snapshots of your adventures. Fight an orc? The snapshot camera saves pictures of each blow, and the context of each snapshot is saved along with it. Any time in the next hour or so, peruse your snapshots and save the ones you like. The rest stay on schedule for deletion. You can use this to put together war stories. You can also use it to talk to NPCs about these things - for example, if your wizard friendly-fired an ally, a picture was taken of it. Hold up the picture in your mind, and now you're talking about the friendly fire incident. Tell him not to do it, and his battle AI will become more reserved about that sort of thing.

You could take this MUCH further. For example, you could "imagine" things by playing through areas with god mode turned on. Use these memories to talk to your allies, plan out an attack, or explain some bizarre flight of fancy you had. Of course, you'll need to know a lot about an area before you can imagine your way through it...

You can build new locations and NPCs by simply using these snapshots. Examine a bowl. Now you can create that bowl in your creative mode area. Anna bought a horse? Substitute a local NPC for Anna. Now that person bought the horse (and is assigned the same 120 affluence). Substitute a dragon for the horse.

You can quickly create relationships, sidequests, and worries as long as you've talked to other NPCs with similar relationships, sidequests, and worries. Someone once said "wolves are constantly harassing our town"? Substitute in giant frog-lizards for the wolves, and you've got a piece of scenario for your custom town.

The only big problem I see is drowning in commentary. I think you'd need a categorized favorites section, for your most referred-to items. After all, you'll hear tens of thousands of lines of dialog, especially since you'll be more interested in conversing than ever before. You'll also need a way to simply refer to people, places, and items without context - IE, the ability to pick giant frog-lizards out of a list of enemies rather than having to find another conversation that mentioned them.



One of the things that may not be clear so far is that this is a constructive system.

It doesn't just let you refer to thing X more easily. It gives you a grip on the underlying social and economic engines that govern the NPCs lives.

Maybe you start to feel for a miner with a daughter, struggling hard every day to earn just enough to eat. There are a few ways to improve his state.

One way is to give him loot. This will temporarily raise his affluence level. But affluence will always trend towards the base affluence of their job, so you'd have to give him a lot, or come by and give him more fairly often.

Another way is to improve his skills. Training could be one of the basic actions you could take, and if you improved his skills (socially, economically, or miningerally) he would get promoted, increasing his affluence.

Another way is to improve the mine's base output, since a rising tide lifts all boats. You could do this by killing the annoying monsters inside. You could do this by repairing doors and rails and shafts. These are physical activities that do not require the use of the chatter front end.

But you could also use the chatter front end to improve the mine's output. You could do this by searching the mine for overlooked rich veins, saving the snapshot of you finding one, and then telling him about it. Alternately, maybe you learned a trick to more efficient mining from another miner. You can refer to that conversation and transfer that knowledge to the miners here.

You can also use the chatter front end to try and get him promoted by appealing to (or bribing) his boss. Or you could use the chatter front end to relay business opportunities from other people that provide mining supplies or require ore. Or you could convince random people to go and work at the mine, since newcomers will have less seniority and the miner can't help but get promoted.

Now, if I had said "I'm going to build a front end that will let you do all this stuff", you probably would have shook your head. It sounds like a lot. But since I started with how it works, hopefully you can see that those opportunities arise naturally. They literally require no extra work, as long as people can express their needs and opportunities.

Moreover, because the framework behind the NPCs is both simple and flexible, an NPC can also be pushed to radically change their position in the world. You could convince the miner to come with you, not via some kind of quest chain or scripted event, but because you are capable of saying "come with me" and the miner is capable of considering how viable that seems. It'd just be a matter of comparing affluence and danger in his current job vs affluence and danger in your offer, weighted by how much he respects you.

It'd also be pretty easy to let you become an economic juggernaut. If you flat-out bought the mining company, it'd require very little extra content to let you run it as you prefer.

The only sticky point is the scripted quests. Well, those are awkward in Skyrim, too. The hope is that most of the quests won't be scripted, but will arise naturally from the state of the NPCs in the game.

The miner is an example of that: just by encountering him or his child it is clear that he's in a not-so-great situation. The quest to fix things up naturally arises as the miner generates lines of dialog about his state, explaining who he works for, how much he loves his daughter, how concerned he is about their drafty shack, etc.

By setting up the town in a tense arrangement, things should line up to create a situation that feels similar to a set of town sidequests in any other game.

...

I hope everything I said was clear. What do you think?

Tuesday, June 10, 2014

The Moddable Game

Since I first played my first computer game on the Apple II, I've always wanted to tweak what I'm playing. I am in favor of tweaking to the point where every game I've ever made was about letting the players tweak the game.

So it's an understatement to say that I'm in favor of mods.

I'd like to talk about what makes a game moddable.

First off, there's the engine's capacity to be modded. Some games are built to import mods freely, like Kerbal and Skyrim. Others can be forced into it, like World of Warcraft. Others are nearly impossible to mod, either due to technical constraints or anti-mod policing.

Next there is the popularity of the game. The more popular a game is, the more people will want to mod it. There are some super mod-friendly indie games out there that nobody has really heard of, and in turn they have few mods. Skyrim isn't actually hugely mod-friendly on its own, but it was so popular that the mod community built tools to MAKE it mod-friendly.

Lastly, there's also the fundamental design of the game.

I was thinking about this the other day. I was wishing for a version of Mass Effect that had a mod library as large as the one for Skyrim.

To make it clear, I've got 50+ mods for Skyrim downloaded, around 2 dozen installed, and there are hundreds more that I never bothered with. This is about the same numbers as Kerbal, although recently Kerbal's modding community has been gutted. In both cases, there are mod managers which make installing and uninstalling mods as simple as a double-click. And the mods are often very deep, such as changing out the entire animation system, or making combat work completely differently... or adding 30+ fully voiced new NPCs, or 100+ new locations.

The Mass Effect games do have some mods, but nowhere near that volume or depth. Mostly they're about making Mass Effect look better, or tweaking costumes. As far as I know, there are no mods to completely change the combat system, or let you play as a new species, or replace the Normandy with a Spanish galleon.

This is a shame. I really am looking for a moddable personal science fiction game.

There are loads of moddable impersonal scifi games, starting with Kerbal. But I want the close-in RPG experience, where you live in a world and you can mod the things that are in that world. Mass Effect is one of the few that seems like it'd qualify.

Why aren't Mass Effect games very moddable? Well, partly it's due to the technical and cultural constraints. But I think a bigger part of it is the fundamental design of the game. Mass Effect's basic design has two major flaws that make it difficult to mod.

The first is that the statistical and character growth side of things are too basic. A lot of mods in other games make extensive use of "peripheral" skill sets, but Mass Effect is laser-focused on pitched combat and solely pitched combat. Everything else isn't simply mediocre, it's missing entirely. Nobody feels annoyed by the mediocre crafting system in Mass Effect because there isn't one. Nobody is annoyed by the stealth system because there isn't one. Gameplay-wise, Mass Effect is very small and tight, which makes it hard to mod.

In addition, the world is also designed a bit annoyingly.

In theory, a sci fi game should be dirt-easy to add new content into. You can just stick a whole new planet in, it'll just appear on the star map easy as you please. No scuffling needed.

Unfortunately, Mass Effect isn't a game where you can freely wander the universe. It just feels that way because of the atmosphere.

Mass Effect feels very open and immersive, but it isn't. You are on rails the whole time, it just lets you take a few of the stops in a different order if you like. The world is very tightly designed so that nothing really distracts you from your quest - occasional sidequests have the exact same gameplay and do not affect how you approach later missions in the slightest.

Skyrim, on the other hand, lets you pretty much do whatever you want once you get past the epic(ally self-indulgent) opening sequence. You can pick flowers, hunt bears, map out lost ruins, raid dungeons, learn magic, craft weapons, enchant things, learn alchemy, go to college, find companions, buy a house, raise a family... the main quest will wait patiently.

A huge part of this is that Skyrim is full of STUFF.

I don't mean locations, although that's part of it. I mean STUFF. Every inch of Skyrim is crawling with pointlessness. Outside, there are harvestable plants, interesting gullies, ruins to track down, lakes to swim in, overlooks to look over... and inside, there are not only people (and children!) but also plates, apples, beds, cooking pots, complex dinners, crops, books, lamps, shops with stuff all over them - all interactive.

Contrast this to Mass Effect. Shepard has no interest in day-to-day life. She is physically incapable of showing any interest towards day-to-day life, because she literally cannot interact with day-to-day things. Every book and plate is part of the background, nobody ever eats. There are few things to interact with, and they are universally either text tidbits or guns. There are beautiful places to go, but Shepard cannot enjoy them: she physically cannot jump in the water or pluck a flower.

The Normandy makes this even worse. The Normandy is incapable of enjoying itself as you travel. Shepard can at least find a beautiful spot and gaze at it, or chat with a random NPC. But the Normandy glides through empty space without any variation or life.

What can a modder do to spruce up these experiences? A modder could create new locations, but they would be just as hollow. As with all locations in Mass Effect, they would exist solely as either combat zones or exposition zones. Shepard will always be a military captain with no other life. She physically cannot be a trader, a thief, a cook.

Hence, no mods.

Well, few mods.

I'm looking for that category of sci fi game - the close third- or first-person space RPG - that is as moddable as Skyrim. I would buy extra copies.

Monday, June 09, 2014

Companions

I played a lot of Skyrim in the past few days, with loads of mods put in. So I'd like to talk about companions.

When I first tried to play Skyrim the week it came out, it was a mess. I didn't get very far, but I did get far enough to obtain my first party member, a knight-style character. I liked her design and voicework quite a bit, and I clearly remember thinking "oh! She might make this game a lot more fun!"

Unfortunately, the personality hinted at in her design and snippets of dialog never really came out. A few hours of mutely fighting at my side like a robot, and I realized she was going to be just as empty as a make-your-own character from back in the days of AD&D RPGs. Then I stopped playing.

Similarly, in Dragon's Dogma you can make your own party member. I was excited by this, because it gave me options as to voice and personality and stuff. I remember clearly thinking "oh, this is going to be so cool! I get to build the dynamic between the main character and their sworn companion, Frodo-and-Sam style!"

Like Skyrim, this was a hollow promise. As anyone who's played the unpatched original version of Dragon's Dogma knows, the pawns (NPC party members) only have a few voice clips. They all comment on the same things in the same ways, just with a different voice actor. None of them interact with the main character in any meaningful sense, they just randomly state trivia and gameplay hints. Their personalities do matter in combat, at least to some extent, although it's a bit hard to tell because combat is so chaotic... but combat is also the part of the game where I don't really care about people's personalities as long as they get their job done.

Even in my super-modded ultra-dense-content version of Skyrim, the companions are only a bit better - they're about at the level of Dragon's Dogma pawns, now. But these aren't characters I created: a scripted, set character should have a lot more personality because you know everything about them, their place in the world, how they would react to things...

...

I think maybe we should consider if we can make characters interesting.

When we old farts think about interesting NPCs, most of the time we'll fall back to Baldur's Gate or Planescape: Torment. "Go for the eyes, Boo! RrrAAAAAH!"

Even though few of them were as interesting as Minsk, even the totally stereotypical characters had a lot of personality. They expressed this personality because they were tightly related to the world: they had scripted lines of dialog to comment on a variety of scripted plot events, and they could fall back on general comments based on their alignment.

Modern Star Wars and Mass Effect games have normally gone the opposite direction. Few of the characters have much to say about the events that happen on the various worlds you visit, but instead you can talk to them and they have a fairly deep and unlockable personal story. I think this is a bad way to do it simply because it relies on a horrible dialog system and an unrealistic way of interacting.

Dragon Age games have a bit of both approaches, often confusingly and stiltedly so. However, they have one additional brilliant detail: the characters on your team interact with each other randomly as you wander around. This is the one thing Dragon Age did better than anyone else.

The problem with all of these games is that the NPCs are scripted in advance. They have a giant table of everything they could possibly encounter, all the situations. If something comes up that's not in the list, they fall back on extremely bland commentary that actually makes them less believable rather than more. It's actually even worse than that: few people want to interact with the NPCs in the exact way that the developers assumed, but since the NPCs are stuck with the dev assumptions, you are forced into specific routes.

Mostly, this is forced onto the devs because they need voice-acted characters. If they have to have specific audio clips, they need to specify all the audio clips. We're going to assume that we can ignore that restriction.

With that in mind, how can we make characters that feel deep and interesting throughout the game? Can we create a character-centric RPG, one where the plot is less important? Imagine an open-world game where it was literally open-world: not only could you go anywhere, but there's not even any plot-on-rails to confine you. The important things in this world are you and your companions.

Rather than trying to design perfect characters to push you into a heroic tale, we're going to assume the characters are flawed. Generally likeable or good, but quite flawed. You need flaws to get a grip on a character: a character without flaws is just a setpiece.

Let's put aside the methods discussed earlier and talk about a few additional methods of making a character matter to the player. Most of these hinge on the concept of a "mood", which a medium- to long-term personality change characters adopt when faced by a situation their personality cares about. Also keep in mind that this is all just theoretical crap.


Pushy persistence
A character needs to push into the player's line of sight. A character that quietly does their job is invisible. Therefore, our characters have to have things outside of combat that matter enough that the player wants to pay attention.

I've chosen to use moods for this. Moods are caused by a variety of situations, most of which the player can plan to either avoid or cause if they are diligent. For example, a particular character might be particularly unhappy when they get badly injured. The player can keep them to the back, or have them retreat when lightly injured to prevent the mood from forming.

Characters that enter a mood will pester the player, making it clear that (A) they exist, (B) they are now in a mood, and (C) what their personality is. This is better than simply saying "character X is now in mood Y", because it pushes the character's character into the player's face.

In addition, not all characters get along. Their personalities (modified by mood or not) may be incompatible, in which case they may actually cause more mood problems, and there will be a lot of complaining to the player. Characters that synergize well will push each other into good moods, which offer statistical bonuses instead of penalties.

Moods need to be tended by interacting with that character. Not "talking to", but "interacting with". Talking might work for some minor moods, but otherwise you'll need to spend game-time doing something they find interesting, or going someplace they can relax or have fun. This also serves to push the character into the player's conscious again.

This system needs to be tweaked to keep it from getting out of hand, obviously.


Micromanagement
That brings us nicely to the concept of micromanagement. Now that the character is pushing themselves onto the player in some way, we need to make the player want to push onto the character. We do this by rewarding micromanagement, at least sometimes.

For us, micromanagement is all about mood alteration. Moods are not integers: a mood has a specific rank and within that rank it can be steadily degraded or enhanced until the next rank is reached. This is often time-locked, too: a mood cannot change more than one rank per day/week/whatever. By micromanaging, you can steadily degrade or enhance various moods, including moods that will permanently alter how the character behaves towards the player.

In our approach, we have specific kinds of micromanagement. None of these are required, they're just ways the player can choose to interact with the characters in nonstandard ways. These would be most valuable in attempting to "rehabilitate" problematic characters: heroic and good-natured characters probably won't need you to push this persistently.

1) AI overriding. Our characters take a variety of actions automatically, varying by personality type. This might include spending their personal cash in a town, equipping gear, grabbing/equipping loot, scouting ahead, separating from the group temporarily, eating foods, casting noncombat spells, and so on. The player can tweak these behaviors, enabling, disabling, or requiring an ask. This kind of micromanagement is not intended to optimize performance, since the default behaviors are not very wasteful. Instead, these actions have small but cumulatively important effects on moods, and the player can use them to help with that.

2) Social pestering. The social AI in the game has several modes it enters depending on the perceived social situation, and that's made visible to the player by their animations. By staying near/far from a character or avoiding/looking in their eyes, you can force the social AI into specific modes. It takes time for the system to enter a new mode, so you don't have to continually stare: just once every minute or two will work. Specific moods grow or diminish steadily in specific social modes - for example, a gregarious bard and a scared child both want to be in a close social mode, while the annoyed magician would prefer you to keep your distance.

3) Action pestering. By keeping the character busy with specific action requests, you can prevent them from taking any mood-caused actions of their own. While this may not improve their mood much, it will keep them from doing anything destructive or giving anyone else a bad mood.


Personality Leveling
Why stick to stats? When a mood ends (good or bad), the character gets growth points. Spend these in a growth tree like the new FF games - except you're altering their personality and behaviors bit by bit instead of their combat capabilities. Change what causes moods, or what moods do, or how they behave while in moods. Moderate their more annoyingly severe reactions. Maybe unlock a romance branch!

If you've played the original Valkyrie Profile, you probably know the basic idea.


Interconnectivity
It's not just about player-centric interactions. Party members should also relate to each other. And maybe to non-party NPCs, or the world in general!

There are a lot of relationships characters can form with each other under the guidance of the player. Sure, hooking up romantically is a few of those options, but there's a lot more potential hidden away in there. Mentors, rivals, bromances, etc. In relationship to non-party NPCs and places, you have things like sponsorship, fondness, patriotism, etc.

Some kinds of relationships will cancel or cause certain moods as long as the characters are together. In this way you can set up your party to never drop into a bad set of moods by carefully balancing out their relationships with their personalities to cover the most common problems. Perhaps you could even set up a party party, where everyone's always in a great mood. This is also really the only way to have characters with badly conflicting personalities on the same team.

Other kinds of relationships set up opportunities, where you can rapidly create or deflate a mood by having that character interact in that way. This is normally the kind of relationship you would have with places or people not in the party, since it is action-based rather than presence-based.

Other kinds of relationships set up statistical bonuses. A flow of cash, mana, willpower, or even new equipment. These are both in-party and out-party.

The problem with interconnectivity is that once a party grows stagnant, it also grows stagnant. So if we're going to rely on this, we need to also shake up the party fairly often. Which leads us to...


Scope changes
Characters shouldn't always stay in your party!

While it's probably not a good practice to arbitrarily snatch characters away, there are often good opportunities for characters to do something on their own. Stay behind to help a town rebuild, take a particularly wealthy caravan on a trading run, oversee a castle's construction, and so on.

These are often things that would be side quests, so what I would recommend is that when you encounter a side quest, you can either accept, refuse, or send someone off to help them!

Characters that are away send regular missives to keep in touch and remind the player that they exist. More than that, though, it's important that the player continues to have some amount of interactivity with those characters. Therefore, over the course of the mission, there should be several opportunities for things to go differently, and the missives should ask what they should do.

Some of these might be choosing between various rewards - "They offered me a lightning sword or fleetstep shoes. Which do you think is better?" Some of them might be about choosing between long-term and short-term - "Do we want 5 gold per day from now on, or 500 gold lump sum?" Some might be about choosing between personal gain and the world - "I can take this 500 gold, or I can put it back into the orphanage." Some might be about choosing two different world options - "Do we want to build an orphanage or a library?" Some might be about taking care of things automatically or manually - "We found a den of thieves. Do you want us to handle them, or will you stop by and do it with me?" Some might be mood-based - "I can do this better, but it's going to put me in a real bad mood."


The other ways
While I'm not going to talk about them again, there's also the already-pioneered methods: character-world interaction, character-player interaction, and character-character interaction.

There are also a huge number of other things you can consider, such as a character attempting to learn what the player likes and adapting their behavior accordingly. I'm sure there are others.


.....



Now, this is obviously all theoretical. Just throwing ideas against the wall. Let's consider feasibility anyway.

The first and maybe biggest barrier to this is the concept of voiced NPCs. When you have specific lines you need actors to read, you need to specify all the lines in advance. So we have three options: we can either try and cram all the variety of things we need to support this system into a few hundred lines of dialog, we can throw away the concept of voiced characters, or we can use computer-generated voices. If you're a small team, voiced characters probably aren't on the menu anyway (pricey!), so you can throw it away. CG voices are not very convincing yet, so that's only viable if your setting is some kind of future robot setting.

Even if we assume we have no voiced lines, we still need have these characters able to say the variety of things they need to say. This is not too big an issue with general commentary - just a few dozen lines of dialog per character, customized with embedded variables to make them address the situation properly. The problem is the specific commentary.

See, if Anna and Bob are characters in our game, Anna and Bob have no problem saying that they don't like your approach to a particular ethical situation or complaining about getting hurt. They don't even have any difficulty expressing love for each other or squabbling or any of that. But that's when it's Anna and Bob.

If it's "Anna the court magician for the loyalists" and "Bob the miner who joined the rebellion", well, now you have a lot more information. You have to come up with something immersive. Something where Anna and Bob can squabble over specific in-world things such as loyalists vs the rebellion, and hoity-toity mages vs blue-collar miners.

I think the only way to do this is via a faction system, where various factions are established as having various relationships to each other, and these automatically reflect onto the characters that are part of the faction. However, this is difficult to phrase in-game because everyone needs to have their own way of talking. It's tough, but I think the only thing we can do is give every faction lines of dialog that are full of embedded variables that are replaced by snippets of a particular character's dialog library.

For example, the miners might have the phrase "%amplifiedAddress% %optionalExclamation% %targetFactionMembers% should try getting your hands dirty %rareTimespan%". This would translate to something like "Maybe you mages should try getting your hands dirty once in a while" or "You fucking magicians should try getting your hands dirty sometime!"

This kind of thing is very annoying to write, but it's the only thing I can think of that would be modular enough to support characters and factions added in later. The relationships are what matter, not usually the specific target faction. The miner's don't have a mage-specific line they use, it's a line they use for any group they think is hoity-toity.

And if Bob has a hilarious accent, he can use a combination of token overrides and text replacement to get a more personalized result.



Modability is a huge concern for me. I want players to be able to drop in new content.

I don't really want players to launch the game and make 6 unique characters as they see fit. I'd much rather that all the NPCs be carefully built to be fully world-immersive. Players that really want to add NPCs can do so, but it is a lot more work (mostly dialog library writing, and perhaps personality level-up tweaking). In exchange, it's a much better result.

Since we're talking blue-sky design, I also want players to be able to add factions, places, spells, weapons, activities - anything that could conceivably be added to the game. While many things should relate to a character's specific in-world connections, we also want them to react to things that didn't exist when they were written. If Anna hates "dark sorcery" and later "necromancy" is added as a separate group, all the modder has to do is say that necromancy defaults to dark sorcery. Now Anna hates necromancy and will use the same dialog lines.

Well, all of this is just hot air. I don't have an RPG in the works. I'm just going on and on and on and on and