Two questions: 'unnecessary words' and how items are listed

Newbie TADS 3 author here with two key problems, most likely stemming from my complete lack of programming experience.

First off: Some words I use as nouns for objects, or part of nouns, do not seem to be working. Specifically, let’s say I put something like this in:

[code]crprofiles: Thing, Container
name = ‘Court Record: Profiles’
desc = “Part of my Court Record. It has info on everyone involved in the case, photos and all.”
noun = ‘court record: profiles’ ‘court record’ ‘profiles’ ‘record’
location = LloydIrving
descContentsLister: thingContentsLister
{
showListPrefixWide(itemCount, pov, parent)
{
" It contains <<itemCount == 1 ? ‘a profile’ : ‘profiles’>> of <>";
}
}

;[/code]

The nouns are the problem here – or, specifically, the word ‘court’, though I have no clue why that in particular. A couple examples:

If I try one of the other nouns, then…

…it works fine. I am probably missing something big, but I cannot for the life of me figure out what is going on.

The same thing happens with some other nouns or parts of them – if I try to examine regal’s profile or regal bryant’s profile, I’m told that ‘regal’ is an unnecessary word; however, byrant’s profile and defendant’s profile work just fine. And so on, and so forth.

Second: I’ve looked all over, and I can’t figure out exactly what to do to get rid of or change the ‘a’/‘an’ before an item (e.g., change “I am carrying an attorney’s badge” to “I am carrying my attorney’s badge”, or “I am carrying an autopsy report” to “I am carrying the autopsy report”). I’m fairly certain that, whatever I need to add, it starts with ‘grammar’, but I have no idea where to put that or what exactly it should say. Again, I’m sorry if this is an obvious question, but I really don’t have any experience with TADS or programming at all.

Any help on either of these would be appreciated – I’m really trying to make this game work. Thanks.

You’re misusing the “noun” property. As far as I can tell, it should only be used with single words, not with phrases - that’s why “profiles” and “records” work, but “court record: profiles” and “court record” don’t. You really shouldn’t be using the “noun” property at all - use “vocabWords” instead:

[code]crprofiles: Thing, Container
name = ‘Court Record: Profiles’
desc = “Part of my Court Record. It has info on everyone involved in the case, photos and all.”
vocabWords = ‘court record : profiles/record’
location = LloydIrving
descContentsLister: thingContentsLister
{
showListPrefixWide(itemCount, pov, parent)
{
" It contains <<itemCount == 1 ? ‘a profile’ : ‘profiles’>> of <>";
}
}

;[/code]

You’ll notice that I’ve put a space between “record” and the colon. That’s because the parser treats them as two separate words (because the colon is punctuation). We could force the parser to treat “record:” as a single word, but doing it this way is easier.

How to do this depends on exactly what effect you want. If you want to change the pronoun to “my” or “the” in every situation, you can just change the object’s aName (and, if necessary, theName):

// for something always referred to as "the" aName = 'the ' + name

// for something belonging to the player character aName = 'my ' + name theName = 'my ' + name owner = me

The owner property tells the game to let the player “X MY WHATEVER” as well as “X WHATEVER”, and so on, but doesn’t change how the name is printed.

If only want to change the pronoun in specific messages, not in general - well, how to do that depends very much on which messages you want to change.

…well, I feel rather silly now. I wasn’t entirely sure what the difference between the two was; thanks for clearing that up. It’ll save me tons of future trouble, obviously. ^^;;

As for the second part, I think what you gave me there is all I need. Again, thanks.

I found Eric Eve’s books invaluable when I was learning T3. I tended to skim them rather than work the examples in any methodical way, but that’s just because I have a rabbity mind. There’s a huge amoung of useful information in there. When I want to know how a class works, I can just scroll down the left side of the Tour Guide window and click on it. The information in the Tour Guide may be easier to digest than what’s in the Library Reference Manual, or it may just offer a different perspective.

The other thing is, please feel free to keep posting questions! T3 is not an easy system to master, so don’t be ashamed to ask. People here are glad to help.

–JA