Adaptative text for noun synonyms

I have the following code for a scenery:

The barn is in A1. The barn is scenery.
Understand “stable” as the barn.
The description of the barn is “[The noun] looks warm and inviting.”.

I want the output for “x stable” to be:

The stable looks warm and inviting.

But I am still getting:

The barn looks warm and inviting.

It seems that using [the noun] is not the way to do this. Is there a way I can substitute the typed in synonym of the noun in the response? Appreciate any help.

1 Like

Zarf’s post on the topic a few years back is still good advice:

Basically, if you’re combining a lot of disparate things into one scenery object, the simplest, best solution is either “don’t; break them into separate scenery things” or “make the scenery a very generic, collective mass noun referring to all of them, instead”.

I get that’s not quite what you’re doing here, but the principle is the same. Any time you’re trying to work around or replace the parser machinery in Inform, as you’d need to in this case, you’re probably doing way too much work to accomplish something partial and underwhelming anyway. The easiest solution here then would be to rename the scenery thing to ‘the structure’ or ‘the building’; it’d be fine if both >examine barn and >examine stable resulted in The structure looks warm and inviting., wouldn’t it?


Thanks, that answers my question. There is not an easy way to do it so I need to address the problem with the writing. Thanks for the link as well, really useful information.