Login
Remember
IF Answers
Ask a Question

# 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)

- inform7
- programming
- glossary

## 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".

## Related questions

- What are some of the classic Inform 7 mistakes to look out for?
- Is there a way to reduce the right margin for a play-in-browser website released by Inform 7?
- How to make relations and states in Inform 7
- What are best practices for modifying extensions in Inform 7?
- How to get rid of a rule that's blocking what I want the player to do? (Inform 7)

...