Hi, it’s my first time on the forum, and I have been using Inform 7 for around two weeks.
My first project is in its final stages, but I am stuck. It is Japanese-mythology themed, for an English assignment.
At this point in the fiction, the player must look inside the sleeve of the kimono to receive the information he/she needs to win the game.
However, I cannot get my code to work.
“Look at sleeve” generates the correct reaction, however “Look in sleeve” is the logical thing for the player to type and I would really like for this to work properly.
Here is my code as it stands:
Instead of examining sleeve:
If player has Tanka begin;
Say "In the sleeve you spot the Tanka that Buta Shogun gave you on the night of the party. Maybe this has some significance. You should give it to Buta.";
Say "There is nothing in the sleeve. It must have been your imagination. Buta turns to you. 'Please, will you marry me?' He asks, kneeling down. Slowly you feel your form shrinking, and you change back into a fox. Enraged and shocked, Buta Shogun strikes out against you in anger. You flee him, and hide in the forest, spending the rest of your life as a Kitsune. That is why Geisha, to this day, are forbidden from marrying.";
End the game in death;
Any suggestions you all have are greatly appreciated. I’m at my wit’s end!
This won’t actually work – ‘Understand the command “blah” as something new’ only works on single words. In fact it’s a bug that the compiler accepts code with two words there (Understand the command “blah blah” as something new), since it ignores that code.
If you wanted to make “look in” always go to examining rather than searching, you’d have to use
Understand the command "look" as something new.
and then reimplement all the rest of the grammar for “look” (“look at,” etc.). This would be highly annoying! But if your game doesn’t ever use the searching action, you could just redirect all searching actions to examines, like this:
Instead of searching something: try examining the noun.
However, that has a disadvantage: Your check searching rule will be intercepted by the check searching rules previously defined in the Standard Rules. And these give the response “You find nothing of interest.” as soon as the player tries searching something that is not a container nor a supporter.
You could do the same kind of thing to the same result with instead rules. Just specify the conditions by a when clause inside the very rule preamble (this will also take care of most priority issues between your instead rules):
Instead of searching when <some condition>: try examining the noun.