Hi there, I’m a forever long IF player and (I think) an excellent programmer. Over the years I’ve tried to create IF in Inform 6, now 7 and although I can whip up very clever stuff in perl, delphi, powershell, etc… and was well on my way learning Inform 6, Inform 7 (which I think is an awesome work of incredible genius) gives me F I T S !!! Mostly that’s because of the extremely particular syntax with all of those subtly seductive mistakes - and while the documentation is excellent, I frequently come up with things I wish to do that I can’t find documented in any clear way.
Here’s my first question. One of my worst peeves with IF is when this happens:
“Here is a dark, long, polished, wooden table”
x dark long
“You see nothing special about the table.”
Argh that’s annoying. There is no true noun there, only exclusively identifying adjectives.
You might think it’s pretty insignificant and that most players will not do that and if they did who cares anyway, but I’m an OCD perfectionist and to me that is glaring. And I want my code to do EXACTLY and precisely what I want it to do and I don’t want it do do that.
I couldn’t think of a way to make Inform respond “Do you mean the dark, long table?” So instead here’s what could figure out.
BTW. If anyone would care to show me better, more efficient or “correct” ways to write or format any part of what I have here, I’d really appreciate that as I’m really a total n00b and don’t want to develop bad habits.
Ok now for my question:
Specifically, with my fix, before the first > of player input, there is an extra line break. I am using a ‘fake’ object (able to configure an object as a concept, I love that!) to force disambiguation as a way of handling this situation more gracefully. I cannot figure out how to suppress the initial appearance of that fake object so the best I can do is set it to " " which causes the extra line break.
Is there a way to block the initial appearance completely? Remove the line break before the > only the first time it is displayed? Other ideas? I wish I could make use of the ‘bug’ I reference but then my fake object would still be mentioned, as being on top of something else.
"Trial and Error" The Trial Room is a room having description "In this self-contained space, trials and errors take place." The table is a fixed in place supporter in the Trial Room having description "A long narrow table made of a dark polished wood. To it's front edge is a bright brass plate upon which is etched 'Judgement Table'." and initial appearance "A long, narrow table made of a dark polished wood stands prominently in this space." Understand "long", "narrow ", "dark", "polished", "wood", "wooden", "judgement", "judgement table" as table. Before examining the table: change the printed name to "Judgement Table". Before taking the table: say "You breathe in, flex your knees, grab hold and..." Instead of taking the table, say "It's far too heavy to lift or move." A gavel having description "a small, ornate, wooden mallet." and initial appearance "A small, ornate, wooden mallet lies on the Judgement Table."[due to a bug when an object is initially upon another object the initial appearance is ignored] is on the table. Understand "small", "ornate", "wood", "wooden", "mallet" as gavel. something else is fixed in place in the Trial Room having description "There is nothing else." and initial appearance " ". Understand "long", "narrow ", "dark", "polished", "wood", "wooden", "judgement" as something else. Before doing something to the something else: say "There is nothing else."; stop the action. Test me with "take long narrow / something else / take long narrow table / take dark polished / table"