What are the exact details and relations concerning the player, yourself, and your former self in Inform 7?

+1 vote
220 views
asked Mar 27 in Authoring by Joseph Geipel (207 points)
So, in my experience with Inform 7 I have observed three terms which I do not fully understand: the player, yourself, and your former self (the latter two change name in other story viewpoints, although the “self” in former self remains singular).

As far as I can tell, “the player” is a person that varies, “yourself” is the printed name of the current player character, and “your former self” is the default value that “the player” takes, which is a person who has a description of “As good-looking as ever.” The phrase “former self” is observed when you change the value of player without defining the original player as being a particular person.

Are there any subtle issues and exceptions concerning these that I should be aware of, particularly in games involving switching between characters?

(This question is specifically for 6L38)

1 Answer

+3 votes
answered Mar 28 by Juhana (246 points)
selected Mar 28 by Joseph Geipel
 
Best answer

You are almost correct, but more accurately "yourself" is the default player character object and "your former self" is the printed name of "yourself" when the player variable does not point to the "yourself" object anymore. In other words, when you switch to another player character and the default character stays in scope it's called "your former self" to signify that the player is not controlling it anymore.

In code you'd define them like this (simplification):

The player is a person that varies.
The player is usually yourself.

Yourself is a person. The printed name of yourself is 
"[if the player is yourself]yourself[otherwise]your former self".

This is, as far as I can tell, how the system has always worked and is unlikely to change any time soon.

If a game involves switching characters it's almost always best to discard the default "yourself" character altogether and create new objects for all playable characters, including the "main" character. It makes it easier to not make mistakes when defining rules that concern player characters because it's easy to accidentally confuse "the player" with "yourself" but harder to confuse "the player" with "Alice" and "Bob".

This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...