Gender-Neutral Pronoun (singular they) Experiment

Hi everyone. I checked out Dialog yesterday, got really really really interested, and I’m now going through Part II of the Manual. I wanted to see if I could easily make a (neuter $) predicate for gender-neutral animates. Here’s the full text of it (I’m too new to upload attachments). Everything works on my end.

Could someone more advanced in Dialog check my work? I pretty much just copy-pasted stuff, so I don’t fully understand what these things mean :D.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% (neuter $) is supposed to work like (female $)


%% from line 333 of stdlib v.0.46
(neuter $)     (fail)

%% from line 4200 of stdlib v.0.46
(it (neuter $))        they
(them (neuter $))	    them
(itself (neuter $))    themself
(its (neuter $))		their
(it (neuter $) is)	    they're
(is (neuter $))        are
(isn't (neuter $))     aren't
(has (neuter $))       have
(s (neuter $))
(es (neuter $))
(does (neuter $))      do

%% Please check this part. I don't understand what it means, I just copy-pasted stuff. 
%% It seems to work, but is it ok?

%% from line 4390 of stdlib v.0.46
(notice $Obj)
	(if) (object $Obj) (then)
		(reveal $Obj)
        (if) (neuter $Obj) (then)
            (now) (them refers to [$Obj])
        (endif)
    (endif)

(notice player's $Obj)
	(if) ~(current player $Obj) (then)
        (if) (neuter $Obj) (then)
			(now) (them refers to [$Obj])
        (endif)
    (endif)
7 Likes

I think it looks mostly fine. I suppose you include it at the end of your project’s file?

About the (notice $), it’s used to set the pronouns for the player’s command, so that the following works:

> x NPC
It's a they/them NPC!

>talk to them
They say  ...

But as it is, your rule replaces the one from the stdlib, so the other pronouns won’t be set (“him”, “her” and so on). One way to solve that is to make the rule fail if the object is not neuter:

(notice $Obj)
	(object $Obj)
	(neuter $Obj)
	~(plural $Obj)
	(reveal $Obj)
	(now) (them refers to $Obj)

Like that, if $Obj is not a neuter object, the rule fails and the one from stdlib is followed. I’ve also added a check to see if it is singular and removed the list in (them refers to $) since that’s only for plural objects. (If $Obj is plural, then stdlib’s rule will take care of it.) Finally, the same thing should be done for (notice player's $).

In the end, it might be easier to directly edit stdlib’s rule to add your change, though.

I haven’t tested what I proposed so I may be forgetting something. Also, there might be some other edge cases to take care of somewhere, but I’m not sure. I know other people have implemented that in other authoring system (Inform 7), so they might know better.

2 Likes

Thanks a lot! I did what you said, and it seems to be working properly now. If anyone else wants to check it:

neuter.dg (726 Bytes)

2 Likes