Hey all. I’ve attempted to work on my I7 project for the last two days, the vast majority of which has been spent careening between frustration, obtuseness and bafflement. In fact, I’m nearing my wit’s end; it seem that whenever I want to accomplish something seemingly trivial, Inform tells me it isn’t possible, and during the ensuing attempt to fix the issue regardless of the warning I inevitably get smacked with new, completely incomprehensible roadblocks.
A cage is a kind of container. A cage is transparent, openable, lockable, and enterable.
The Penitentiary is a room.
A cell is a kind of cage. A cell is closed and locked.
Nearness relates various things to various things. The verb to be close to implies the nearness relation.
Definition: a cell is the player's if it contains the player.
Definition: a cell is other if it does not contain the player.
Definition: a cell is closest if it is close to the player's cell and the number of cells close to the player's cell is not 2.
Definition: a thing is grabbable if the thing is close to the player's cell.
Understand "this" as a thing when the item described contains the player.
Understand "middle/center cell" as Cell Two.
Understand "left-most/left-hand/lefthand/leftmost/left cell" as Cell One.
Understand "right-most/right-hand/righthand/rightmost/right cell" as Cell Three.
Understand "closest/nearest/nearby" as a thing when the item described is closest.
Understand "farthest/distant/opposite" as Cell Three when the player's cell is Cell One.
Understand "farthest/distant/opposite" as Cell One when the player's cell is Cell Three.
The corpse is a thing. The corpse is in Cell Two.
Rule for printing the name of the player's cell when the reason the action failed is can't exit closed containers rule:
say "the cell".
Cell One is close to Cell Two. Cell Two is close to Cell One. Cell Two is close to Cell Three. Cell Three is close to Cell Two.
Cell One is a cell. Cell Two is a cell. Cell Three is a cell.
Cell One is in the Penitentiary. The printed name of cell one is "the left-hand cell".
Cell Two is in the Penitentiary. The printed name of cell two is "the middle cell".
Cell Three is in the Penitentiary. The printed name of cell three is "the right-hand cell".
Ane is a woman. Ane is in Cell Three. The player is Ane. Understand "your cell" as Cell Three.
The first thing I started with was the creation of a prison. I wanted to allow the player to interact with things that were close to the door, therefore I decided there had to be cells with bars. Since I don’t want to hard-code all the given items by hand, it being an ideal breeding place for bugs, I decided, “why not create objects that mimic this behaviour instead”?
My first attempt was to model any situation in which such cell cages could be stacked, wall to wall, in a line. It would have the following behaviours associated with itself:
- Close to was to mean thing close enough to affect by someone in a given cell. Originally, the only reason for that was to that was handling cage-to-outside actions, but it gained an additional use in showing which other cell was in range.
- The occupied cell would be referred to, and understood as, “your cell”, “this cell”, and sensible variations thereof.
- “The closest cell” or “the other cell” would be understood as the cell closest to your own, but only as long as you were in a cell, and only as long as there was exactly one cell in contact with your cell.
- “the left-hand cell” or “the right-hand cell” was going to be understood as relative to the cell the player was inside, but only if there was in fact a cell to the right or to the left.
So far, a veritable cavalcade of craziness has ensued. Some choice highlights:
- The word “other” defies any attempt at alteration by Understand statements, as far as I can see. I can find no documentation on this, but sadly, that makes it no different from most other issues. Once again, bringing out the trusty regular expression hacksaw seems the only way.
- “Your cell” as a word in the above text will never be properly capitalized during error messages and the like. It seems that the printed names of things aren’t treated like proper names, for reasons beyond my understanding.
- On a similar note, I can find no clear way of affecting names echoed during certain rule failures. This means the parser will always say “your cell is closed and locked.”, sans capitalization. If you do capitalize, the error instead crops up in the header and quite likely later on.
- Examining a translucent container will cause it to revert to the “search” action - unless, of course, you provide the container with a description. If you do so, the command will instead examine the container as usual; it does so even when the description text contains a list of its contents. Have found no explanation for this behaviour.
- Just an aside, but I still find it quite bizarre that we can declare “[action] is [x]”, as in “talking to someone is disobedient behaviour”, yet lack the ability to limit those conditions. Instead, we have to go the way of “instead of engaging in disobedient behaviour at the Inn” in order to box in the declaration and prevent it from wreaking havoc within the game world. I understand why it is so, but it is one more instance where the natural language approach hampers my progress.
- Largely defeated, I vowed to at least implement some measure of my idea. Accordingly, I scaled it down to three cells, and set the relations between them manually. This is where the vexation regarding printed name and “other” appeared, and neither would be appeased. Thus, it was also where I admitted defeat.
Bitching about I7 isn’t what I want to do, really. It’s a marvellous system in so many ways, and it really has made me wish to learn all I can. I want to create, not throw tantrums. However, at this point, I feel trapped and unable to do anything else.
I don’t know if the solution is to learn I6. I also don’t know whether I should even try, because there’s literally no way for me to know which parts of I6 is rendered redundant or explosive in an I7 context. I don’t know what will happen if/when I manage to finish this room; without ability to encapsulate the code, it may wreak changes both far-reaching and fatal. I could create a wonderful 98% of a game before realizing (as I have before, in some shape or form) that it suddenly no longer works, and hasn’t for quite some time. At which point, of course, the game is effectively beyond saving.
I don’t know which things are impossible or which are dead simple (quite often, official solutions seem to consider a problem solved when it is solved once, in a way that can’t easily be generalized). I don’t know whether implementing a thing will take five minutes or five days. And I don’t see myself improving on that score, either, because there’s only so much reading of the manual and forums one can do before knuckling under.
“This was a simple room,” I thought. “The player is imprisoned. There’s another cell, and through the bars she can barely reach something in that other cell which will allow her to escape.” That is, of course, where the complexity lay. But… still. Complexity, true, but overwhelming? Since I can specify its behaviour quite well using meta-code, that is not likely to be the issue.
So I guess a rather embarrassing diatribe now segues into these questions:
- Is I6 the only way out of this mire? Is there a way at all?
- What parts and conventions of I6 will no longer work and/or destroy I7 when introduced to it?
- How do I make a printed name behave like an actual name?