-
Notifications
You must be signed in to change notification settings - Fork 11
Library: Enhanced It
Using this library, the player will be able to use "it" and other pronouns. Where this is enhanced is that that each pronoun will be remembered so "it" can refer to one thing, and "her" to another. This will be remembered more than one turn, so the player can keep referring to "it", as long as the object remains visible. The player can also refer to "it" when asking and telling. Here is an example exchange to illustrate:
> get teapot
You pick it up.
> talk to joanna
'I like your hair.'
'Do you like it this colour?' she asks.
> drop it
You drop it.
> get it
You pick it up.
> x her
Joanna is quite pretty; she has green hair.
> x it
It is blue.
> ask her about it
'It is just some stupid teapot!' she says.
> ask joanna about her
'That's me!'
> ask joanna about her hair
'Do you like it green?'
Before we get to the library, it is worth noting two approaches to handling pronouns. Consider this transcript snippet:
>GET HAT
You pick up the hat, and a rabbit jumps out.
>X IT
Should the parser understand "it" to refer to the hat, the last object the player referred to, or the rabbit, the last thing the game referred to? Old school IF said the former, and one very good reason for that is that it is far easier for the parser.
A problem with doing it from the last object described is that that may be difficult to work out. Quest allows the object list to be before the room derscription, and there may be no objects listed, so should the player expect "it" to refer to the last object in the room description? Or even in an item description? In the example above, how would an author flag that the rabbit should be the thing "it" refers to?
That would be tricky to code, but more importantly it would be a hassle for authors to implement, as the last object in every description would need to be flagged manually. And then you might have dynamic descriptions, descriptions with male, female and plural objects. Should we expect this exchange to work?
You are in a small room, where you can see a man sat on a chair.
> X HIM
If you do, how is the author going to tell Quest that "him" should refer to the man, and "it" to the chair?
With that in mind, I am going to take the position - rightly or wrongly - that "it" should refer to the last object the player referred to.
The library can be downloaded here:
Once you have added the library to your game, you need to add this line to the start script of the game object:
game.lastobjects = NewObjectDictionary()
You are now all done. Just test it and see how it works.