deciding on gender pronouns

I have a customer (person) and I want to use a pronoun such as him or her.
However, although I’ve done this a dozen times, my Decide rule gives me nothing.
I can’t show ALL the code here but these are the relevant parts. I am only showing one customer definition when there are actually many.

A customer is a kind of person. A customer has some text called class. 
A customer has a gender. A customer has some text called pron.
	
Ahaz is a customer. "a tall man in a monk's robe.".
Description of  Ahaz is "A tall man in a monk's robe. A massive mace leans against the table near him.". Class of Ahaz is "cleric". Gender of Ahaz is masculine. 

To decide what text is pron of (C - customer):
	if gender of C is feminine:
		decide on "her";
	otherwise:
		decide on "him";
	say "Deciding pron = [pron of C][line break]";

After asking customer (called target) about something in the Inn:
	say "target = [target]    pron = [pron of target]   ";
	if class of noun is:
		-- "fighter": say "[noun] replies, 'Today is audition day! Why aren't you at the Stadium, or don't you think you can hack it?' ";
		-- "cleric": say "[noun] looks at you gently and pulls a silver piece from [pron of target] pocket and gives it to you. 'Blessed be, my [informalGender]. Go in peace.' ";
        . . . 

In that last “say” statement, the target is correct but pron of target gives me nothing. I’ve compared this Decide rule with the many others I have and cannot find any difference to explain it. To decide is such as easy rule, why is it not returning a value?

EDIT: I should say: In ALL the say statements, I get a blank where a pronoun should be.

You can already set pronouns with Alice is a woman or whatever. Is there a reason why you need your own code for it?

Yes, first, I already set the gender. I know of nothing that allows me to set the pronouns: she, her, hers, etc.
When I print out the After asking statements, I get a blank spot where his or her is supposed to be.

Lab is a room.
Alice is a woman in the Lab. Bob is a man in the Lab.

This lets you X HER and X HIM correctly.

Inform has built-in properties “male” and “female” that can be applied to people and set the pronouns automatically.

How do I do that? If I remove my decide rule, I still get a blank.

...
now C is male;
...

Okay, got that. How to do I put the pronoun in a say statement? What’s wrong with what I have in the code example?

My code already does that. It does not convert to “his” as in “his pocket” (see code above).

Here, a longer example:

Lab is a room.
Alice is a woman in the Lab. Bob is a man in the Lab.

Acting on is an action applying to one thing. Understand "act on [a thing]" as acting on. 

Carry out acting on:
	say "[the noun] uses [they]/[them]";

[or alternatively]

Carry out acting on:
	say "[regarding the noun][they]/[them]";

Your code seems unnecessary when the feature is built-in already.

1 Like

How do I USE the feature that is built in? I am happy to not write more code.
Can you fix my cleric statement above to make use of the built-in feature??

I replaced the existing code (above) with

		-- "cleric": say "[noun] looks at you gently and pulls a silver piece from [her/his of target] pocket and gives it to you. 'Blessed be, my [informalGender]. Go in peace.' ";

and it didn’t compile.

"cleric": say "[the noun] looks at you gently and pulls a silver piece from [their] pocket and gives it to you. 'Blessed be, my [informalGender]. Go in peace.' ";

and define informalGender.

Hidnook: Thanks! I never would have thought [their] without a noun reference would have worked. It is counter-intuitive to me. Who would have thought that?! Is there a doc ref you can give for that?

btw, InformalGender is defined elsewhere, and it is only for the player, who has many gender related pronouns.

1 Like

Oops! No that didn’t work. I get “his” in all say statements, whether the person was female or male.

Thanks for that link. I think something is wrong though. After following it exactly, all the responses come up male (his, him) for the females. I double-checked that the gender is correct, but no change. I figured that the case of the pronoun (objective, nominative, accusative…) was determined by the case of (they, them, theirs…). Apparently not.

Delia is a customer.  "a woman, tall and beautiful with platinum blond hair.".
Description of  Delia is "A woman, tall and beautiful with platinum blond hair. She wears a purple robe cannot hide her attractive figure. A tall staff leans against the table beside her.".
Class of Delia is "mage". Gender of Delia is feminine.
After asking customer (called target) about something in the Inn:
	if class of noun is:
		-- "fighter": say "[noun] replies, 'Today is audition day! Why aren't you at the Stadium, or don't you think you can hack it?' ";
		-- "cleric": say "[noun] looks at you gently and pulls a silver piece from [regarding the noun][their] pocket and gives it to you. 'Blessed be, my [informalGender]. Go in peace.' ";
		-- "mage": say "[noun] looks down at you, sniffs, and walks on. You hear [regarding the noun][their] say, 'I guess they'll let anyone in a place like this.' ";
		-- "scout": say "[noun] jerks as if startled. 'I didn't do nothing,' [regarding the noun][they] says.";
	say "Now everyone at the table gets up and leaves.";

For Delia, I get the following:
What do you do? [4] ask delia about food

Delia looks down at you, sniffs, and walks on. You hear his say, “I guess they’ll let anyone in a place like this.” Now everyone at the table gets up and leaves.

Note that although Delia is feminine, the [their] in the say statement is converted to his in the output. The output was no different if I inserted [regarding the noun] at thebeginning of the say statement

Delia is female.

The standard Inform properties are “male” and “female”; “feminine” is not part of the standard library.

What do you mean “apparently not”? Getting “his” in place of “their” seems correct to me. If you want “him/her” in that sentence, you should use “[them],” not “[their]”.

2 Likes

No, I’m pretty sure “feminine” is part of the standard library? It’s one of the values of the grammatical gender enumerated type if I recall correctly, and I think it’s mainly meant to be used for translation extensions.

1 Like

Yes, although that’s feminine gender (not just feminine like in the code above) and the property is, as you say, grammatical gender (not just gender). And grammatical gender is unrelated to what’s being done here. But it’s true that it’s part of the standard library now (I used it for my Danish translation).

1 Like