Synonyms for the location of the player

I’ve got a rocky gorge and want to set some common synonyms (gorge, cliff, etc) to refer to any of the rooms in the gorge–that is, to the location of the player. The rooms are all of a type, but giving synonyms to a type of course doesn’t do anything, and “understand ‘cliff’ as the location of the player” doesn’t work. Anyone know a way to do this?

I’m not 100% sure I understand the question. But when you want to refer to the player’s location in the code, you will always have to say ‘the location of the player’ - there’s no shorthand. It is what it is.

This seems to be working (except that I think I’ve goofed the line spacing, but that’s not your problem):

[code]Mountain is a room. “The high mountain looms over the gorge.” Ledges is north of Mountain. “A shaky bridge joins ledge to ledge[if the location is ledges] here[end if].” High Pass is north of Ledges. “High up there is a notch in the mountains in between impassable peaks.” Crag is north of High Pass. “The path ends in a bleak crag.”

Peering is an action applying to one visible thing. Understand “x [any room]” as peering. Understand “gorge” as a room when the item described is the location. Understand “Cliff” as a room when the item described is the location.

Carry out peering: say the description of the noun.[/code]

This took some fiddling, but it looks like instead of saying “Understand ‘foo’ as a boojumy whatsit” the general thing to do is say “Understand ‘foo’ as a whatsit when the item described is boojumy” – understand won’t take adjective + kind or kind + that-clause, but it will take a bare kind with a condition on the item described, so you just offload your descriptions and adjectives into that condition. I fear that that explanation was considerably less clear than the example. Anyway, this is documented somewhat in 16.17.

(severedhand, the usual way of referring to the location of the player is just “the location,” isn’t it?)

EDIT: Room names courtesy the awesome old board game Magic Realm.

I didn’t know that. The Inform docs examples go with ‘location of the player’, probably for clarity. I guess it also makes it easier to search your source text for just ‘location of the player’, and also makes lines of code that have multiple incidences of ‘the location’ in them look less vague at a glance.

Well, the examples usually do use “the location” – searching for the docs for “the location of the player,” the only examples that use them are Van Helsing and Four Cheeses, and Van Helsing explains that they could’ve used “the location” but “location of the player” is less confusing in that context. (Similar deal with Four Cheeses.)

It’s a good point about searching your text for “location of the player,” though. It also seems possible that they might compile to I6 differently, but not in a way that should make any difference.

Thanks. It’s all more knowledge for me to stick in my pipe.

Peering is an action applying to one visible thing. Understand "x [any room]" as peering. Understand "gorge" as a room when the item described is the location. Understand "Cliff" as a room when the item described is the location.

I don’t understand what we’re doing here. Why do we need to create a new action equivalent to looking? I don’t want these synonyms to just apply to examining–if the player tries to CLIMB CLIFF, for instance, I won’t want it to say “You can’t see any such thing.”

And, at least in my game, “Understand ‘gorge’ as a room when the item described is the location” doesn’t work. (I’m also not sure how it’s supposed work–if the parser hasn’t understood the noun yet, how can it know what the item described is?)

You probably need a backdrop. Normal commands never accept rooms as nouns and making synonyms doesn’t change that. (You can’t CLIMB anywhere, even if you’re in that room.)

I agree w/ Juhana. Since he already provided an explanation, I’ll provide a very simple example:[code]The Gorge-region is a region.
The Western End of the Gorge is a room in Gorge-region. “The gorge extends east of here.”
The Central Gorge is a room in Gorge-region. It is east of Western End of the Gorge. “The gorge extends to the east and west here.”
The Eastern End of the Gorge is a room in Gorge-region. It is east of the Central Gorge. “The gorge extends west of here.”
The Canyon’s Rim is up from Eastern End of the Gorge. “You see the gorge below you.”

The cliff-face is a backdrop. It is in Gorge-region.
The description is “[if the location is the eastern end of the gorge]It looks like the rocks here are stable enough for you to climb.[otherwise]It looks like the rocks are too loose for you to climb.”
Understand “cliff” , “face” ,“canyon” ,“gorge” and “rocks” as the cliff-face.

Instead of climbing the cliff-face: try going up.

Instead of going up in the Gorge-region:
if the location is the Eastern End of the Gorge, continue the action;
otherwise say “You try to climb the rocks, but they’re too loose to get a good handhold.”

test me with “x cliff / climb cliff-face / up / e / x canyon / climb up gorge / e / x rocks / climb rocks”.[/code]
Note that since backdrops are a kind of thing, they’ll be accepted by most commands. You’d still only get the defaults (“attack cliff” yields “Violence isn’t the answer to this one,” but that’s better than “You don’t see…”) If this is the kind of thing you’re looking for, let me know so I can give you a few tips on how it could be fleshed out better (i.e. providing grammar when the player types “climb” w/out using a noun, etc.) If not, maybe you could give us a sample transcript of what you’re looking for. Your original post kind of confused me as to why you would need room synonyms. :slight_smile: