Tuesday, July 24, 2012


Via Robert Yang’s post on contextual narrative, I spent 20 minutes poring over the details of this GDC talk about dynamic dialog. There’s some great stuff in the presentation I wanted to pull out and discuss.

Essentially, the talk boils down to the difference between this (page 49 of the pdf):

and this (page 50):

The two slides illustrate the exact same “facts”, but anyone who isn’t a C programmer can’t understand the line (((C_orb*)), while it’s a bit easier to parse “MagicOrb.charges = 12” (It means the magic orb has a property called “charges” which is equal to 12).

However, the big difference is that the first slide needs to be embedded in the game logic - which, as the talk points out, means only programmers can go in to add places for dialogue to get triggered. This results in a “homework assignment” for writers, where they go fill in the places where programmers thought there should be dialogue. Obviously, that’s a problem:

In a lot of games, the AI programmer looks at all the events that happen to a
character and tries to guess, “Well, for which events would this character want to say
something?” The programmer puts in code hooks for each of the sites he can think of
and then hands the writer a big spreadsheet and says, “Okay, fill out a line for each of
these events.”
Well, the problem with this is you’re basically reducing your writers to filling out a
series of mad-libs. That kind of cramps their style. It also means that it’s really the
programmers doing the writing, and the intersection between the set of good
programmers and the set of good writers is pretty small (unless you’ve got Vernor
Vinge or Ted Chiang working for you).
Also, any time the writer finds a new circumstance in which she’d want to have a line,
she has to go back to the programmer and ask for a new code hook to be added.
That’s slow and it means less stuff gets written, so we really wanted a way for writers
to decide which circumstances got lines and how finely those lines were specialized. (pdf pg 46)

So Valve ends up solving this problem with a tool for its writers. The tool strips away the complexity of programming and ends up exposing all of the facts about the world. Then the person writing the tool talks to the writers to find out how they want to edit scripts (e.g. a database program or Excel or a fancy graphical tool). This way, the writers have a tool they can use practically that gives them the information they need. The result is dialogue that is varied, interesting, and not limited by how many times a writer goes to the programmers and begs for additional writing cues to be added.

End Summary.

The idea is basically the right tools for the right job. In this case, programming tools aren’t the best tools for a writing job. The corollary is Valve has great dialogue in part because their tools allow for great dialogue to be written. It could be done the complicated way, but it’s faster and easier to do it this way.

The tools we use shape the end result. Better tools lead to better results. The trick is spending the time and effort on creating the right tools for the job.

Saturday, July 7, 2012

Xenoblade Chronicles

If you’ve heard of Xenoblade Chronicles, it’s probably in connection with the story of how it came to the United States. Nintendo refused to bring it to the US because it saw the game as a niche title for an increasingly small audience. Fans of jRPGs organized a massive letter-writing campaign and Nintendo eventually relented, distributing a limited supply of the game through its own online store and with Gamestop as the only retail partner.

In a more literary world, Xenoblade Chronicles would be about the journey from alienation to acceptance, the virtue of tolerance, and trying new things, but our world does not spit out literary tales, and Xenoblade is about a magic sword that cuts up bad guys.

Well okay, that’s not entirely fair. It’s a jRPG and it deals with a lot of jRPG motifs like friendship, teamwork, and revenge. It’s not a spoiler to say at the end you kill God because that is something so deeply embedded in jRPGs that you could probably guess it just from hearing the setting of Xenoblade: “The bodies of two ancient gods inhabited by sentient beings such as your party.”

One interesting thing about jRPGs is they aren’t necessarily defined by their country of origin, despite having “Japanese” right in the genre name. It’s like how Westerns don’t really have to take place in the American West. jRPGs aren’t grouped by their battle mechanics, either. Xenoblade is pretty clearly a jRPG despite lacking turn-based menu battles in favor of a World of Warcraft-like action bar that rewards positioning and skill combinations. The jRPG comes from the motifs--the player controls a group of adventurers who band together and learn about teamwork and friendship. As you shuttle them from area to area, from scripted cutscene to scripted cutscene, you’re hit with ideas about fate and inevitable destiny. The party grows in power through equipment and learned skills while fighting against increasingly powerful enemies. By the end of the game, they’re the most powerful force on the planet, and so the only force that can give them a challenge is a god.

The plots are often built on top of the mechanics, in other words. It’s hard to argue for free will in a game where areas are tightly bounded, dialogue is resolutely out of the player’s control, and you have to advance the pre-scripted plot to go anywhere new. What’s cool and unique about Xenoblade is how it throws new mechanics into the mix and uses them to give meaning above and beyond the normal jRPG stuff by reinforcing each mechanic with another.

For example, the battle system is an integral component to almost every jRPG. Xenoblade has a unique implementation of “burst affinity” where critical hits, misses, or evades can be rewarded with a chance to hit a button to gain more on the combo meter, as well as gaining affinity between party members. The affinity between characters affects what skills they can share with each other, the likelihood of getting additional combo chains between them, their shared crafting ability, and unlockable “heart-to-heart” cutscenes wherein characters gain even more affinity with each other. You can also gain affinity with NPCs, which builds a social graph in a menu screen where you can see the relationship between different NPCs. You get more affinity by doing quests for NPCs (and various members of your party will chime in while receiving or turning in a quest, boosting their affinity with the party leader), and doing quests can repair or destroy relationships between NPCs. High affinity with NPCs increases the number of rare collectibles they have to trade, unlocks additional quests, and eventually lets you invite them to come live with you in the town you rebuild with rare collectibles.

From that convoluted description, it’s apparent that these systems all heavily rely on each other. Whether your goal is increased combat ability, exploration, or making shiny things, you end up wanting to buy into the affinity chart in order to expedite your goal. As a result, you accidentally start caring what Riki has to say to Reyn, or that choosing the easy way out of a quest destroyed a marriage. As a result, the themes of friendship and teamwork, and even the shared goal of revenge, carries more weight in the unchangeable plot.

Even the magic sword has an interesting mechanical component. At the beginning of the game, a little fuss is made over the fact that the sword is the perfect weapon against evil machines, but it won’t harm human flesh. It’s easy to ignore this point because you spend a lot of time killing rabbits, giant caterpillars, birds, frogs, lions... However, you eventually come against a class of enemy you can’t damage with your magic sword. When the reason is revealed, the game pivots to make a moral point: “How far will you go for revenge [against the machines]? Will you kill another human?” You retrace in your mind to all the combat you’ve been through at this point and you realize every single enemy you’ve faced has been non-human. The moral question actually has some weight because unlike other games, you actually haven’t killed any other humans at this point. The enemies you’ve faced have all been positioned as a threat, and most of them attack you first if you’re weak enough.

A rule I find interesting that doesn’t really affect the meaning of the game is if you’re about 5 levels above a monster’s level, the monster will generally ignore you. You’re free to wander and explore areas you’ve already been through, searching for collectibles and secret locations and finishing up dangling side quests without engaging in perfunctory combat. It’s a rule lots of jRPGs miss (with Earthbound being the notable exception, eighteen years ago). This single rule makes it possible to spend hours in the game without accidentally starting a fight. If you want one, you’ve got one! But if you don’t, there’s plenty of other things to do: crafting, side quests, reconstruction, collection, and relationship building. That sort of thing is why I spent a hundred hours on the game...