Combat Systems.

I’m curious about combat systems across different engines.

With TextWorld it was quite simple- item kills monster. This was apparently just a version of “key/door” except the door might kill you.

This seems to be the way for most earlier engines, but I have no idea how TADS handled this by default- so far I have not gotten far enough in “Unnkulia” to find out assuming combat exists in it.

How does the system you are using handle it? Simple item/kill, something more complex- if so, how? Like First Edition Dungeons and Dragons? Something in-between?

If you did something not default how did you set it up?

AGT has the usual item/kill setup but with the addition of if in a room with a monster you cannot leave- this inherited from GAGS. Meta-commands always allowed you to leave the room but if you wanted the monster to chase you then the number of meta-commands just for that one thing could increase exponentially. You could just have one/exit to just allow you to leave the room of course.

I removed that. Now any number of variations are possible without so many meta-commands, it is all default.

But for a combat system I decided on something simple yet interesting: the three-number system. When encountering a monster three values are plugged in to three temporary variables. The first is your percent chance to hit something. If it’s 70 that means you have a 70% chance to hit- but if you miss the opponent automatically hits.

The second is your starting points. The higher it is the worse because it is a race to 10- each time someone hits a point is ADDED to the other’s variable. Thus if you start with 8 two hits against you means you lose. The third number is the starting number for the opponent.

This actually encompasses quite a bit. The percent pertains to the difficulty in successfully “hitting” something, like Armor Class did in old Dungeons and Dragons. The other numbers relate to toughness and/or effectiveness of an attack.

Say you are up against a tiny spider. The numbers are 5-9-9. This means that both you and the spider are very vulnerable to the other’s attack: if it bites you you are down; if you stomp it it is crushed. So first hit determines the winner. But that 5 means you have little chance of hitting it. Thus given how one bite ends the fight you are better off avoiding it or bringing in something to even up the odds.

Now, if it’s 85-7-2 this means it is easy to hit with effect, you are fairly susceptible to its attacks, but the thing is tough and takes a number of hits to defeat. You can combine this with other things so maybe if you don’t score enough quickly enough you must leave (if possible) before it simply gets you. Of course if you leave and return it, like you, has regenerated.

It is also possible to include regeneration, something to neutralize your attack (you hit a fire elemental with water but it suddenly evaporates the water, 10% chance), or you have a super attack- like a Super Splash which wins absolutely but can only be used once.

For a text game not bad, really. But what do you have? What is the default way your tools handle these things? I’m genuinely curious to find out.

All of the parser IF systems since the 1980s have left this entirely in the hands of the game author. (ZIL did this too.)

There is generally a standard verb “KILL/ATTACK noun WITH noun”, but the library implementation is some variation on “Violence isn’t the answer to this one.” If you want combat in your game, override that and build it.

(TADS may have more bits and pieces available, because TADS has a philosophy of overimplementing bits and pieces. But they’re not part of the game by default.)

As I said in an earlier thread: all these systems have come down firmly on the side of doing the entire world model, as much as possible, in the same programming language that the author uses. Putting in a non-customizable combat model is clearly hopeless, because you know each game is going to have its own approach. (And 99% of IF games don’t have any randomized combat at all.)

I like the three number idea because the player can read the risk at a glance instead of guessing what a hidden roll will do. In parser games I usually prefer combat that stays simple and tied to the story, with a clear item or choice that changes the outcome. Random fights can work, but they need to feel fair and give the player a way to prepare or back out.

the most complex combat system i have seen / played for text adventures is kerkerkruip (i had to google the name) with the ATTACK system

My own Spring Thing game (let’s hope!) is mostly combat. The systems are fairly elaborate. I think anyone who wants to make a game that focuses on combat is going to want to build a system of their own, as there are a lot of fundamental decisions about “what kind of game is this” that have to get worked through.

I’ve actually have been trying to figure out a combat system for my game. Basically, I want to make one that is easy to use but interesting enough to be fun.

I’m approaching it from the pov of why do I have combat in my game.

I have combat because:

  1. I want to have a fun magic system.
  2. I want the player to be able to react to negative encounters.
  3. I want the player to find ways to grow and use skills in different ways so there will be reasons to tryout different builds.

So, keeping that in mind I’m trying to figure out the best approach. Haven’t decided yet because the hardest part is making sure it doesn’t end up too intimidating or overwhelming for new players.

So, high-level theory: combat has been a mainstay of videogames since the 1970s. Why? Because “make number go down a little” expands into a very dense space of mechanics, and optimizing your way through that space is fun for players.

This can go a lot of different ways, of course. I think the place to start is that UI matters. If you’re going to hit the monster five times before it dies, and there’s twenty monsters coming at you, the “hit” command had better be really quick and frictionless. In games in general it’s one key/click and you can hammer it.

(There’s a genre of game now where attacking is zero clicks; spraying bullets is automatic; the game is about position and rate-of-damage.)

Nethack’s combat is slower; attacking is still one key (for a basic attack) but you can think about choices after each blow. (Because the UI is not real-time!) So the mechanics are set up so that you usually do want to think about your choices after each blow. Hammering attacks is a fool’s mistake.

Kerkerkruip goes to the opposite extreme, because it retains the parser-style interface. Typing any command five times is high-friction. So the game adopts a “one-hit kill” model; you never have to repeat a command.

For an in-between example, you might look at Kingdom of Loathing (and spinoffs like West of Loathing). These have a browser-style menu interface. You can click quickly, but options may change so it’s usually worth considering at least a little bit. Where the Loathing games differ from Nethack is that they have almost no luck factor. A blow always lands and it does a nearly fixed amount of damage (there’s only a small range of variation). So, for a given set of skills and equipment, killing a given monster might always take six blows; there’s very little chance of taking it down in five blows. If the monster can kill you in five blows, the battle is unwinnable! But if you go off and upgrade your attack by a couple of HP, you get it into the range where you will kill it in five blows; now the battle becomes unlosable. (And healing is free after combat.) So the whole game becomes a series of gating encounters.

One high level consideration: Combat and stat management is fun in action RPG games, but not always so much via text where it can get very repetitive.

What I mean is cutting away from your story for a long extended sequence of turns where a character and a monster trade blows chipping away at HP can get monotonous in plain text unless great strides are made to make it interesting every time. Problem is, combat length in this circumstance isn’t prescribed, so it’s hard to write unique, authored action for every turn, and you end up working on lots lots of random text variation. The thing you probably want to avoid is transcription that’s like…

ATTACK GOBLIN
You deal 2 damage with your sword!
The Goblin swings at you!
Your shield absorbs 2 damage!
You take 1 damage!

ATTACK GOBLIN
You deal 3 damage with your sword!
The Goblin swings at you!
The Goblin misses!

CAST FIREBALL
You deal 5 damage with your fireball!
The Goblin drinks a potion and heals 2 Hit Points!

SHOOT GOBLIN
You deal 1 damage with your bow!
The Goblin swings at you!
You take 2 damage!

[etc…etc…]

For a text-based game without any fancy interface, one option is to avoid extended turn-based combat and resolve the entire combat in one interaction - have the system gauge how successful it might be, then give a general high level outcome of how the combat went.

You can write random varying text but that also gets monotonous, and resolving combat in a more narrative than mechanical fashion doesn’t as quickly drain your database of varied responses if you use them. Along the lines of what Zarf said, if you’ve played or seen card-battle games like Inscryption or Hearthstone/Magic - that might be more of a pace to investigate. There aren’t dozens of creature hit points in play, so tiny instant-resolve battles contribute to more of a tactical management of resources game than repeated turns of just selecting the “attack” button over and over.

It’s much easier and sometimes preferable to make battles narrative-based in IF - the player either has the stats/resources to win in one interaction, or they don’t, and each outcome has a tailored description. The combat is setting up the battle and seeing the outcome rather than participating in a long sequence of RNG dice-rolls.

I was a big Pokemon and golden Sun fan back when I could see well enough to play video games in the usual way and occasionally played other turned based RPGs(Was also a fan of SRPGs, but my experience is that a battle map is much trickier to render in pure text in a way that’s easy to parse with a screen reader, especially for large maps), and have more than once wondered what it would be like to play a text game that combines parser style exploration and puzzle solving with RPG style turn-based, menu driven battles. Granted, one designing the battle system for such from scratch would probably want to look at RPGs with on average shorter battles… Though I did often play Pokemon with attack animations turned offreducing battles to often little more than

[pokemon] used [move]
Foe’s [Pokemon] used [move]

with the only variation being announcements related to status conditions, a super/not very effective message for attacks that don’t do neutral damage, etc…

between picking actions

Granted, turning off animations often coincided with mindless grinding while my focus was mostly on a television show or external music.

Though, if you have a status bar and one-on-one battles, you could probably get away with not having damage reports in the running commentary and just having a HP display in the status.

I agree with what zarf and Hanon said. To put it a slightly different way: what’s fun about combat in IF? What about the experience do you intend for the player to enjoy? Because simply typing “attack” over and over until you win—or worse, until you lose, undo, and try again for better RNG—generally isn’t fun.

This is a question that, generally, individual game authors have had to answer. Nobody has really had success creating a general-purpose combat library that everyone else adopts and uses. (Inform ATTACK tried and broadly failed; it hasn’t really caught on beyond Kerkerkruip.)

Most games’ answers are either:

  • Combat is a puzzle in disguise. At the start you can’t beat the enemy. After doing something (increasing stats, getting a magic weapon, etc), you can. It’s effectively a more flavorful lock and key. (Treasures of a Slaver’s Kingdom and many other old-school parser games.)
  • Combat is randomized and players generally find it tedious rather than thrilling, for the reasons zarf discussed. I would consider this a failure mode. (Zork I, The Reliques of Tolti-Aph.)
  • The author comes up with some way to turn combat into a tactical minigame. So far, nobody has managed this well enough to make the community go “oh, that’s cool, we should start emulating that”. (Kerkerkruip.)

By all means, keep experimenting! This is very much not a solved problem in the field. But it’s a very big problem and one that’s probably going to take a lot of thought and experimentation to solve. Think about what obstacles lie in the way of the player having fun (repetition, UI friction, reliance on luck…) and see if you can find a way to overcome them. Turn-based RPGs, as discussed above, might be a useful vein to mine—many of them achieve interesting tactics without relying on positioning (which is hard to convey in text).

A game has to fully commit to it and work through systems of input, feedback.

Some questions:

  • What happens if the player flees?
  • If there are different weapons, what do they do? Is it just a number?
  • Who attacks when?
  • How does healing work?
  • What friction needs to be removed for the typical parser player to want to play through a bunch of encounters?
  • What information does the player need to see, and is it painless to find it?
  • What numbers drive the results?
  • If there is randomness, how much is too much / just right?

This has very simple positioning support. There are near and intermediate enemies onscreen below. Check out that line spacing!

Clicking or typing the name of an enemy attacks with the currently equipped weapon (above).

I designed this specifically for people to play more than once, so there’s been a lot of focus on making this easy to engage with.

As a player, I remember enjoying the combat in 4x4 Archipelago. You may also enjoy this poll at IFDB which is about combat systems: Combat puzzle games - an IFDB Poll . I’m glad someone brought up The Reliques of Tolti-Aph because that is an example of combat that did not work very well for me.

I’m working on a parser/choice/hybrid engine myself that uses a scripting language that’s very similar to AGT/ADRIFT/ZIL, meant to mimic the older IF systems but with more modern features. Kind of a mashup, simple, and like extended markup. It’s got a built-in combat system, with peaceful/hostile/hostile on attack options, an armor system, an ammo system, and damage can have ranges (10-20) as well as base+RND (10+5 = 10 + 0 to 5).

With custom events/rules, you can also assign custom actions/abilities to items and weapons. Items can also damage or heal NPCs. And NPCs are just items/objects with HP. I’ll probably make a spell system in the future, but currently I can replicate one pretty easily just using custom commands, custom vars/flags, and the hostile/combat/ammo system that’s already built-in.

I’ve also got a built-in RPG stat system on my to do list, but as it stands, you can use custom variables to create a stat system. It doesn’t hook into the base combat system, but you could use it for stat/skill checks like choices or other things that are only displayed if you have some stat above 15 or whatever.

I also have a conditional system for room descriptions and choice system, that allows you to override room descriptions if var ><=!= (basic operands and binary flags) or to merge conditional choices (when conditions met) with base room choices. Another thing that’s cool, is you can mix n match exits with choices within a game, and you call also have a room with both exits and choices, in which a player can use navigation if able or make a choice. So, if you enter from the west, you could use West (or other aliases) or A or B, one of the choices. So, the player could backtrack, but presumably their progress would be halted until they make a choice.

I’m working on releasing a public beta (soon!) but it’s not ready yet. I’m doing this in a web wrapper for now, but I might port it to a full html/hypertext supported engine at some point in the future if there’s enough demand and/or me wanting to do it. I believe there are other IF or text-based engines that can do similar things. Although, I think a lot of them require workarounds, but you may be able to find premade combat/stat systems created and shared by other users if you do some searchifying for a specific IF engine as people do share code for that kinda stuff. You might even be interested in coding your own!

I of course have broken all my own suggestions before. I resorted to the dreaded timed combat in CPOS but part of that was intention to create a system and a puzzle about breaking it.

I made two gamebook-like games using Twine. Both are centered around randomized combat encounters, and of course I had to custom-code everything, which was a pain. But for the actual rule systems I went all out. Keep of the Mad Wizard uses a cut-down version of my earlier system Battles & Balances (originally designed for roguelikes) that I added back into a later edition as alternate rules. But it wasn’t ideal, so for The Unwanted Hero I devised better suited 2D6 mechanics based on Tunnel Goons (a pretty famous TTRPG with a generous open license). Unfortunately a third game never materialized, so this latest system remains unfinished. But it works well enough.

Naval & military historian pipes in:

The very origin of the TTRPG lies in small-scale tactical fighting, and indeed the first iteration of what became D&D was a “fantasy supplement” for a tactical miniature wargame (Incidentally, the T of TSR stand for “Tactical”.

legend says that the spark which borne the role-playing was that the losing (the defender…) side of a tactical siege miniature wargame session announced that the few survivors retreat in the dungeon for a last stand. And during the week or forthnight between the wargame club’s sessions was cobbled together a set of house rules for indoor/underground combat… and of course, the umpire (and First Master) was one named Gary Gygax…

Side point, the HP concept descends from the FV (Flotation Value) used in Naval wargaming for tracking the general damage done to ships, outside the specific damage impairing combat & speed (hence the concept of “critical hit success”, as happened often in Naval History (the demise of the Hood is still the “most studied split second in Naval History”…)

In one-on-one/small team combat what matters is the coordination, and one can’t underestimate the work of a TTRPG master in ensuring that the monster’s tactical behaviour is sound and consistent.

With time, the tactical side of role-playing gives way to a more balanced (and IMVHO more interesting) between trading blows and exploration/investigation (hence the core difference between adventures/IF and computer/console RPG; Japanese C/CRPG in particular weave a carefully designed history around the fighting (personally, I dislike the recent tendency of TRPG of placing what are longer and longer KN sequence between battles; personally, I have preferrend a more VN approach, with sound rewards (e.g. gaining allies, or enroll a weaponsmith) for right choices)

Data mining in CRPG has shown an interesting evolution of the monster handling: the gradual evolution of the monster tactics from simple sequences to elaborate scripts (I noted that in the first part of FF VII remake the final boss (Sephiroth)'s attack became much more vicious when the player directly control Aerith and this make damn sense for who has played the original FF VII (everyone known THE SPOILER, that is, the seven-second FMV sequence which redefines forever the console RPG narrative)

I play both IF and CRPG, and know well both sides of the gaming, and my opinion, albeit with a strong professional bias, is, I think, worthwile.

my apologies if this opinion is TL,DR.

Best regards from Italy,
dott. Piergiorgio

I would put Kerkerkruip on the “combat is a puzzle” side of things – either you’ve figured out the twist to the enemy or you haven’t. The actual tactics are extremely simplistic and “hammer the pattern of moves that you’ve already worked out while paying a attention to the randomness in case it makes you need to switch tactics.” The interesting tactics are all about which order you explore and approach the enemies in. You can probably only defeat enemies who are your own level or below (or maybe one level above?) so it’s about what are the odds of what might be on the randomized map locked behind a particular enemy, and when you’re going to get your health back, and what abilities you get when.

And I think the failure mode of these is for the game to just be punishing and tedious when you’re in the puzzle-solving mode. Kerkerkruip has this very strongly for me: the low-level puzzles of combat with each individual enemy are boring and mostly you’re just going to get killed (and have to wait until you randomly encounter that enemy in another run, and hope that you still remember or wrote down what you learned last time) and the game doesn’t become interesting until you’ve learned the game well enough to strategize about how to approach things.

But the usual way (in graphical games) to give you room to experiment is just to give you more health and healing items so you can survive long enough to do it somewhat safely. But then your combat needs to take more turns, which is painful in text.

The other possibility is that you can make the combat very simple and visible so it doesn’t take long to learn and you can get to the tactical stuff faster. 4x4 Archipelago did this: it was mostly just “click the button as soon as it becomes available” but fights didn’t take too long and it was mostly there with a lot of randomness as a push-your-luck mechanic – how far can you make it through this dungeon with your current level of upgrades? If you stock up on special items, maybe you can get farther with less grinding, but are you going to find enough loot to make it worth it? And that whole blackjack/Yahtzee/etc. push-your-luck thing can be fun even if the thing you’re doing isn’t that interesting. But again, you need to remove as much friction as possible.


I do think the JRPG model is promising: you have a party of adventurers who are facing off against parties of monsters. But even here, there is usually some positioning which is often the most interesting part of combat: strikes that hit a row or column of enemies; needing to kill the front rank of enemies before you can get at the rear row, etc.

But it feels like you could probably manage that in text. Ryan Veeder has done a bunch of experiments with JRPG-ish party-based combat in some of the Little Match Girl games. But as usual there’s way too much text so it’s hard to see just the bits that you want when you’re hammering through a bunch of combat actions. And as usual Ryan has very cool ideas but the execution isn’t really to my taste – usually in these games you don’t find enough spells or items that do interesting things so in practice you’re just hammering attack with all of your party members on one enemy at a time so you can gain a numerical advantage as fast as possible, and you fire off the special abilities as soon as they come off cooldown. So there aren’t a lot of interesting decisions.


There are also things like Dicey Dungeons, which could possibly work well in text. It’s mostly “input randomness” – you roll a bunch of dice but then after getting that random input you decide where to use each die.

On the dice side, there’s also Slice & Dice, which is JRPG-ish but each character is a six-sided die that you roll for which ability they can use this turn. But it also has a certain amount of positioning: both groups are in a vertical row where the ordering matters because attacks often hit adjacent targets, and the enemies can have front-row/back-row as well.


And there’s the classic rock-paper-scissors, where every type of action has a counter, and it’s about guessing what your opponent will do next and choosing the correct counter more often than not.

That can easily degenerate into “solve the puzzle of this enemy’s pattern” though. Or you need to code more complex enemy behaviors. But with good enough AI… playing David Sirlin’s Yomi against a bot can be fun. And that’s block beats attack beats throw beats block, plus a card-deck system where you can use “what’s left in the opponent’s deck?” card counting as you get later in the fight to guess at the odds of “what do they want to do?” vs. “what do they have the cards to do?” which is neat.

AP Thompson’s Fortune-499 dodges the question of implementing difficult AI by having the enemies choose randomly and making you a “fortune teller” who can manipulate the enemy’s odds. I wasn’t particularly into the game but it was a clever idea. And you may already own it on Itch from one of the big charity bundles…

…I’ve also often wondered if you could make an interesting dueling/combat game by taking inspiration from cribbage…

The main feature of AGT now is that the dreaded “trapped in a room with the monster” is gone by default. A creature template can by definition be a “groupmember” or not, meaning yes or no will it follow you. Originally this only applied to friendly creatures since it did not matter if you were trapped in a room with it- but now it does. This means by default you can leave the room and by default the creature will remain or follow you. If you want the default AGT/GAGS way it literally takes just one meta-command- in exchange for not needing dozens.

I have tested and succeeded with a number of variations: GAGS/AGT default style; you leave monster stays; you leave monster follows. It can also be that the monster stays unless you are carrying something; maybe a monster by default follows you unless you are carrying something. You can stun it so it stops chasing you for a time. You do something somewhere that triggers the, say, stone guardians to chase you- taking the sacred idol, and they will follow even if you drop it. Maybe a monster cannot follow you in a dark room but you need light there to do something important.

Early on after downloading AGT it was easy to figure out how to have more than one item affect a monster- and since it is meta-commands variations are possible: with the water sword you must engage in the three-number combat but with the ice globe one hit does the job.

A text game can simply be like “Wizardry” and “Zork” combined, and these had text input- in the case of “Wizardry” what were you going to use if memory serves. So I don’t see why text games should not have randomized combat. But one of the posts above had a superb description: if you know a monster needs six hits to be defeated but the most you can get in is five then you MUST become stronger in order to win. This can be a version of “you need X number of keys to open the door or else.”

But the three-number system seems to be a good middle-of-the-road for AGT. It is complex enough to be interesting and unpredictable yet streamlined enough not to demand too many meta-commands.

In a way the three number system is combined with a few of the ideas mentioned above. The game I am working on is for a friend based on a character of his. I decided because of the character to make this a “Water versus Fire” themed game. But to make it interesting I avoided the standard trope of Water always beats Fire. This meant using reality in a fantasy game. In real life water easily beats say wood fire. Water can beat magnesium fire but only in overwhelming (heat sink) quantities- use too little and you make it worse with blasts of super-heated steam and hydrogen flame. Thermite is unbeatable by water, but water CAN extinguish secondary fires and contain it (e.g. dropping a spitting thermite bar into a creek), or shield against the heat (using a water wall rather than actually trying to put it out). Oil fires can be beaten by water but ONLY if the character has obtained the means to convert Splash into a smothering thick water fog.

Thus there is a puzzle element: even in cases where Water does beat Fire application could be absolutely required.

It is also easy with default AGT to transmute monsters. If a fire mook is after you and your Water magic is recharging you do NOT want to run into the Fire Fountain Room since this transmutes it into a greater salamander which is “thermite” level and no amount of water can beat. The Deluge Room pours enough water to beat the fire mook, but the Rain Room only causes dangerous flares and steam (percent chance of you being overwhelmed). Possibly in one case the Rain Room would weaken something. Maybe you do NOT want two monsters to be in the same place or they combine into a greater salamander.

But why shouldn’t a text game have randomized combat? It adds a thrill of uncertainty, just like tabletop “Dungeons and Dragons.”

Enhancements can be added. Carry the azure ruby and for three combats you gain one more “hit” by subtraction. Quite a few possibilities.

Well, the obvious reason, which we’ve known since Zork 1, is that text parser games traditionally support unlimited SAVE/RESTORE. (And, since the 90s, multiple-turn UNDO.) There is no uncertainty in fighting the troll. ATTACK / UNDO until it dies.

But nobody in this thread is saying that text games can’t have randomized combat. We’re saying (a) 99% of text games don’t, which is a big hint; (b) you have to think carefully about the pace and rhythm of the parser interface and how the combat you’re creating fits into it; (c) every game with combat mechanics uses a completely different system.