Just started playing with this stuff 6 years later...

Is the current build Inform release 6M62?

Also I am getting an error with this code…

[LOOK IN + LOOK OUT]
Understand the command “look in” as something new.
Understand “look in [something]” as insearching.
Insearching is an action applying to one thing, requiring light.
Instead of insearching:
Try searching the noun;

Error says:

Problem. You wrote ‘Understand the command “look in” as something new’ : but ‘understand the command … as …’ is only allowed when the old command is a single word, so for instance ‘understand the command “capture” as “get”’ is okay, but ‘understand the command “capture the flag” as “get”’ is not.

This used to work with versions in the past in 2012… so how do i do 2 or more word commands…

Thanks!

6M62 is the latest release, yes.

As for your question, if you want to redirect “look in” to another action, one way to do it is just to target look:

Understand the command "look" as something new.

and then you have to put back in all the grammar lines for “look” that you actually want. Which is annoying.

Recent versions of Inform let you do something that might be simpler. You can say

Understand nothing as searching.

and this will delete all the grammar lines for the the searching action. Then you can redefine “look in” as you like and put back the old grammar lines for searching.

BUT it looks like the intended effect of your code is just to define a new action insearching for “look in [something]” and redirect that action for searching. And “look in [something]” is already understood as searching in the Standard Rules. So you might just be able to skip all that code and let the Standard Rules handle it.

Isn’t “look in [something]” already a synonym for search? ACTIONS command engage…

So are you trying to allow “look in” to work on non-containers and supporters and remap to examine?

[code]“The Insearchable Dream”

Lab is a room. A rock is in lab. The description is “Rocky, Janet.”

A box is a container in lab.

The can’t search unless container or supporter rule does nothing.

Check searching:
if the noun is not a container and the noun is not a supporter:
try insearching the noun instead.

Insearching is an action applying to one thing and requiring light.

Instead of insearching something:
try examining the noun.

[/code]

The search technically fails, but performs correctly for the player. Unless you have something pivoting on insearching failing or succeeding it should work for practical purposes.

One might want to treat “look in” and “search” differently for one object, but redirect “look in” back to “search” for the common case.

Since the regular grammar for searching includes “look/l inside/in/into/through [something]”, and since you probably want to treat “in/into/inside” the same, it seems to me that if you’re trying to special-case something the best way to do it would be to redirect “search” instead. That way you can use

Understand "search" as something new.

and you don’t have to worry about reconstructing the rest of the grammar for “look.”