How would it be possible to parse a property? As in, the interpreter understands that you are talking about the description property?
Check out 16.15, “Understanding things by their properties.”
Besides the examples given in there, that lets you do something like this:
[code]Lab is a room.
A thing has some indexed text called tag.
A Bunsen burner is in the Lab. The description of the Bunsen burner is “This shiny flask is shiny and flasky.” The tag of the Bunsen burner is “flask”.
Understand the tag property as describing a thing.
Test me with “x flask”.[/code]
However, this may not do what you want. For one thing, it would be much simpler just to say “Understand ‘flask’ as the Bunsen burner.” And this requires an exact match; if the tag is “shiny flask,” then it won’t allow you to understand “shiny” or “flask,” only “shiny flask.” If you’re looking for something that lets you make it so any part of the description is understood as referring to the thing, I’m afraid that the best way to do that is just to look at your descriptions and hand-code all the important words as referring to the relevant objects.
That’s not exactly what I meant. I meant how would you make it possible to parse the property itself, not the thing the property is referring to.
Masema, in the case of both a glitch in the system and a fart in the air conditioning, surely people would only notice them while they were there, and not after they were gone?
I make no sense sometimes.
OK, I don’t understand exactly what you mean. Can you give an example of the behavior you’re looking for?
What I mean is, to be able to refer to a description property, much how in MUDs you can describe yourself.
Do you mean for the player to set their own description? Something like this:
If that’s what you want, it’s a bit complicated because the description is a text property and I don’t think you can easily feed a piece of the command into a text property (the piece of the command is a “snippet,” which you can turn into an “indexed text,” and then you can put that indexed text into the description. I came up with this:
[code]Include Plurality by Emily Short.
Describing it as is an action applying to visible thing and one topic. Understand “describe [something] as [text]” as describing it as.
A thing has some indexed text called the user-generated description.
Report describing it as: say “Got it!”
Carry out describing it as:
let T be indexed text;
now T is the topic understood;
now the user-generated description of the noun is T;
now the description of the noun is “[The item described] [is-are] [user-generated description of the noun].”[/code]
If that’s not the sort of thing you’re looking for, it’d help if you printed a little in-game excerpt of the behavior you want; this kind of stuff is fun for me to play around with but if you aren’t more specific about what you’re looking for I’m afraid I’m not actually going to come up with anything helpful.
Something like this
Well, one thing you could do is include a variable to keep track of what you’re currently editing or if you’re editing anything at all. Then you could have an editing command that lets “edit monkey” turn on the editor and set the edited object to the monkey, and “exit editor” turns off the editor.
You could use the code I posted for the description; you’d just have to change the “understand” statement to reflect your syntax, and change the references to “the noun” so they referred to the thing you’re currently editing.
For “now monkey is lit” it would depend on exactly what properties you wanted to allow the player to change. You won’t be able to make something that allows you to type in general sentences of Inform code and has the game perform the corresponding action, but if you have specific properties that you want the player to be able to set you could make a kind of value for them and have the appropriate command understand that kind of value and then set the appropriate thing.
I don’t think there would be any way to have the parser understand a general property of things in the game. (If you look at the “Kinds” tab of the index, K valued property has a big red X under the “under” column which tells you the parser can’t understand values of this kind.)
Iirc there is a series of infix verbs in i6 which would allow that. I could include that in the project and translate it. I would just need the i6 syntax.
What of implementing the infix verbs? That can be done. Can’t it?
You’re not referring to this, are you?
Because that lets you run code from within the text substitution, but it won’t let you take a player’s command and run it as code.
No, I’m referring to
. The I6 infix verbs.
I see. Well, I don’t know if it’s practical to hook those back into I7, but maybe someone I6ier does.