Is there a way to make a character in the story (but not the player) into the 2nd person, I.E. "you"?

Hello. I have a first-person story, but I’d like to designate a specific non-player character as the 2nd person, referring to them as “you” in most cases and with the appropriate grammar. Here’s a snippet of my code to make what I’m trying to do more clear:

Roger is a man in the apartment. "You are here, [one of]standing around[or]taking up space[or]wasting time[at random]as usual.".
The printed name of Roger is "you".
The description of Roger is "You are wearing [a list of things worn by Roger][if Roger carries something] and carrying [a list of things carried by Roger][end if]." 
Roger wears a pair of sunglasses. The description of the sunglasses is "You probably think they make you look mysterious."

The narrative viewpoint is first person. The conceit here is that the player is Roger, issuing commands to the protagonist. But of course this setup is insufficient, because we have output like “you enters from the west”. Is there any way I can get Inform to understand Roger as the 2nd person?

1 Like

Interesting question, and welcome to Infiction.

Question to you–how are you defining the PC (the one that Roger is not)??

Totally just shooting from the hip here because there’s a chance this could send you off on the right direction, although perhaps just as likely to send you down a garden path. How about switching both narrative viewpoint and player before and after Roger does anything? I’m not even going to justify the following with code tags because it’s probably not proper Inform 7, just what would might constitute my first attempt without having checked the relevant syntax or thought much about whether this is possible:

Instead of doing something while the current actor is Roger:
now the player is Roger;
now the narrative viewpoint is second person;
try the current action.

Every turn:
if the player is Roger:
now the player is [whoever it’s supposed to be];
now the narrative viewpoint is first person;

Check this out: 14.1. Tense and narrative viewpoint

From what it sounds like though, the parser already gives commands in second-person. “You pick up the wand.” is pretty standard. If you want the player to be separate and for the parser to call another character “you”, that’s a bit trickier.

Inform automatically creates the viewpoint character protagonist as “yourself” which is a special character that it naturally communicates with. I think it has to be the PC. You can create a new player and declare “Now the player is Bob.” but that transfers the “yourself” designation to Bob. There may be a way to do this though.

Don’t know if this would work: create another NPC who always follows Roger (or perhaps is “a part of Roger?” - like they are a team) and narrate that as “you the player who is following Roger” but leave the actual player as Roger. That might require a lot of testing and tweaking to make work.

1 Like

I was thinking that he could go through all of the actions in the Index and use an After or Report rule to change each response to reflect ‘You’ taking the action (to replace any default Report rule). And in the case of ‘You’ being the noun or the second noun of an action taken by another actor, change the Report rule to reflect that…??

Tricky indeed. You’d have to account for every possible response.

It’s an intriguing concept, but I think we need some more details, maybe a short example transcript how you’d like this to play out.

For example, you said:

So, when the player types “X ME” at the prompt, it is meant to be Roger telling the player character: “X ME”. Should the “ME” be taken as referring to Roger, who utters it, so that the game should print the description of Roger, or should it be taken to refer to the player character as usual?

Regarding the problems with the printed name (“you arrives from the west” etc.), you could try defining “Roger” directly as “you” (in lower case). Here’s an example:

When play begins:
	now the story viewpoint is first person singular.

The Apartment is a room. "This is my spacious apartment, which is devoid of furniture at the moment, because I've just moved in."

you are a man in the apartment. "You are here, [one of]standing around[or]taking up space[or]wasting time[at random] as usual.".

The description of you is "It's you, my pal Roger."

You is plural-named.

The Corridor is south of the Apartment. "The corridor leading to my apartment is a nondescript utilitarian affair."

Every turn:
	if the location of you is not the location of the player:
		let the way be the best route from the location of you to the location of the player, using doors;
		try you going the way.

Inform will use the proper grammatical form (“arrive”) because of the “plural-named” property, and it will keep the “you” in lower case when it occurs in the middle of a sentence, but will capitalize it at the beginning of library-generated sentences (“You arrive …”).

So, the output looks like this:

Apartment
This is my spacious apartment, which is devoid of furniture at the moment, because I've just moved in.

You are here, taking up space as usual.

>x me
As good-looking as ever.

>x you
It's you, my pal Roger.

>jump
I jump on the spot.

>s

Corridor
The corridor leading to my apartment is a nondescript utilitarian affair.

You arrive from the north.

Of course, this doesn’t address the conceptual question I mentioned above, about “X ME” and similar commands.

By the way, if you need to check the library messages/responses, you can see a huge list by entering “RESPONSES ALL” when you’re running your game in the IDE.

Thanks for the responses!

Sorry, I’m not sure exactly what you mean by defining here; the PC is another in-universe character (named Eulalie) who has agreed, reluctantly, to take part in Roger’s “real life interactive fiction game”. The only code I have relating to this is

The player is in the apartment. Understand "Eulalie" as yourself.
When play begins: 
	now the story viewpoint is first person singular.

I will give that a try.

Yes that’s essentially what I want. But it only needs to happen in the output of the game, for example, if the PC is looking at Roger, they’ll still be typing “x Roger”, not “x me”. Because Roger is playing the game as the PC.

Hmm, I was afraid something like that would be the solution. I’m not sure I’m totally up to the task, as this is my first attempt at inform7 or IF in general. Would this be something like, e.g.

describe room gone into rule response (L) is "You arrive from [the noun]".

? Simply adding the above to my project doesn’t change the way Roger’s movements between rooms are reported so maybe that’s not right.

Good question; um, in this case ME would still refer to the player character as usual, because it’s like Roger is playing an IF game where he’s taking the role of the PC.

Oh, this might be the right track. I’m going to give this a try as well. An additional wrinkle is that I don’t want the player to be able to type “x you” to look at Roger; I’d want them to type “x roger”. Can a person be privately-named?

Yes, you can add this to my example from above:

Understand "Roger" as you.
you is privately-named.

[And, if you want the player to be able to refer to the PC (= "me") as Eulalie:]
Understand "Eulalie" as yourself.

Although about the privately-named aspect: I think it could be irritating when the game always mentions “You stand here… You arrive from the north…” etc., but doesn’t recognize “X YOU”. So, I think it would probably be better to just put in the line “Understand "Roger" as you.” in order to let the player have both options for referring to Roger.

Hmm, yeah I can see that might be confusing or annoying from a player usability standpoint. On the other hand, the game’s inputs are meant to be Roger giving commands to the PC, who then narrates her own experiences to Roger in turn. So while it’s normal for her to call Roger ‘you’, it would be a little weird for Roger to reference himself that way in the inputs. (in fact it would be more normal for him to refer to himself as ‘me’, like we discussed above, but just for characterization reasons, he likes to use the third person) I’ll have to weigh these factors and decide what works best.

I’m no good at I7 code, but wouldn’t it be easiest just to set up a normal first person story through Eulalie with Roger as a typical NPC? The only difference is that certain actions relate to Eulalie or Roger depending on whether you say “you” or “me,” right? Can’t you just catch that in the responses?

Like in this generic syntax psuedo code because I don’t know I7:

Eulalie = player 
Roger = NPC
viewpoint = first_person

onAction("examine") {
	if (noun = "me") describe(Roger)
	else if (noun = "you" or noun = "Eulalie") {
		describe(player)
	}
	else describe(noun_object)
}

I’m sure there’s a slick way to do that in I7.

1 Like