Half of any RPG experience takes place inside the player’s head. All I do is plant the seeds and leave you to figure out the rest.
The Adversary system is one that allows for recurring characters to have deep personalities and, crucially, memory. It transforms generic encounters to memorable events by using multiple layers of abstraction, a bunch of ‘event tags’, and a lot of cleverly-written dialogue.
Let’s get into the nitty-gritty.
Above you see a colourful array of characters. These are the unique NPCs who represent the command structure of each of Kenshi’s major factions. There are a lot of them, sure – that’s because they are grouped into ‘line-ups‘; that is, pre-selected combinations of NPCs who are prevalent characters in each faction. They lead their forces on the battlefield, command sieges, are semi-permanent roaming characters in the game world.
In total, there are 54 of these unique NPCs. In practice, 11 of them are present in any given playthrough. It would be possible, but far, far too complicated to truly randomise the selection of these characters, so instead the line-ups are predetermined. The selection of a line-up is one of multiple factors that are randomised for the overall ‘seed’ whenever you start a new game. Grouping them in this fashion allows me not only to save a mountain of work, but also to balance the line-ups against each other. You won’t end up in a playthrough where every general is a bloodthirsty lunatic.
These characters determine tactics on the battlefield, grand strategy, and special unit types available to a faction. The inspiration for special units came from the RTS genre, in which you’ve frequently got different types of squad or division available based on nation, faction, whatever. Here’s an example unit, the Samurai Yodoka, an elite commando type for the United Cities:
Each faction has 4 of these special units, and which are present (and which are not) is dependent on the general line-up. For instance, the United Cities may have access to mercenary armies; the Holy Nation to massive conscript forces; the Shek to suicidal berserker units who patrol alone and cause havoc wherever they roam. Yet all depends on the line-up that has been selected by a roll of the die.
Each general has a personality tag. These tags are present, but largely unused, in the base game. They allow for the random (or purposeful) assignment of a personality to any given NPC, which in turn allows for dialogue and AI decision-making to vary based on a character’s tag. For the generals, the most common are ‘brave’, ‘honourable’, ‘smart’, ‘traitorous’, and ‘maniacal’. The personalities influence their dialogue enormously, their situational decision-making, and more broadly, their strategic decisions. A brave general will never run from a fight and will act recklessly in deploying their forces. A traitorous general will abandon their men and run at the first sign of trouble.
At the head of each faction’s command structure is the top dog. These NPCs live in the capital to defend it (Blister Hill, Admag, and Heft) and can be visited there, assuming they’re not on patrol or out campaigning. On top of everything else, these characters have a broader effect on gameplay – the overall strategy of a faction is based heavily on their personality. If it’s a brave character, the faction will act aggressively. If they’re smart, they’ll prefer to defend and lure their enemies onto their home turf. And if they’re maniacal, they’ll focus on torching farms to the ground and slaughtering the innocent.
How do your interactions with them look in practice?
That depends on you. How you play, what choices you make. Each general has a collection of tags that are saved, permanently, that allow them to develop a relationship with you over time. Since these tags use world states, they can be cross-referenced between characters – so betray one and the others may well know about it.
Some tags are highly specific, such as ‘DEF’ (defeated player), ‘FFR’ (friendly, freed by player) and ‘KID’ (kidnapped). These describe a specific event. Others are far more generic, such as ‘ANG’ (angry) or ‘ALLY’. There is a crucial difference in the tag approach to more traditional alternatives. Consider for a moment the NPC relation system from Mount & Blade:
Your relationship with any given NPC is defined as a value that ranges from -100 to +100, 0 being neutral. While this allows for emergent relationships with any character, it’s ultimately a flat, boring, one-dimensional approach. You could go from blind hatred to sworn ally and nobody will care. All that matters is your present relationship, a number.
With tags, and some clever stuff behind-the-scenes (not all tags are activated by a single event), I can have NPCs who understand in greater detail the nature of their relationship with the player. Take, for instance, the ‘betrayed’ tag. This is only activated if you betray a character after winning their trust. Now they understand that, not only do they not like you, but that they once did. You’ve betrayed them and they take that personally.
This allows me to write interactions and dialogue in such a way that makes these characters feel truly intelligent. They remember your interactions, hear about what you’ve been up to elsewhere, react naturally as events unfold. Their reactions aren’t based on an arbitrary number system, but on specific, important events that they remember for all time.
So, how about a look at the dialogue itself?
Reduced to its inner workings it’s a clever juxtaposition of event reactions, their associated tags, random chance, and enormous ‘word-swaps‘, many of which are cleverly-written to allows me to string them together. For those of you who are unaware, a word-swap is a dialogue trick used by Kenshi to allow for extensive vocabularies. By and large, the vanilla game uses them for minor variations in dialogue – yet their potential is massive.
Here is an example wordswap that plays when you betray a general.
This is a reaction to an event such as an out-of-the-blue attack, or assassination attempt. Word-swaps can be nested, enabling me to create complex structures with shifting contexts. The ‘generaleventgood‘ word-swap looks up a series of previous events and strings together a sentence that sums up the player’s history with that character. ‘You would betray me, even after busting me out of jail and saving my life?!’
This means that these characters can monologue on the battlefield. If a general suddenly finds themselves on the other side of the conflict with you; once sworn allies, now fated to clash; then you can bet they’ll know about it and pause to call you out. ‘It seems that fate has turned against us, <yourname>… A shame, for I had once considered you my greatest champion.’
I mentioned in passing that these world states are cross-referenced. Which, in turn, means that your relationship with one character can influence that of another. If you’re a hated enemy to one, then another will treat you with suspicion or disdain. If you’ve done something truly dastardly, such as throwing somebody into a skin peeler?
Well, you’ll just have to wait ‘n’ see…
There’s a lot more detail to be unpacked and I’ve barely scratched the surface.
For example, every one of these characters has two underlings who use a scaled-down iteration of the same system owing to the fact that their longevity is… well, rather short.
Another aspect I’ll touch on is that each general has their own, unique weapon and will react if you steal it and are still using it later on. They probably won’t take too kindly to your nimble fingers, either.
For now, that’s all. I hope to have whetted your appetite and sparked your imagination. Kenshi’s dialogue system has enormous potential, and I fully-intend to unleash it. Stay tuned for more details on the finer elements of this and other systems.