I’m considering a project which involves lots of identity/body switching, and I wanted to make sure I understood this concept first before I got too far in and discovered I’m DOING IT RONG!!1
I’m used to referring to the PC as “the player” - such as in the command “if the player consents”, but I know there are rules that require the code to instead refer to “yourself”.
From posts I’ve researched, it’s suggested that if a game involves switching between NPCs, that you want to name all the characters and start with “The player is Bob.” (or whomever) since Inform will otherwise make a default character “yourself” with no actual identity and it is referred to as “your former self” if the player “inhabits” a different body.
I’m still a bit confused about the specifics.
Question 1:
Do I need to consistently refer to the player as “yourself” for coding such as
The description of the marsupial statue is "[if yourself is bob]As an expert on Australian fauna, you clearly identify that this is a statue of a platypus[otherwise if the player is fred]It's a weird statue sort of like a cross between a beaver and a duck. What the hell?[end if]"
Or should this be [if the player is Bob]?
Is there a shortcut way to do this such as [if Bob]…[otherwise if Fred]…?
Question 2:
With actions, do I basically code everything as an actor, or does the non-actor form always refer to whomever the player is inhabiting?
After jumping: say "You're doing a great job jumping, [yourself]!"
After jumping: say "You're doing a great job jumping, [the printed name of yourself]!"
After jumping: say "You're doing a great job jumping, [the printed name of the player]!"
[???]
After an actor jumping:
if the person asked is yourself:
if yourself is Bob:
say "You're doing a great job jumping, Bob!";
if yourself is Fred:
say "Attaboy, Fred."...
Am I making this way too complicated? Does the rule form “After [verb]ing” always refer to the player, no matter what body they’re in?
As a followup then, would it work to say “If yourself consents:” ? That’s I think where I’m getting confused that “The player” is the human player in front of the keyboard as opposed to "yourself’ referring to the body worn by the PC.
Question 3:
Any other pitfalls I’m possibly not even aware of?
Is there a documentation section that spells this all out? I paged through a few, but it always seems to be referred to in passing onto another topic. (I’ve just discovered RB 5:6)