Text patterns in Understand statements

Here is something that comes up quite often in descriptions. An example:

The Low Trees are a backdrop in GravelWalk. "The green leafy tree branches stretch out to the sides blocking your view." Understand "tree", "trees", "green", "lush", "leafy", "view", "branch", "branches", "chump" and "chumps" as the Low Trees.

Is there any kind of shorthand form you can use to avoid repeating all the quotes and commas in a long list of vocabulary in an Understand statement?

It would be especially handy to avoid repeating the complete singular and plural forms for each word: “word1”, “word1s”, “word2”, “word2es”, “word3”, “word3s” …

Ideally I’d like to be able to write something like: Understand “trees?|green|lush …” but apparently regular expressions don’t work in Understand statements. Is there any other way?

If you’re repeating single words, you can use slashes:

GravelWalk is a room. The Low Trees are a backdrop in GravelWalk. "The green leafy tree branches stretch out to the sides blocking your view." Understand "tree/trees/green/lush/leafy/view/branch/branches/chump/chumps" as the Low Trees.

One thing that sometimes traps people here is that slashes only separate single words; if you wrote something like “tree/trees/green/lush/leafy/view/branch/branches/chump/chumps/weeping willows” then it’d match “tree willows,” “trees willows,” “green willows,” etc. but nothing without the word “willows” in it. But that’s not a problem with your list of synonyms.

BTW do you perhaps mean “clump” rather than “chump”?

Ok, thanks. I didn’t know about the slash notation. That helps quite a bit.

But it seems I still have to repeat singular and plural for each word, ie. there is
no way to express “anyword”, right?

I’m not sure where I got the chumps from, maybe an example I saw somewhere.

Chumps are always with us. :slight_smile:

AFAIK you have to repeat the plurals by hand. You could do some regular expression fiddling using “after reading a command” rules to try to chop plurals off words but that would almost certainly wind up being a lot more work than just repeating the plurals.

English plurals are somewhat irregular, so most IF systems don’t try to deal with them. (Children, oxen, mothers-in-law, fish.) However, Eric Eve’s new adv3Lite library for TADS 3 goes further in this direction than other IF systems. I just tried it with my WIP, which happened to be open on my desktop. The PC is carrying a purse, and the game knew that ‘x purses’ referred to the purse (singular), even though I had never entered “purses” as vocabulary for that object. I haven’t created a mother-in-law, so I can’t test that, but I wouldn’t expect adv3Lite to be able to construct a plural.

This won’t help you with an Inform 7 game, of course.

Inform is verbose. This is one of the ways it is verbose. :slight_smile:

It’s just a tree! Why become obsessed with a minor scenery bit? Jigsaw is mostly devoid of scenery, instead relying on room descriptions to give a sense of mood and surroundings. It describes sea and sky that isn’t there and really have no consequences to the game. This way it forces gamers to concentrate on what matters instead of poking with every bit of junk referred in the text.

Game concept: all the items in the game have non-standard plurals.

“Ad Verbum 2: Ad Verba”

Because it makes for a better game.

I’m inclined to agree with MTW, up to a point … but I guess I could be more verbose about it. A game that’s written without scenery objects relies, of necessity, on default responses: “You can’t go that way.” “You see no trees here.” “That’s not something you need to refer to in the course of this game.” This stream of negative default responses has at least two bad effects. First, it’s boring. It makes the model world seem less real. Second, as the player’s eyes begin to glaze over, she ceases to try examining stuff that’s mentioned in the room description, which makes her more likely to miss something important that IS implemented.

That said, an author can go to the other extreme, implementing too much irrelevant stuff and giving it cute non-default responses to lots of commands. While initially entertaining, this can also end up being a distraction. The player won’t notice the important objects because they’re hidden in a mound of meaningless objects.

Every author gets to strike their own balance in this area. I tend to veer off in the direction of verbosity. I know some players prefer a lean, mean game, but that’s not my style.

A large majority of cases are regular though, adding s or es, with some exceptions.

It’s funny that of the four exceptions you mention only mothers-in-law is “irregular” in the sense that the plural marker is somewhere other than at the end. The others: child(ren), ox(en) and fish would work the same way as regular -s plurals with a mechanism of the type I was asking about. Fish wouldn’t need any handling at all of course, since singular and plural coincide.

There are other rules as well: a Latin word ending in -us that has been borrowed into English will change to -i if it was second-declension masculine, but -uses if it was fourth-declension. Hence nucleus -> nuclei and cactus -> cacti, but circus -> circuses. And if it was a Greek word borrowed into Latin it retains its Greek plural, giving octopus -> octopodes. A Latin third-declension noun ending in -ex changes to -ices, but in some cases this rule is being forgotten: index -> indices, but sex -> sexes (b/c the original stem was sec-) and sometimes vertex -> vertexes (given as correct in certain geometry textbooks).

The problem is that most English-speakers don’t know which declension the Latin root of the word was originally in, and these rules are applied inconsistently. This is why Inform allows you to give each object its own irregular plural if you need to.

let’s not obsess over extremes. why not just restrict the possible words to whichever are actually mentioned in the text?

games are about limits, not freedom

If a game mentioned an “oak” in a room description several paragraphs back, I would be annoyed as a player if it didn’t respond to “examine tree”.

An oak tree is here. “A nearby oak looks positively tall”

problem solved.

Plz link me to your IF games so I can learn from someone who really seems to know. k thx.

Yes, but the synonym “tree” isn’t in the text of the game itself.

but that’s not what you asked :
If a game mentioned an “oak” in a room description several paragraphs back, I would be annoyed as a player if it didn’t respond to “examine tree”.

Not really. People form associations based on life experience. Saying “A nearby oak looks positively tall” is dropping the associative “tree”, because the author might consider it redundant. An oak is still a tree, and you don’t want to annoy people that think differently than you – as an author – and should add “tree” as an association. If you have “Hickory, oak, and ash trees surround you”, it would probably be better to group them, and allow “trees, hickory, ash, and oak” all bring up the same description. Regardless, trying to figure out common associations is part of painting a broader palette for users, so they can focus on the game, rather than trying to read your mind, and have interaction itself become a puzzle. That is a pretty lame puzzle, IMO.