Player gender vs Adventurer gender

I want to create a gender for the player (because I assign traits that are gender-distinct). How do I assign the player to be “female”? The default “male” always takes over when I enter SHOWME SELF. I’m using the Questions extension by Michael Callaghan.

A gender question rule when stage is stSex:
	if the gender understood is Neutral:
		say "You are either male or female. Try again.";
		retry;
	if the gender understood is Feminine:
		now advGender of player is "female"; 
		now pron of player is "her";
		now player is female;
	otherwise:	
		now advGender of player is "male"; 
		now pron of player is "his";
		now player is male;
	now stage is stClass;
	exit;

I think I was having trouble with this issue a while back, which is why I used the advGender property.
I get an error on the line(s) now the player is female and now the player is male.

1 Like

You need yourself is female.

Player is a variable, female is a person.

4 Likes

Inform 7: putting the “natural language” in “natural-language programming”.

7 Likes

You can also use yourself is a woman. This is slightly different than yourself is female – if you write yourself is female, then the player will be a person who is female but neither a man nor a woman. But if you write yourself is a woman, then the player will also automatically be female.

1 Like

Though that can only be done at compile-time, not at runtime. Things aren’t allowed to change their kinds in I7.

Yes – if you want a person to be able to flip genders during the game, then you can’t declare them as a man or a woman.

Aside, but “You are either male or female. Try again.” does not read as a very friendly response for nonbinary players.

5 Likes

I probably would have different people offstage and, at the start of the game, swap one of them for yourself and make them the player. Set a printed name, if it would ever be visible. etc. Anything else that makes sense.

I would personally like a “they” option, but I think Inform is bad at this? I know some people have tried working with that, but I’m not sure how that went.

2 Likes

You can probably “fake” a “they” option by just defining a person as plural-named. You’d need to carefully write around the fact that they are “technically” male according to the world model, but I think it should be doable.

1 Like

Oh wait! There’s an extension here. Perhaps that’s the answer.

I haven’t tried it, though.

2 Likes

Avery,
Good point. Thanks. However, IF only allows male/female/neuter. Asking a player to be neuter sounds more insulting.

Fortunately, I don’t. They declare themselves at the beginning, and the proper pronouns and stay that way throughout the game. There are some personal stats, like Charisma or Strength, that distinguish each.

I once thought about having multiple players, and the prompt would change each turn for that player; e.g.
Fred > (he does something)
Laura > (she does something)
etc.
However, I was advised that IF does not deal well with multiple players. Have you tried such a thing?

No, that doesn’t work.

yourself is a woman gives the error:
Problem. You wrote ‘yourself is a woman’ but this is a phrase which I don’t recognise, possibly because it is one you meant to define but never got round to, or because the wording is wrong (see the Phrasebook section of the Index to check). Alternatively, it may be that the text immediately previous to this was a definition whose ending, normally a full stop, is missing?

Also, now yourself is a woman gives the error:
Problem. You wrote ‘now yourself is a woman’ but the kind of something is fixed, and cannot be changed during play with a ‘now’.

I’m just suggesting that, at a minimum, the phrasing of the error message should indicate that it’s a technical limitation of the game, rather than seemingly making an assertion about “you”/the player themself.

4 Likes

Pretty well, actually.

Yeah, @sadiedemight’s extension is great. I’m currently using it in a WIP in which many of the NPCs are referenced only by their first initial, with no indication of gender, hence the need for the “singular they”.

I used a different extension for BOSH (which had a non-binary PC and a non-binary NPC) – a mashup of Nathanael Nerode’s Gender Options and some code Zed gave me, with copious edits by yours truly.

4 Likes

I don’t see a problem with that though…? The player being “neuter” can just be an implementation detail, and I don’t see how that could be called insulting.

now yourself is a woman will only work as a static assertion, not as a change during play.

I don’t know much about it, but I’m pretty sure Inform handles multiple players just fine?

Starting Point is a room. Ben is a man. Lucy is a woman.

West of Starting Point is Somewhere Else.

The player is Ben.

After going west from Starting point, now the player is Lucy.

There’s no law that the player has to be the default yourself person.

I’ve tried multiple protagonists before in several parser games. It usually works pretty well! I don’t usually let them meet each other, though, so I’m not sure how that’d play out.

Things I’ve done before include:

  • Having flashbacks during a mystery where the player is now the person talking about their experiences (in 3 games). They never meet each other and the ‘flashback’ areas are a completely different part of the game.
  • Controlling two different mechs remotely (again, each mech is in an otherwise inaccessible area)
  • Having an area where there are two NPCs who you can order around (so you don’t turn into them, but they perform actions that are stored in a list).

Judging from past experience, having two players where you alternate between turns can work, but there are two places where difficulties could come up. First, if you let them meet each other, you’ll have to deal with rules about trying to take things from or give things to each other, which is moderately annoying (and incredibly annoying if you want to actually give orders). Second, if you force alternating every turn, it could be frustrating for players who want to do things like EXAMINE or HELP. So you’d either have to keep track of which actions ‘force’ a switch or not, or let players control when the switch happens via a command like SWITCH.

1 Like