Saturday, August 02, 2008

Rethinking Combat

In Idols of War 0.1, I followed what could be called the "standard model" of text-RPG combat. That model is thus:

1. Pick a character.
2. Have that character take an action.
3. Calculate and apply the results of that action.
4. Pick the next character, and repeat.

However, I now think that this might not be the most satisfying form of combat for an interactive fiction. What seems more interesting, both from a gameplay perspective and from the perspective of generating prose, is this:

1. Pick the character with "initiative".
2. Have that character declare an action.
3. Have the other character(s) declare an action.
4. Calculate and apply the results of all these actions.
5. Repeat.

The basic scenario I am thinking of is one where you are attacked by the enemy, and then must make one of the following choices:
  • Dodge the attack, minimising the risk of being damaged but also minimising your chance of taking initiative.
  • Parry the attack, moderately decreasing the chance of being hit but also increasing the chance of winning initiative.
  • Counterattack, taking a big risk but also opening the possibility of both damaging the attacker and winning initiative.
It seems to me that this model would make fights more dynamical, would increase the feeling that you are actually interacting with an NPC rather than just optimising a number, and would allow for more interesting interactions with the environment and more interesting tactics. You definitely want to duck away when the trooper throws a fragmentation grenade, to kick the table when the guard rushes you, to cast Disrupt Spell the very moment that the necromancer intones the chant of Unholy Blasting, to dive into the water when the dragon breathes fire.

In such a system, "initiative" would be something that you want to have but can't easily get. Getting initiative is always a bit of a risk; alternately, some particularly good actions will have the negative side effect of giving initiative to your enemy. There are actions that can only be taken when you have initiative (attack, throw fragmentation grenade, cast summon imps) and actions that can only be taken when you do not have initiative (dodge, parry, counterattack).

The only thing that would be really complicated is fights with more than two combatants. But it will be worth it; think of how cool it would be to throw yourself between your team mate and her attacker so she can concentrate on casting that healing spell she badly needs.


  1. Have you played any RPGs? Preferably Pen&Paper...there would be a lot of ideas for combat systems there...

  2. I've been pondering how to implement a similar system for a game with fencing scenes, and I wonder how flexible you're imagining making step 4 of the new model ("Calculate and apply the results of all these actions.").

    I know Idols of War 0.1 used a numerical "hit points" result to combat actions, but I was thinking about making the results of a fight action be more narrative, and dependent largely on the kind of scene taking place.

    For example, if you're dueling with your fencing master, touches might result in either congratulations or advice, while fighting a major villain who you need to face again later in the story would result in either a humiliating disarm (if you lose) or a scornful, mocking retreat (if you score a hit). I was thinking that this might be a better fit to the IF form, at least with more narrative games.

    Would this model work with the system you're thinking about developing?

  3. Mike:

    Yes, absolutely. It will be easy to turn off the hit point system (and even easier to just don't do anything with it), and solely depend on other means of rewarding and punishing the player. Flexibility is one of my key design goals.

    If you're serious about making this fencing game, send me an email. We can work out what you need and whether I'll be able to deliver that to you. It would be a good test case for the flexibility of my toolkit. :)


    Yes, I have played quite number of pen & paper RPGs. What works with pen & paper is not the same as what works with IF. For instance, systems like D&D 3 can get away with all kinds of spatial relations ("if you get within someone's reach", "a 30 foot cone", "a gargantuan monster") that are simply not feasible to use in an IF system. On the other hand, I can implement a complex system that tracks (in the background) who is pressing who and should have the advantage of going first, which would be too much overhead for a pen & paper game.

    So, yes, you can learn things, but you can't automatically go from one to the other.


  4. Victor,

    Thanks for the offer, but I really should work more on my dissertation than on IF for the foreseeable future. I just wouldn't be able to give you timely feedback, unfortunately.

    Regardless, glad to hear that both narrative and numerical results are possibilities. I'm looking forward to seeing this system come together! It's certainly got me thinking...

    Thanks again!


  5. Hi Victor! I've been thinking a bit about combat in IF, and I just played through a little Idols of War, and thought you might be interested in my thoughts (even though they're way late compared to the entry).

    First, the bad news: I didn't enjoy Idols of War much at first -- though I have just found a decent build, and am cruising through the bat cave -- but still, I won't play it as much as the other combat games I can find. But I thought it might be interesting to compare it with the combat games that I do find mildly addictive. Games like Kongai (played against the Kongbot), Monster's Den, and Sonny, all of which you can probably find fairly easily (and none of which are primarily focused on plot -- Sonny is the one that has an interesting atmosphere and a story, but you can search for it on Emily's blog to find why the story is problematic).

    So, some of my problems with Idols. First, I found the game just too unforgiving -- when you get beat down to 3 HP in a fight, it seems almost impossible to get your HP back up. Second, I never knew where I should concentrate my efforts -- one clearly wants to beat up one enemy at a time (since four partially-wounded enemies do as much damage as four healthy ones, but three completely health enemies do less); but the only way to find out an enemy's total HP is to attack it. I suppose one could learn this by trying and dying, but it seems too much of a chore.

    Third, my variety of attacks didn't seem great enough; the basic strategic choice is to charge up by dodging/parrying and concentrating, but in the meantime your foes will be getting increasing deadly combat bonus -- and if even one foe gets through to you, all your bonuses reset, meaning that the foe essentially got a big hit for free. [Though I have just discovered that cursing all your opponents really helps here.] And getting any other choice requires purchasing skills, which you can do once or twice per game -- while the skills themselves weren't apparent until I committed my purchase. [Ah, I see: there's a menu, which even explains why determination doesn't work against the mud crab. Still, having to go through this menu is a little onerous.]

    ...oh, and there's a disambiguation bug when you're fighting bats.


  6. Most of that can be summed up either by "More transparency" or "easier balance," and isn't so hard to fix. But I think there's a bigger issue at least for me -- it's still too random. The other games I mentioned are all pretty different, but they all have attacks that deal the same damage most of the time, with a pretty small chance for a miss (and possibly a chance for a crit). Most of them have different types of attack, which may vary in effectiveness against different opponents; but the basic damage you can expect is the same. You have to worry about how you build your character, whether to buff, heal, or attack, how to preserve your energy (all feature fairly energy-draining attacks and natural energy regeneration), whether to go for a blow that does a lot of damage right away or one that bleeds, one that damages all opponents or just one -- like that. (Not all these games have all these choices.) I think one thing that makes these more engaging, at least for me, is that it lets the game hide the dice-rolling; in your model you pretty much have to display the dice rolls or we'll have no idea why what happened happened, whereas with attacks that usually do the same damage this isn't a problem.

    Now, all these games use multiple characters in a way that doesn't fit most IF very well, but they use them in different ways. Monster's Den is the only one where you tell each character what to do in turn. In Sonny you start with one character, and when you get allies they're AI-controlled (not always very usefully); in Kongai you have one character in play at a time, and part of the game is figuring when to switch characters out -- which might be simulated in IF by switching weapons instead.

    Of course one could program in some IFfy things, like shooting a flame arrow at a barrel of oil instead of at an opponent, to get an area flame attack against everyone.

    Anyway, some thoughts -- as I said, I'd been thinking about this, and I thought I should try your system, which is really the only combat system I'd seen beside Tolti-Aph. (Which really isn't much fun at all in itself. It's too much like the tabletop combat systems that don't really work without positioning.) So don't take this too harshly! I thought you might want to know that some people are playing, and to get feedback. Also, I finally did clear the bat cave -- thank you, Curse!

    Your "initiative" idea sounds very interesting as a way to make things more narrative, though. I think the important thing is to give the player meaningful choice.