[IF] Progress on Inform ATTACK

Quite a while ago, I released something called Idols of War, which was a test case for tactical combat in Inform 7. The core of that game was a system I call Inform ATTACK, for "Inform Advanced Turn-based TActical Combat Kit"; and it kind of worked, but not all that well yet. (In retrospect, I spent far too much of the development time for Idols of War on thinking op cool powers, combat moves, monster abilities, and so on--all of which can be easily recycled, so it might still turn out to be useful.)

I didn't spent much time programming, the past months; but I've been busy the past few days, and I now have a completely redesigned Inform ATTACK. What features does it have?

Completely locally customisable

The original ATTACK was written using procedures ("To strike a blow: ..."), which then contained clauses for all the special things that could happen. The new ATTACK uses rulebooks throughout. This means that you can extend and change the core system without tampering with the code. All you need to do is write new rules, and specify in which rulebook they need to go; and if you need to take out the standard rules, they are all named, so that is easy as well.

What this means is that you can define a new action, monster property, environmental influence, AI behaviour, combat description, or whatever, and you can put all the code needed to implement this in a separate paragraph. Nothing needs to go in the core system.

That is good because: (1) you don't want to mess with all that code if you don't have to; (2) defining everything pertaining to a single action / circumstance / property in a single place is a good way to keep bugs to a minimum; and (3) the core system can be made into an extension.

By the way, I have fallen completely in love with rulebooks. They are both powerful and elegant; a brilliant programming concept.


The original ATTACK had no support for weapons; we have now have full support for weapons.

Artificial Intelligence

NPCs can evaluate their own combat options and make reasonably intelligent decisions about which option will be best for them; this includes choosing a target, choosing a weapon, and choosing an action. (The core rules implement AI support for all the core combat actions: attack, dodge, parry, concentrate, ready and reload.) Again, this can be easily extended for user-defined actions.

Variable combat order, initiative and reactions

In the previous ATTACK, the player always went first, and then the NPCs got their turn in a standard order. In the new ATTACK, the combat order is recalculated every turn based on events from the last turn--some NPCs may go before the player, others may go after him, depending on what they did, how much damage they took, how many people are attacking them, and so on.

If you are attacked and haven't acted yourself that turn, you must immediately respond. In such a situation, dodging and parrying get bonuses, and increase the chance that you may attack first next turn. You can also counterattack, but that is much more risky (though not always a bad idea).

All of this gives combat a much more dynamic feel.

Numbers on and off

ATTACK allows the player to choose between seeing and not seeing all the numbers that go into the combat calculations. Obviously, authors can set a default or choose to disable one of the modes entirely. Games where all combat is reported in prose should certainly be a possibility.

What's to do?

I think the best thing for me to do is write a serious game using ATTACK. That will allow my code to mature (and receive the bug fixes and extensions it almost certainly needs) before I actually try to release it as an extension--and it is certainly a lot more fun to write a serious game than to spend time on "testing content". I wasn't able to motivate myself to continue Idols of War, because the content that needed to be written to flesh it out was not in itself interesting. It was merely there to test the system.

If I work hard, I might be able to make the IF Comp. ;)


  1. When you say "support for weapons" do you mean support for ranged weapons? (Your reference to reloading later on makes me think this is the case.)

    But anyway, I'm really glad to see you are still working on this, and look forward to seeing what results. I wish I had had it when writing the game I have in beta-testing right now. Maybe in time for my next project. :)

  2. Hi Jimmy,

    That's a good question. Support for ranged weapons is not within the core system, but it can be easily added as an add-on. I've got some of the coded needed sitting in my Idols of War file; and I've got a pretty good idea about how I'd implement the rest.

    My basic assumption here is that you'd want to implement ranged weapons using sublocations: that is, some locations are subdivided into regions such that you can only attack from one region into the other with a ranged weapon. (People standing on the opposite side of a chasm, or one guy standing on a tower and the other beneath it, stuff like that; where all of this is within a single "room".)

    If you'd actually want to shoot from one location into another, things would get more tricky--there would be problems of scope and presentation to solve.



Post a Comment

Popular posts from this blog

Keeping the narrative pressure on

Thoughts on a Trollbabe session