[I7] Using the current room as a noun for an action.

As the title says, Im wondering if I can do this? When I try to just use it normally I get a “Thats not a verb I recognize”. I tried making some before phrase, something like

Before [action] when the noun is [a noun]:
    if the second noun is a room:

But this seems to do nothing. Am I out of luck here? Im just going to use a backdrop if I have to for this. Essentially my goal here is to use this action for find a value I assigned to all rooms that changes in each room over time and depending on player action.

Have you tried defining phrases instead of actions?

I mean something like To update (currentRoom - a room):

I used to use actions all the time for behind he scenes stuff but I think phrases are better. I don’t know if this fits what you are trying to do, though.

Well Im using the action to inform the player of the value of the room. Its essentially a spell casting system, and one of the spells informs the player of how “magical” any given thing they look at is. I want this to also include the room if the player so desires as some spells require the room to be above a certain value of magical power to cast.

Could you post your actual code for this action?

So this is that action itself

Weaving is an action applying to two things. Understand "[Woven Pattern][something]", "weave [something][something]" as weaving.

This is the first noun, the actual spell that is going to be cast

Table of Spells Spell Output Pattern Complexity Spell Source Description View Pattern "The Pattern of [second noun] is [Pattern Complexity of second noun]." Dim Internal "Allows sight of The Pattern."

Generally Inform doesn’t like to accept rooms as action nouns. When you say “Understand “do [something]” as…”, Inform takes “something” as meaning some thing, and rooms are not things.

You can get around this by writing “Understand “do [any room]” as…”

However, it’s probably simpler to use a scenery object in the room, or a backdrop.

Inform is rather inconsistent about when “something” means thing, and when it means object. The reason the player can’t usually refer to rooms is that they are not in scope.

Naming is an action applying to one visible thing. Understand "name [something]" as naming.
Carry out naming: say "[The noun]".
After deciding the scope of the player:
     repeat with R running through rooms:
          place R in scope;
     repeat with R running through regions:
          place R in scope.

The player can name any object (except for the nothing object): thing, room, region, direction.

If “name [something]” is changed to “name [a thing]”, then only things are accepted. And if “Carry out naming:” is change to “Carry out naming something:”, then the rule will only apply when the noun is a thing.

So in “applying to one thing”, thing means object. In “name [something/a thing]”, something means object but thing means thing. And in “Carry out naming something”, something means thing. Confusing.

1 Like

Right, thank you. As you see, it’s confusing enough that I get it wrong too.

In some situation you can write “any object” to include both rooms and things. Clearly I shouldn’t go into more detail without a specific test case. :slight_smile:

Thanks, you guys has helped clear this up for me.