Wednesday, November 18, 2015

Alternatives to Dialog Trees

I was thinking about dialog trees. I made a video about how they're not very good, but I'd like to present some alternatives.

Obviously, one alternative is keywords. Whether typed or added to a list as you discover them, this allows you to steadily uncover new topics in the world and converse with existing NPCs in new ways.

There's a lot of untapped potential in this idea, but it's far from the only idea.

Let's consider the purpose of dialog trees.

In linear, story-driven games, a dialog tree exists to A) tell the player what's going on in the story and B) allow the player to steer the story along predetermined paths. They are limited to predetermined paths because the assets (dialog, visuals, enemies, dungeons) are created custom for each choice.

This is also true of keyword systems. Each keyword is painstakingly scripted with a particular response intended to help draw the player into things. It may not be quite as plot-centric: there's a lot more choices and a lot of them are only tangential to the NPC in question, so often a response will be world-centric or NPC-centric instead of plot-centric. Still, the basic idea is the same: scripted ahead of time.

We do have other options. For example, you can generate topics algorithmically and have different NPCs assigned to know about different aspects of it. NPC 1 might know where the next event node is happening. NPC 2 might know what kinds of enemies you'll face. NPC 3 might know the treasure reward. NPC 4 might have hints for what will happen next.

We can script it in a way where we can substitute in values freely, and allow them to be generated rather than scripted.

This isn't a bad idea, but it doesn't take long before it devolves into dull clue-hunting. Rather than the NPCs being people, they start to feel like cards you just flip over and glance at to see if they're the one you need.

To have us consider the NPCs as people, they need to be more than sources of information. Making NPCs more complex is easy - I can build NPCs that have schedules, like random things, behave differently depending on the weather, whatever. But this complexity only matters if it is "surfaced" to the player. That is, if the player never wants to interact with that complexity, the complexity is just in the way of what the player wants to do.

The complexity we can create depends on the mechanics of the game world. For example, in Rune Factory the calendar plays a big role. So the characters have birthdays and celebrate different festivals in different ways. But this wouldn't work in, say, Fallout 4, because the calendar doesn't matter in that game.

This is an "offloaded" method of interaction. Rather than building a complicated way of interacting with the NPCs, the method is deceptively simple: it's limited to "talk" and "give gift". The complexity comes from managing your timing and the gift you give.

This is "deceptively" simple because it is functionally equivalent to keyword dialog. The only difference is that rather than choosing time and gift from a menu that pops up when you talk to the character, you choose it from the world. You pop up your inventory list and select the item from that. You waste time until it's the right time, and then trigger the event. It's fundamentally the same, we've just offloaded the menu options to world interactions that carry over when you interact with the character.

Of course, this is a bit more "punchy" than an ordinary keyword system, because if you select the wrong options you will suffer a penalty rather than just getting to try again. That's the real difference between this and the keyword system: choices have ramifications.

What kind of interaction system do we have where choices have ramifications?

Shops.

Shopping is about choosing things you want to buy and sell. The exact things you buy and sell depend on your resources, the kinds of things the NPC sells/buys, and what you are trying to accomplish in the larger scope of the game. It never feels complex, but choosing whether to buy a piece of armor, a potion, or a weapon is a surprisingly complex dance that players can pull off intuitively.

Right now, when we think about choices with ramifications, we tend to think of dating games. Choosing gifts and dates and pandering dialog choices. But I don't think that's a good mechanic. I think we should consider our social interactions more like shops. Rather than a given choice being bad or good, it's about a given choice suiting your needs and tactics.

There's no "bad" options in a shop, because weaker options cost less and stronger options cost more. Even meta options such as buying shares or directing supply runs aren't good or bad, they depend on how much you plan to return to this area and whether it suits your current means.

If we just push the shop metaphor, we can have various events, behaviors, and favors treated as items to buy and sell. As when they were weapons, armor, spells, and ammo, we could also make them things that are equipped or deployed in the field, rather than things which are isolated to you and the NPC.

As an example of this, let's say we're doing a sort of Power-Rangers-Style game, where you play a bottom-rung wannabee hero always struggling to put together a team for any given mission. The NPCs in the game are all Power Rangers themselves, although most have a non-Ranger life such as scientist, vampire hunter, or Teen With 'Tude.

When you interact with them, you can "buy" their participation in your battles to some extent, ranging from helping to keep civilians safe to being on your party proper. You can also get them to loan you their various power crystals, suit enhancements, weapons, cars, etc. You can buy loot - monster drops that they have little use for but would enhance your suit pretty nicely. You can also buy their words and "equip" them: they vouch for you to authorities or other rangers, their encouragement or advice in battle. You can recall their words and lean on them.

They are also the only way to increase your stats: training with them is the only way to spend XP and raise various stats and skills. This includes stats like "heart" and "inspiration", as well as developing new battle cries, suit elements, weapons, cars, giant robots, etc.

That can also benefit them, since the only way they can improve is to train with someone at least their own rank in a stat. That someone might as well be you, right? Unless they already have a good friend that will help them train that skill...

To balance your requests, you can "sell" things. That includes all the things you can "buy", sure. But your participation in their battles and your words of encouragement are probably not very valuable. You might have got some decent loot to sell, but probably not, not unless they're lower level than you. You offering to train them is probably not going to be too much use, since most of them already have a group they train with and no reason to switch.

So instead you bribe them with the dumb B-plot events that Power Rangers is known for. You take them to McBurger. You give them advice on their crush. You go on a double date with them. You help them prepare for their school play. You teach them math. You sub in on the sumo wrestling tournament because they sprained their ankle yesterday...

We've turned the negative into a positive. We've created a way to pull you into the dumb B-plots of this kind of game.

It's just an example, but I think it's a good example of alternatives to dialog trees.

If we throw away the need to push the player into our preferred plot line, we can allow the player to wander through all the little threads and tie them together in a unique, meaningful way.

What do you think?

No comments: