§14.3. More on adapting verbs
If we need an adaptive message with a verb which doesn't belong to Inform's built-in set, all we need do is define it. In the previous chapter we defined verbs by giving them meanings, but in fact that's optional. For example:
To retrofit is a verb.
defines a verb without telling Inform what it means. Inform will throw a Problem message if we try to write text like:
Flash retrofits the meteor beam.
because, after all, it doesn't know what "retrofit" means. But it does still know how to print it, so this works:
"[The actor] [retrofit] the Mecha-Mole."
which might come out as "Dale retrofits the Mecha-Mole", or "Barin's archers retrofitted the Mecha-Mole", and so on.
This is especially neat for writing a single response to an action which works regardless of who the actor was. For example, the Standard Rules include:
say "[The actor] [put] [the noun] on [the second noun]."
And this can make either:
You put the revolver on the table.
General Lee puts the revolver on the table.
![]() | Start of Chapter 14: Adaptive Text and Responses |
![]() | Back to §14.2. Adaptive text |
![]() | Onward to §14.4. Adapting text about the player |
|
|
Mostly the Standard Rules use verbs adapted to finite forms ("he jumped", "we take the hammer", and so on). But Inform can also produce participles to describe actions that are ongoing: "he is carrying the fedora" or "taking the hammer..." In this example, we give non-player characters actions to perform and then have Inform dynamically describe what they're doing when the player chooses to look. We start by establishing the idea that a verb can describe a particular action:
Now we need to give every character some sort of idle activity. By default, we'll have people just be waiting, but allow for that idle activity to change into something more interesting if the player has told them to do something else.
And just to give past participles a test-drive as well, let's make Clark a bit of a drama king:
|
|
Mostly the Standard Rules use verbs adapted to finite forms ("he jumped", "we take the hammer", and so on). But Inform can also produce participles to describe actions that are ongoing: "he is carrying the fedora" or "taking the hammer..." In this example, we give non-player characters actions to perform and then have Inform dynamically describe what they're doing when the player chooses to look. We start by establishing the idea that a verb can describe a particular action:
Now we need to give every character some sort of idle activity. By default, we'll have people just be waiting, but allow for that idle activity to change into something more interesting if the player has told them to do something else.
And just to give past participles a test-drive as well, let's make Clark a bit of a drama king:
Mostly the Standard Rules use verbs adapted to finite forms ("he jumped", "we take the hammer", and so on). But Inform can also produce participles to describe actions that are ongoing: "he is carrying the fedora" or "taking the hammer..." In this example, we give non-player characters actions to perform and then have Inform dynamically describe what they're doing when the player chooses to look. We start by establishing the idea that a verb can describe a particular action:
Now we need to give every character some sort of idle activity. By default, we'll have people just be waiting, but allow for that idle activity to change into something more interesting if the player has told them to do something else.
And just to give past participles a test-drive as well, let's make Clark a bit of a drama king:
|
|