AI Dreams

of a better.world
Beyond Good & Evil: Modelling Morality and Social Combat in Games

Cover image by Yiran Ding

Beyond Good & Evil: Modelling Morality and Social Combat in Games

We're all comfortable designing combat systems—hit points, stamina, cooldowns and damage types are languages of conflict we've mastered. But what happens when the battlefield is a crowded marketplace, a royal court, or a family dinner?

Picture a game where society itself is a system: a city-builder in which every citizen has desires and fears, or an RPG whose world is more than a backdrop for fetch quests. We want its characters to interact with the same weight and tactical depth as our carefully balanced combat. We want that without cartoon heroes and villains, and without reducing every exchange to a skill check for deception, persuasion, or intimidation. That skill check is the model the hobby's default game has taught us to expect, and as I argued in How D&D Became the McDonald's of Roleplaying, D&D earned that position through scale and brand recognition, not craft.

Abstracting morality into game variables is what economists do when they build models. Firstly, we decide which data matters and assign it value. For any action, we need to know who is involved, what each person knows at each decision point, and what the consequences might be. None of those choices is neutral. As I wrote in Engineering Without a Compass, every database schema is a philosophy, and a morality system just makes that obvious.

But to build something we can code, we're drawn to materialism: matter is primary, and mental states are by-products of biochemical processes. Said aloud, that sounds obvious, yet most of us think like idealists and treat reality as inseparable from our perception of it. Ask whether a falling tree makes a sound with no one around, and people roll their eyes and say yes. Ask whether a particle we cannot perceive exists, and many hesitate.

That tension shapes what we can build. Materialism accepts that some things will always stay unknown. Idealism holds that everything is knowable in principle. Empiricism, which grounds knowledge in sensory experience, sits closer to idealism than to materialism. So how do we model morality in a way that compiles into code?

Start with what morality is for. At its simplest, it's a body of standards for telling proper actions from improper ones, whether the Golden Rule, moral objectivism, or codes drawn from philosophy, religion and culture. Immorality is knowingly breaking those standards; amorality is not knowing them or not caring. The difference rests on the word knowingly, and that brings us to intent.

Why Intent Fails

Intent feels fair. We want to judge people, and characters, by what they meant to do. But intent is unreliable in life and in games, for three reasons.

First, intent can't be verified. We see an action and guess the intent by asking what we would have meant by it, which is projection filtered through bias.

Second, people misreport their own intent. Self-deception and denial let someone believe their aim was noble while their actions say otherwise.

Third, intent doesn't guarantee growth. If someone means well but keeps causing harm and never changes their approach, are those intentions still good? Refusing to adjust usually means the failure isn't registering as failure, because admitting incompetence hurts too much. So the world becomes the enemy, and the fault belongs to everyone else.

When someone plays the victim, pointing at the other person's behaviour or personality to frame a bad outcome as deserved, that reveals more about their moral position than any stated intention. So we should stop asking what characters say they wanted, and watch what they do next. A character who fails and tries to do better tells us more than any declaration of noble purpose.

That doesn't mean "it's the trying that counts." We're taught from childhood that effort matters more than success, but social and material rewards go to the people who succeed, and there's no consolation prize. Judging morality purely by wins and losses would be brutal and shallow, yet we still need to track how a character moves on from each outcome. Doing that case by case for every NPC in a city is a combinatorial explosion, so we need something more economical.

Meanwhile, binary morality, good versus evil, only works at the extremes. It's essentialism, the belief that each person has a fixed set of characteristics that defines them, and it produces villains who cackle and heroes who never stumble. Alignment grids like lawful neutral and chaotic good are easy to use, but they still flatten people into a handful of archetypes. A selfish person who drains everyone around them isn't evil, and being pleasant over coffee doesn't make them virtuous either. We need a system that describes rather than labels.

Traits, Desires and Stress

An alternative could be a weighted tag system of traits and desires. Each character holds traits such as altruism, loyalty, ambition, and cruelty. Each trait has a numerical value that shifts slowly over time and is paired with concrete goals that drive short- and long-term decisions.

Society sees some of those traits and the outcomes they produce, and what it sees feeds back into each character's choices. Moral, immoral, and amoral stop being labels and become perspectives: the character's own stance relative to conventional standards.

Characters can hide some traits and show others, and other characters may discover them or never notice. Partial knowledge is what makes image management and strategic exaggeration possible, along with the conflicts they cause. I traced the same asymmetry at the scale of states in Chaos as Strategy, where those who control information use it to stop their opponents from cooperating.

Consider a character who projects altruism but craves admiration. They bake a peanut butter cake for a friend's birthday, and the friend has a peanut allergy. When the friend doesn't eat it and explains why, the baker doesn't apologise. Flustered, they shift the blame by saying no one told them. They play down the harm by insisting a little won't hurt. And they demand credit for the effort despite the failure.

When challenged, they escalate. They call the accusation invalid, claim the allergy is made up, accuse the friend of ingratitude, and recruit others to back their version. Which account the room believes depends less on the facts than on who already has credibility, a dynamic I examined in Sousveillance, Trauma, and the Ethics of Witnessing.

Each step shifts how everyone present sees everyone else involved. The baker's low altruism, high need for admiration and near-absent self-reflection show through their actions, not through any stated intent. The system doesn't need a full history to capture this, only slow shifts in weighted values driven by outcomes and social feedback.

Traits that only describe are still passive, though. They tell us who someone is, not what it costs them to act otherwise. We've trialled one way of closing that gap at the table, borrowing the paired virtues and vices from Pendragon.

Whenever a character attempts something morally loaded, such as a lie, a betrayal or a bribe, they first roll against the relevant trait to see whether they even want to. An honest character about to lie rolls Honesty. If they fail, temptation wins and they're willing. If they succeed, their nature resists, but they can still go through with it at the cost of stress.

Then comes the drift: each successful morality roll pushes the character one step along that spectrum at the end of the session. The honest character who lied anyway comes back next session a little more deceitful, and the next lie comes easier.

The mechanic separates two questions most systems merge: what's optimal, and what's optimal for this person. Strip away morality, law, and social mores, and lying is often the obvious play. But when we put them back, the maths changes. You might badly want to lie despite being honest, but the stress has to go somewhere. Your character may already be close to breaking and unable to afford it. Or they may be fine now, and those ten points are what make them lose their mind three rooms deeper into the dungeon.

That gives a moral choice the same tactical weight as spending your last healing potion. The cost is visible, and the player chooses to pay it. That's the reverse of the hidden pricing and eroded agency I criticised in Engagement Systems, Part III.

It also solves two earlier problems. The system never asks what you meant; it records what you did and lets that reshape you. And it needs no case-by-case ledger, only a stress pool and a trait value drifting toward whatever you keep choosing. A character's history is compressed into who they've become.

Apply this to NPCs and the baker gets more interesting. Apologising goes against their need for admiration, so it costs stress. Doubling down is cheap, and each time it works, they get better at it. Under pressure the cheap option wins and the trait hardens. That isn't a cartoon villain; it's how people actually get worse, one easy choice at a time. The reverse also holds: someone who keeps paying to do right gradually makes doing right cheaper.

Towards Real Social Combat

Real social combat isn't rolling Persuasion to win an argument. It's a web of traits, desires, perceptions and revelations: characters who don't fully know each other, perform for different audiences, pay a price for acting against their nature, and change slowly through repeated failure and rare success.

We don't need to solve the hard problem of consciousness to build this. We need to stop reducing morality to a single stat or a tidy grid and model the material interactions that produce moral behaviour instead: actions, reactions and the slow work of becoming someone. I came at that last idea through fiction in A Thousand Refusals, where the lives we decline shape us as surely as the one we live.

Built that way, a game world can feel as complex, contradictory and strangely hopeful as our own.