Help with violent matters in Inform 7

More fun and games with Bob!

>turn bob on
[switching on bob]
He isn't something you can switch.
[switching on bob - failed the can't switch on unless switchable rule]
>set bob to 99.5 on your fm radio dial
[setting bob to "99 . 5 on your fm radio dial"]
No, you can't set him to anything.
[setting bob to "99 . 5 on your fm radio dial" - failed the block setting it to rule]

>consult bob about whether he's interesting enough to justify his continued existence
[consulting bob about "whether he's interesting enough to justify his continued existence"]
You discover nothing of interest in bob.
[consulting bob about "whether he's interesting enough to justify his continued existence" - succeeded]
>shut up bob
[closing bob]
He isn't something you can close.
[closing bob - failed the can't close unless openable rule]

>bob, enter bob
[asking bob to try entering bob]
Bob has better things to do.
[asking bob to try entering bob - failed]
>bob, enter yourself
[answering bob that "enter yourself"]
There is no reply.
[answering bob that "enter yourself" - succeeded]

>walk bob
[entering bob]
He's not something you can enter.
[entering bob - failed the can't enter what's not enterable rule]

But what if I’m writing a game where what you consider doesn’t matter?



Setting aside the translation of medium, I see no a priori reason why it shouldn’t be.


A lot of Inform’s fundamental assumptions about what can and can’t happen in IF are shaped by the community of a particular era, and also Graham Nelson’s English sensibilities. For a long time there was a special one-off feature in the compiler that would hide the existence of the verbs “drat”, “darn”, and “bother” from the Index. Those verbs had to be implemented, of course, in order to properly chastise a player who used them, but authors shouldn’t be confronted with them unexpectedly while browsing the Index either!

You’re mistaking a practical response for a moral one.

If killing the shopkeeper is one of the options, that entails a bunch of work for the author. You have to implement either damage states (wounded shopkeeper) or death (corpses, or at a minimum a puff of greasy smoke). Either way you then have to work out the following game state, which is quite possibly a delayed-failure; the shopkeeper can’t realistically go on and sell you that magic carpet after you’ve gone berserk on them.

This may be an interesting design problem, but Inform can’t ask every author to solve it in every game. Default responses must not change the game state, and they also must not lead the player to expect a change in game state.


Of course I may have misunderstood the original reference but, if it had said “but Inform is not Grand Theft Auto” I could have agreed or — at the very least — would not have a view as I have little experience of Inform and am not bothered by what it is or isn’t.

But it said “IF” which I take to mean “interactive fiction” and there I do have a view.

Again I was responding to the use of “IF” in the original quoted content. Perhaps I misread “IF” as Interactive Fiction when it was meant to be “Inform Fiction” or something like that? If the point is just about Inform I have no problem with it. It’s only if it’s trying to claim something about IF as a medium that I am bound to disagree.


But it said “IF” which I take to mean “interactive fiction” and there I do have a view.

With the risk of stepping on a few toes, I interpret the phrase “interactive fiction” as a more text-oriented than picture-oriented. So a game like Zork or LEM Lander (I’m showing my age) or Cave/Adventure is more in the spirit of interactive fiction than a point-and-click game like Leisure Suit Larry 5 or Doom or any of the myriad commercial MMORP games available on Android or iPhone.

Inform is a group of languages for writing text adventures, currently mainly Inform 6 (an object-oriented language like C++) or Inform 7 (a declarative language like Prolog, but with a natural language flavor). Inform 7 is built as an overlay to Inform 6. There are a number of other text adventure languages like TADS and Twine with similar goals but different underlying machinery.

With regard to the specifics of attacking, you’ve seen a number of replies (including my own). Inform 7 has a particular default way of handling a command along the lines of “attack ogre” or “crack nut”. It amounts to a check rule (called the block attacking rule) that spits out the message “Violence is not the answer to this one.” That seems to be the result of a consensus. But if your game requires attacking an ogre or cracking a nut, there are lots of ways around that.

If the check rule is a satisfactory response for most situations, you can insert some begin and instead rules to handle special situations, or some mistake or check rules to handle particular player errors. If the wording of the response is the only problem, you can change the response,

If your game requires a number of attack scenarios, you can unlist the check rule and create a report rule to handle the cases where attacking is not appropriate and use before/check/instead/carry out/after rule sequences to handle attacking.

If, like me, you want to separate the verbs animate objects (like attack and fight) from those with inanimate objects (like crack and break), you can do that, first by a statement like Understand the commands "crack" and "break" as something new., and then creating a new action to handle “crack [something]” or “break [something]”.

The nice thing about Inform 7 is that you can rewrite the rules. If you want (either as a desperate last resort(!), or because you want your parser to understand (e.g.) Finnish or Hungarian or South African English), you can even replace large sections of the Standard Rules.

The short answer is that Inform 7 makes some assumptions by default that (I believe) reflect a community consensus. If you disagree with those assumptions or need to make different assumptions for a particular story, you are quite free to do so. Naturally, some changes will be easy, others difficult, and (speaking now as a mathematician) some well nigh impossible.

I probably just shouldn’t have left my original comment.

I’m not trying to make any point about Inform or it’s uses.

I objected in principle to the statement “IF is not Grand Theft Auto”. Because while this is trivially true, I don’t think there is any principle that says you couldn’t, or shouldn’t, make an analogue.

But I will bow out here since this thread is really about Inform and I’ve nothing to say on that score.


A Grand Theft Auto-type game might be interactive fiction. It’s a containment relation.

1 Like

The short version is that when I7 first came out, interactive fiction was pretty much synonymous with Inform. There were other systems like TADS, but no matter what system you used, the community was pretty thoroughly focused on parser games in the model of Infocom (who originated the term). Other models of text-based games (like Twine-style choice-based works) weren’t uncontroversially grouped in under the “IF” label for several years more.

1 Like

To be clear, when I7 first came out, Twine was a few years in the future.


Inform was most-certainly designed to allow civilians to easily create a text adventure exactly like Infocom - all the way down to “boxed quotations” that I think were primarily only used in Trinity. Infocom was the trope-creator and ideal baseline for how a parser should work in text adventures. Other companies did things, but Infocom was known for its friendly parser that allowed you to do anything, or ideally could explain why you couldn’t do a particular thing instead of just shrugging and declaring “I don’t understand.”

Infocom never made any sort of open-world game with extensive combat on the level of Grand Theft Auto (though of course it could be argued it’s possible) and Infocom games rarely involved extensive fighting and combat outside of occasional “event” sequences and Beyond Zork which was a simple RPG with stats.

They were not creating first-person shooters (as those hadn’t even been invented yet) and not designing twitch arcade fighters or action platformers like Mario. The easiest way to keep players from going ham and breaking crucial props in their world-model based games was just to restrict any verbs involving damage or fighting, and a good generic refusal message that applies whether you’re bashing the mailbox in Zork or trying to punch the Vogons in Hitchhiker’s Guide is “Violence isn’t the answer…” or some variation.

Inform certainly isn’t saying you can’t make a game where the player goes postal; the rules are easily nullified and the author can build whatever they want. Inform by design purposefully follows the schema set by Infocom.


To be fair, the full text from the Standard Rules is less prescriptive, and is making the point that the Standard Rules response to attempted violence reflects the reality that parser-based Interactive Fiction is not usually geared towards violent solutions to problems, but also points out that such rules are made to be broken:

“Violence is seldom the answer,
and attempts to attack another person are normally blocked as being unrealistic
or not seriously meant. (I might find a shop assistant annoying, but IF is
not Grand Theft Auto, and responding by killing him is not really one of
my options.) So the Standard Rules simply block attempts to fight people,
but the action exists for rules to make exceptions.”

It’s not really making claims about what IF should be.


When we created Easy Doors, one of the possibilities was to make a door portable to essentially replicate the “portable black hole” from LGOP. I wrote this rule:

Check an actor entering a portable easydoor (called D) (this is the we are not MC Escher rule):

Giving rules names the player will never see is one of my favorite things!

Correct. In fact, it’s common for many games outside IF to disallow wanton violence for similar reasons, even if the game is combat-oriented.

  • RPGs and shooters often won’t let you kill plot-relevant quest-givers or NPCs. Often NPCs will not even react and stand like mannequins amid the chaos. Some may implement some annoyed dialogue in reaction “Stop that!” or have the NPC cower, or run away safely till your rampage has ended. A few might let you kill a shopkeeper then have them pop up again later with a tropey-handwave “I got better!” World of Warcraft had PvP servers where opposite faction could town-kill quest givers, but they’d regenerate within several minutes after the massacre so people could continue playing. I think the Fable series allowed named adult NPCs to be permanently eliminated to your detriment. But don’t try to chop down a scenic tree!
  • Almost every game universally will not let you attack, damage, or kill child characters because this would screw with their ESRB rating.
  • In most shooters or RPGs, you can beat on a wall or a door for hours with a crowbar and it will never break. That door still needs you to find the keycard to get through even if you blast it with a BFG. Sometimes you’ll be rewarded with a scuff or damage or bullet-hole decal but that’s cosmetic, the graphical version of the “Violence is not the answer…” refusal. Similarly, plot relevant buttons or switches rarely get damaged beyond repair, even in immersive-sims where this would make sense.
  • Now that technology allows, many shooters are littered with physics-responsive destructible scenery. CONTROL is a notable one, but once again it’s limited to specific furniture, scenery, and windows. They have bulletproof glass where necessary for plot maintenance and the Oldest House is made of brutalist solid concrete that can’t be destroyed except for chunks of concrete you can rip up to throw at enemies. (The Oldest House is basically alive and capable of self-repairing and rearranging which is plot-justified.)
  • Driving and racing sims rarely implement damage. Those short little walls prevent you from driving through crowds of onlookers. The few that encourage mayhem and destruction are notable. Grand Theft Auto is almost designed to be an outlet for driving aggression since you can run over anyone, and destroy selected scenery like light posts and mailboxes and other cars, but the sheer violence of that is mitigated since most pedestrians are usually bloodless moving scenery and cleared when off-screen. The legacy exception I remember is Carmageddon where was basically Death Race 2000 but with zombies as targets to make vehicular manslaughter “okay” in the context of an arcade racer where the only way to extend the clock and keep playing is to run over humanoids in a car.