UMDLARS / one_night_in_sf

A story game demonstrating why physical security is important and complex!
1 stars 2 forks source link

Articles! (We need them) #241

Open libraun opened 3 months ago

libraun commented 3 months ago

Apparently, we can give articles to Real Objects, like so:

article "an",

And we can add it to a real object (like the antique wooden door) like so:

Object -> Office1Door "Antique Wooden Door"
with
    name 'office' 'door' 'lock',
        article 'an',
    description "This is an old wooden antique door...",
    door_dir (e_to) (w_to),
    found_in Hallway1 Office1,
    with_key coffeeCard,

This is a really small thing, but as a grammar freak I can't stand mismatched articles. Making a new branch for these (off main this time), called "jet-articles".

NOTE: If you do decide to give an object the "article" property, then make sure every real object in that scene has the article property. Otherwise the game flips and you will get a ton of errors.

spacehobo commented 3 months ago

Inform is pretty good at inferring articles (such as if a noun begins with a vowel or consonant), and you can use this in code, such as the use of (the) here.

We shouldn't need to specify this unless output text looks funny for some reason.

libraun commented 3 months ago

@spacehobo I've noticed that, it's kind of impressive. There are only a couple (maybe just one?) objects that have mismatched articles, like "a antique wooden door", which isn't major by any stretch (but I still notice it).

I think I'll go ahead and close this shortly, since adding one article to a scene seems to break the game unless all objects in that scene are explicitly assigned an article. Not ideal.