Dev Blog 10: A Web of Crimes

I did say that I would talk about the trait system this month, but I’m still doing a lot of work to get it into a shape that I’m happy with, which means that a lot of how it will function is still a bit up in the air. So instead I’m going to talk about something that’s more finished in terms of its design, which is how the game generates crimes and feeds information from them into dialogue trees and combat scenarios. This is how the bulk of the story content in the game is generated, so I think it’s worth spending a bit of time explaining how it all works.

As I’ve mentioned previously, most of the quests in the game are procedurally generated. You play as a group of bounty hunters on and around a series of colonies on Mars in the near future, and to acquire quests you open up an app on your smartphone to find a list of bounties that are currently available. The bounties are always procedurally generated based on your current location. For example, if your spaceship is currently docked on a Martian colony you might see a bounty that will take you to a market or a spaceport, but you won’t see any bounties for crimes that targeted space stations.

The bounties obviously define where you’ll be engaging in combat and who you’ll be fighting, but they also determine the stories and dialogue trees that you’ll encounter before and after the fight. Every bounty in the game will tell a story. They’re comprised of three component pieces: the category of crime, the target of the crime, and the motivation for committing the crime. For example, maybe the bounty is alleged to have committed a murder (the category) against his brother (the target) to try to inherit the family business (the motivation). It’s important for the bounties to have motivations so that the stories that the game tells are more interesting than “go catch a bunch of murderers”. By giving motivations to the bounties, the player will learn more about who they’re fighting, which should make the combats more interesting, but more importantly, it should allow for the telling of far more interesting stories through dialogue. The player should feel like they’re inhabiting a world in which the non-player characters have desires and act on their own, rather than merely existing to give the player someone to fight.

I drew myself a couple of visualizations as I was designing the code structure for these components, so this might give a better idea

Fancy hand-drawn flow-chart of crime object structure

The illustration should give you a better idea how these components fit together. Once the game decides that the crime for a bounty will be a robbery, it then takes a look a the list of things that could be targeted for a robbery. From there, a motivation for the crime is chosen from among the possible motivations attached to each target so that the story is more fully fleshed-out.

The game will then construct one or more dialogue sequences complete with branching dialogue trees based on the three elements chosen (crime, target, motivation). Some things the player may learn before they actually find and encounter the bounty, some things they will learn immediately before fighting, and some things they will learn after the fight is over. The three stages will not necessarily occur for every bounty. There will always be at least some dialogue before every combat sequence, but there may not always be dialogue after defeating the bounty. An example of how this might work would be that at the beginning of the quest you meet the person whose apartment was robbed, and they tell you their side of the story, but then after you defeat the bounty they provide a different explanation for what happened. Then you may be faced with a decision as to whether to bring the bounty in; who do you believe? Do you care either way as long as you get paid?

If you look at the tree I sketched above, it looks like there would be 6 possible stories for robberies. However, there will be many more. Each level of the tree will contain multiple possible stories, and within those stories there will be branches, and there will be pieces that change depending on which other elements of the tree have been chosen. So the end result is that even the options “committed robbery in store to provide food for family” can produce multiple stories if encountered multiple times.

Even that is under-selling the complexity of the system. Thefts in the game will be much more varied than this example, and include targets like intellectual property, personal data, gene banks, and so forth. And there will of course be more than one category of crime. My hope is that once all of these options are combined, there will be thousands of possible stories in the game. Because of the way procedural content works it probably won’t feel like thousands of unique stories to players, but if an average game is something like 20-30 bounties, I think there should be enough possible story configurations that even after multiple playthroughs the player will still be encountering stories that feel fresh.

So far this has been premised on the idea that the character will always be chasing a bounty that is definitively guilty, which is boring both thematically and in terms of gameplay. That will not be the case in the final version of the game. But the simplification helps make the systems more clear.