I7 - Renaming doors.

Hi everybody,

I’ve been playing around with I7 for a little while now, but this is my first post here.
I was just hoping somebody might be able to shed some light on something for me.

I want to rename doors, because I would like to have a rule that says ‘Understand “door” as a door’, but I want that rule to not include things such as ladders or gates. Ideally, I would rename doors to exits (or something of the like if exit is already a keyword), and then have a door as being a kind of exit.

Is this possible? Is it dangerous?

Thanks. :slight_smile:

— Neo

I may be misunderstanding your problem, but:
One thing to keep in mind is that “too many synonyms” is rarely a problem, since Inform will do a certain amount of disambiguation on its own. For example, if you have a door called “the cellar door” and another door called “a mysterious ladder,” technically Inform recognizes that “door” could be either of them, but it’s likely to decide that just plain “door” means the former. Inform will already understand “door” as a door, and doubly so if the door has “door” in its name. You might have problems if the player refers to “the mysterious door,” but what player is going to do that?

If what you mean is that you want to make specific rules to apply to ladders but not non-ladder doors, I think what I would do is make ladders and gates and so on into subkinds of door. You can then play around with “does the player mean” rules that apply to them.

(Now I’ve looked at the word “door” too much and it has stopped having meaning…)

Actually my problem is exactly the opposite. I want to have rules that apply only to doors, but not ladders. For this reason I really want ‘doors’ to be a sub-kind of ‘exits’ (where ‘exit’ replaces the current meaning of ‘door’).

A workaround could be to simply make a sub-kind called ‘doorways’ or the like, but I’d like to know if it’s possible to actually rename ‘doors’.

I don’t think you can change the use of the word “door” in your source code. But I think defining doorways as a kind of door and including “understand ‘door’ as a doorway” should work fine; when the player types “door” it isn’t understood as a door by default unless you’ve included an understand line to that effect. (This is true of kinds in general.)

Aw man, I could’ve sworn that Inform understood the name of a kind as referring to whatever instances of that kind are around, but no, mattw is right. I wonder where I got that idea?

Well, sure, but you can say things along the lines of Instead of doing something to a door: [tab]unless the noun is a ladder:

But yeah, I think the best you can do in the direction you want to go, without trying to hack the entirety of the Standard Rules, is to make a new door kind called “doorway” or “truedoor” or something. Trying to rename doors would really just be aesthetics in your source code, wouldn’t it?

Yes, it would be a purely aesthetic change to make things easier to read/write in my source. I’m happy enough to use a sub-kind, I guess I was just hopeful.

You could investigate changing your copy of the Standard Rules (look under open extension in the File menu I think) so that you rename doors there. I don’t know if this’ll create other complications though.

I may look into that at a later date, but I don’t think I really need to go to that much trouble.