04 Mar, 2010, donky wrote in the 1st comment:
Votes: 0
It has been a long time since I have worked on displaying descriptions. I am at the point where I need to add polish to my item system, and the current piece of polish I am adding is articles. "the", "a" / "an" or no article at all.

I was wondering if there were some standard rules for what article should be used when. No article is an easily identified case, namely when the description of an object is a name. But the other articles, I am not so sure about.

There are five swords.
> take one sword
A: You take a sword.
B: You take one of the swords.

There is a sword.
> take sword
A: You take the sword.
Does it even matter?

Are there tips for displaying lists of objects in a room in an easy to read manner?

You can see: Five swords, an apple, Pete and a horse.
04 Mar, 2010, KaVir wrote in the 2nd comment:
Votes: 0
donky said:
It has been a long time since I have worked on displaying descriptions. I am at the point where I need to add polish to my item system, and the current piece of polish I am adding is articles. "the", "a" / "an" or no article at all.

I was wondering if there were some standard rules for what article should be used when. No article is an easily identified case, namely when the description of an object is a name. But the other articles, I am not so sure about.

I use the following sweet and simple approach, with reasonable success:

If the "no article" flag is set, don't use any article.

Else if you're targeting them, use "the".

Else if the first letter of the description is a vowel, use "an".

Else use "a".


The only case I've encountered so far which doesn't work is "unicorn", so I added an exception for it. There may be other exceptions, but in practice I doubt there would be many, and they could be handled in the same way.

For combat messages I use the object names without articles, with the combat messages themselves including the "your", "his", "her", etc. If your left and right weapons have the same name, the text "left" and "right" is added to the object name for your left and right hand respectively.

donky said:
Are there tips for displaying lists of objects in a room in an easy to read manner?

If you want to combine the object names into a single paragraph, I would recommend making it optional. Many players actually prefer having the items displayed in a list, one item (or group of identical items) per line - it's easier to quickly scan through the objects that way.

Likewise, I'd suggest listing creatures before objects, as once again it's easier to pick out potential enemies at a glance if they're not mixed up among apples and swords.
04 Mar, 2010, Runter wrote in the 3rd comment:
Votes: 0
Quote
If you want to combine the object names into a single paragraph, I would recommend making it optional. Many players actually prefer having the items displayed in a list, one item (or group of identical items) per line - it's easier to quickly scan through the objects that way.

Likewise, I'd suggest listing creatures before objects, as once again it's easier to pick out potential enemies at a glance if they're not mixed up among apples and swords.


I agree with this opinion.
04 Mar, 2010, Idealiad wrote in the 4th comment:
Votes: 0
IF also uses 'some'.

There is a pile of magic beans here.

>Take beans

You take some beans.


But you can probably always get away with 'the' in those situations.
04 Mar, 2010, David Haley wrote in the 5th comment:
Votes: 0
Grammatically speaking, I prefer 'the' when you are designating something, and 'a' when you're not. So I would say:

"There is a pile of beans here."
> get beans
"You get the pile of beans."

"There are some beans here."
> get beans
"You get the beans."

Note that I would not use "some" when you're actually taking them. I might say:
"You see some beans"
or
"Fred takes some beans"
but when you are designating them I would prefer to use the definite article.

I suppose "designating" something isn't that different from targeting it. But anyhow, I might say:
"You whack the goblin!"
"The [same]goblin whacks your friend!"
"An orc whacks your friend too!"

Basically, I would use the indefinite article ("a") when the thing in question is one among many, and the distinction doesn't (perhaps only at present) matter to the viewer.

Wikipedia provides the following fairly reasonable distinction between the definite and indefinite articles:

Wikipedia said:
A definite article indicates that its noun is a particular one (or ones) identifiable to the listener. It may be the same thing that the speaker has already mentioned, or it may be something uniquely specified. The definite article in English is the. Some languages include masculine or feminine articles instead or in addition to a neutral gender definite article.

An indefinite article indicates that its noun is not yet a particular one (or ones) identifiable to the listener. It may be something that the speaker is mentioning for the first time, or its precise identity may be irrelevant or hypothetical, or the speaker may be making a general statement about any such thing. English uses a or an (depending on the initial sound of the next word) as its indefinite article.
04 Mar, 2010, KaVir wrote in the 6th comment:
Votes: 0
Quote
Note that I would not use "some" when you're actually taking them. I might say:
"You see some beans"
or
"Fred takes some beans"
but when you are designating them I would prefer to use the definite article.

So would I, unless I was literally only taking some of them. This isn't something I support as it's never come up, but I could potentially see a mud using specialised containers such as "a berry bush" where you can "pick some berries" several times in a row.

Quote
I suppose "designating" something isn't that different from targeting it.

If the mud requires explicit targeting it can actually provide a pretty useful way for the players to distinguish between identically named opponents - you know that "the goblin" is the one you're attacking, while "a goblin" isn't.

However I do have some boss mobs that are always called "the". So you'll never see "a goblin king" - he'll always be "the goblin king", even if you're not targeting him. But as there's only one, it's not really a problem.
04 Mar, 2010, Scandum wrote in the 7th comment:
Votes: 0
Sorry, but I'd say y'all got it wrong.

You add articles by default, and either strip the article, or replace it with a possessive form "his sword", or when non generic with "the sword", etc. Saves the trouble of dealing with all the exceptions.
04 Mar, 2010, KaVir wrote in the 8th comment:
Votes: 0
Scandum said:
Sorry, but I'd say y'all got it wrong.

You add articles by default, and either strip the article, or replace it with a possessive form "his sword", or when non generic with "the sword", etc.

Add it where by default? The article is going to change depending on the current description of the object - "a yellow shirt" but "an orange shirt", "a flaming dagger" but "an electrified dagger", "an over-cooked steak" but "a burnt steak", etc.

Also note that I use the possessive forms far more often than the regular articles, so I would end up having to strip it in the majority of cases.
04 Mar, 2010, Cratylus wrote in the 9th comment:
Votes: 0
Scandum said:
Sorry, but I'd say y'all got it wrong.

You add articles by default, and either strip the article, or replace it with a possessive form "his sword", or when non generic with "the sword", etc. Saves the trouble of dealing with all the exceptions.


Or maybe write mud in Russian language.

Maybe in Scandumia, exception is rule.

Seriously, though, how does the Scandum fix avoid the unicorn trouble? "Add articles by default"
looks to me like "invoke a grammar miracle", since that's the step being debated, right? Did
I read this thread wrong or did Scandum fail to read it?

-Crat
http://lpmuds.net
04 Mar, 2010, Scandum wrote in the 10th comment:
Votes: 0
KaVir said:
Add it where by default? The article is going to change depending on the current description of the object - "a yellow shirt" but "an orange shirt", "a flaming dagger" but "an electrified dagger", "an over-cooked steak" but "a burnt steak", etc.

Also note that I use the possessive forms far more often than the regular articles, so I would end up having to strip it in the majority of cases.

You add it everywhere where necessary. You combine "an orange" with "a shirt" forming "an orange shirt", unless you have "the shirt" in which case you stick with that, forming "the orange shirt". You also need to handle 'a pair of braces' becoming 'a pair of yellow braces' or 'the pair of yellow braces'.

It gets a little more complicated, but still a lot easier than generating correct articles and adding all kind of flags to handle exceptions.
04 Mar, 2010, KaVir wrote in the 11th comment:
Votes: 0
Scandum said:
You add it everywhere where necessary. You combine "an orange" with "a shirt" forming "an orange shirt", unless you have "the shirt" in which case you stick with that, forming "the orange shirt". You also need to handle 'a pair of braces' becoming 'a pair of yellow braces' or 'the pair of yellow braces'.

It gets a little more complicated, but still a lot easier than generating correct articles and adding all kind of flags to handle exceptions.

That means every time someone adds a new word that could appear at the front of the description, they have to specify the correct article for it. Colours, physical damage, burn damage, corrosion, wetness, blood, dirt, materials, magical prefixes, general descriptive prefixes, etc, etc - each and every word would need the correct article added to it.

My approach means that only exceptions need to have the article explicitly added. And in more than eight years of development, I've encountered just one exception. And dealing with it was no harder than adding an article to a keyword, the same as you're proposing.
04 Mar, 2010, Scandum wrote in the 12th comment:
Votes: 0
Don't forget your exceptions where you always need to use "the" like with "the goblin king", and the cases where no article needs to be added. But when you're dealing with dynamic descriptions based on a limited set of components with few exceptions it's not a big deal.
04 Mar, 2010, David Haley wrote in the 13th comment:
Votes: 0
Well, suffice it to say that Scandum obviously understands the problem better than everybody else here. So while he has the answer to end all answers, personally I would like to see the rest of us muddle through this some more.

Perhaps what he means is to take the Dikuland approach, which is to have builders add the keywords to the object descriptions, and then when you know you need another article, play all kinds of funky guessing games to figure out which article to use instead. Go look at the functions yourself if you don't believe they're funky. Besides, in practice, this doesn't always work, and fixing those exceptions leads to more nastiness than what KaVir described.

The more I think about KaVir's approach, the more I think it would work very well in a very large number of cases. It would not do so well in other languages (like French or German or Spanish or … well, very many other languages in the world) where articles depend far more on the noun they're, uh, articling (as it were), for example depending on the number, gender, sometimes even grammatical function.
04 Mar, 2010, Runter wrote in the 14th comment:
Votes: 0
Scandum said:
Sorry, but I'd say y'all got it wrong.


Lawl.
04 Mar, 2010, Cratylus wrote in the 15th comment:
Votes: 0
KaVir said:
My approach means that only exceptions need to have the article explicitly added. And in more than eight years of development, I've encountered just one exception. And dealing with it was no harder than adding an article to a keyword, the same as you're proposing.


I'm sorry to hear that godwars lacks unicycles. :(

David Haley said:
Perhaps what he means is to take the Dikuland approach, which is to have builders add the keywords to the object descriptions, and then when you know you need another article, play all kinds of funky guessing games to figure out which article to use instead. Go look at the functions yourself if you don't believe they're funky. Besides, in practice, this doesn't always work, and fixing those exceptions leads to more nastiness than what KaVir described.


I actually briefly considered this was what he meant, then dismissed it as being
an impossibly brutish and clumsy solution from someone claiming to know everyone
*else* was wrong.

Go figure.

-Crat
http://lpmuds.net
04 Mar, 2010, flumpy wrote in the 16th comment:
Votes: 0
I have a definateArticle flag on my objects that is checked to see if one is required. If it is, I have a method which applies the definate article to the culmative description of the article based on the grammar rules described by KaVir. I also have a fuzzy count going on so that objects that are the same get grouped as one.
So if I have two swords and one elephant, I get

You see: two swords and an elephant.

If there are more than ten objects I get:

You see: some swords and an elephant

If I perform an action on the item and it has definateArticle is set, you get:

You get a sword from (here).

I don't go this far, but perhaps you should use 'the' when there is only one of something and 'a' when there is more than one? Or in situations where there is a special item that there will only ever be one of in a particular circumstance?

I didn't think about the unicorn situation, I guess I have to watch out for it
:) damn unicorns

Edit .. And unicycles. And unicycling eunuchs :(
04 Mar, 2010, Scandum wrote in the 17th comment:
Votes: 0
Cratylus said:
I actually briefly considered this was what he meant, then dismissed it as being an impossibly brutish and clumsy solution from someone claiming to know everyone *else* was wrong.

I knew from the start that it's easier to split the atom than to change a prejudiced mind, hence the introduction of comic relief.

As a side note to Haley, as far as I know Diku doesn't play guessing games as it doesn't try to remove or substitute articles. Feel free to quote said functions.
04 Mar, 2010, donky wrote in the 18th comment:
Votes: 0
Thanks for the replies guys, it has helped solidify the options in my mind and also add a case which I was not aware of.

I'm a little confused by the unicorn situation, "You can see a unicorn." Is that wrong? Should it be "You can see unicorn."? Also having the content developer bake the article into the description when they create it, seems like an approach to avoid.

So basically, no article if the item is unique (named), the indefinite article if there are more than one and the definite article if there is only one. Oh, and an existential determiner (some) if the item taken is an arbitray amount of a larger resource (like water, berries on a bush, etc).

The point about listing entries one per line is a good one. Not only is it simpler to implement, but it is easier for the reader to parse. The same goes for possessive adjectives where suitable, as they also infer clearer meaning.
04 Mar, 2010, flumpy wrote in the 19th comment:
Votes: 0
Normally words beginning with a vowel are 'an'


An elephant, an orange, an apple etc except for unicorn,eunuch and unicycle

Everyrhing else uses 'a'


Generally I mean.
04 Mar, 2010, donky wrote in the 20th comment:
Votes: 0
flumpy said:
Normally words beginning with a vowel are 'an'

An elephant, an orange, an apple etc except for unicorn,eunuch and unicycle

Everyrhing else uses 'a'

Generally I mean.
Ah right, I was missing the point, they break the general rules of which article to use.
0.0/56