18.1. On rules

| Chapter 18: Rulebooks |

| 18.1. On rules

When we open the casing and look inside the machinery of Inform, what we see are rules and rulebooks. We seldom need to know how this machinery works, but every once in a while we want to replace components, or even install new mechanisms of our own. And as we shall see, creating new rulebooks can be a neat way to tackle complicated simulations full of exceptions and special cases.

So far we have seen many rules, and the term "rulebook" has frequently but vaguely been used. Here is a summary of the rulebooks seen so far:

> before
> instead
> after
> check taking, carry out taking, report taking
> and three similar rulebooks for each of the 90 or so actions
> persuasion
> unsuccessful attempt
> reaching inside
> reaching outside
> visibility
> does the player mean

> when play begins
> when play ends
> every turn
> when Confrontation Scene begins
> when Confrontation Scene ends
> and two similar rulebooks for each scene we create, if any

> before printing the name of
> for printing the name of
> after printing the name of
> and three similar rulebooks for each of the 20 or so activities

Which makes around 340 rulebooks before we even start to write - and one more is going to turn up later in this chapter:

> procedural

All the same, not everything in Inform belongs to a rulebook - timed events, newly-created phrases, and definitions may look vaguely as if they define rules, but they do not, so the following are not rulebooks:

> At 11:10 PM: ...
> To dislodge the shelf: ...
> Definition: ...

Previous | Contents | Next