Interacting with "myself" when I am a specific character?

I’m writing a story where throughout the story the player will become different characters. This is handled by standard “now the player is Susan” and “now the player is Harold” type commands.

Now I have some basic parts set up for all characters. You know, “Hair is a part of every person”, “A nose is a part of every person”, so that they can be examined and such, and ideally I want the player to be able to enter “examine my nose” and “use the comb with my hair” and get the correct responses based on the character they’re playing as.

The problem comes from the fact that, as described in 4.15 (assemblies and body parts), if the player becomes a character after parts are generated for them, the part is classed as belonging to the character and not the player. So if they’re playing as Susan they HAVE to type “look at Susan’s hair” rather than “look at my hair”.

The guide recommends declaring the player before generating parts, but that seems to only work if you only play as one character. How would I go about this when multiple player characters are involved?

Perhaps something like

Understand "my" as a body part when the item described is part of the player.

(assuming you have a “body part” kind)?

Oh, I don’t have a body part kind. I’ve basically been using:

Hair is a kind of thing. Hair is a part of every person. Hair can be either messy or neat.

Here’s my solution.

Section 1 - General Stuff

A non-default person is a kind of person.
A man is a kind of non-default person.
A woman is a kind of non-default person.
An animal is a kind of non-default person.

A body part is a kind of thing.
A body part has a text called base name.
A body part has a text called the original printed name.
Some hair is a kind of body part. It is part of every non-default person. The base name of hair is "hair".
A nose is a kind of body part. It is part of every non-default person. The base name of a nose is "nose".
Understand "my" as a body part when the item described is part of the player.

To claim body parts for (P - person):
	repeat with part running through body parts that are part of P:
		now the printed name of part is "your [base name of part]".
	
To relinquish body parts for (P - person):
	repeat with part running through body parts that are part of P:
		now the printed name of part is the original printed name of part.

To swap bodies to (P - person):
	relinquish body parts for the player;
	now the player is P;
	claim body parts for the player.
	
When play begins:
	repeat with part running through body parts:
		now the original printed name of part is the substituted form of "[printed name of part]";

Section 2 - Specific Stuff

Test Chamber is a room.

Harold is a man in Test Chamber.
Susan is a woman in Test Chamber.

When play begins:
	swap bodies to Harold;
	remove Yourself from play;
		
Instead of jumping:
	if the player is Harold, swap bodies to Susan;
	otherwise swap bodies to Harold;
	say "You jump into a new body!"
	
Test parts with "look / x harold / x susan / x me / x hair / x nose / x harold's nose / x susan's nose / x my nose / take harold's nose / take susan's nose / take my nose".
	
Test me with "test parts / jump / test parts / jump / test parts".

The basic idea is to give body parts only to a subclass of person that we’ve interposed between person and the rest of its hierarchy (man, woman, animal), which excludes Yourself from having them. We also refrain from a static “The player is Foo” declaration to avoid the compiler assigning “your” to that person’s body parts (which would later create ambiguity when the player is swapped into a different character). Instead, we manage understanding “my” and showing “your” as part of the printed name dynamically as the player shifts bodies.

Nice trick with interspersing, vlaviano. To do away with the need to give a base name, I’d suggest a slight change:

When play begins: repeat with part running through body parts: now the original printed name of part is the substituted form of "[printed name of part]"; let x be the substituted form of "[printed name of part]"; replace the regular expression ".*[apostrophe]s " in x with ""; now the base name of part is the substituted form of "[x]".

This is on the assumption that 1) something part of a person will always be called “[person]'s [part]”, and 2) nobody would actually name a body part something with an “[’]s” in it. Personally, both strike me as safe bets.

“adam’s apple”? :stuck_out_tongue:

Yeah, this is why I didn’t do what Eleas suggests. I didn’t want to assume anything about the structure of the name of a body part.

However, it’s still a good suggestion, because we can fill in the base name automatically when the author hasn’t set it, while still allowing the author to define it manually for exceptional cases like “adam’s apple”.

When play begins:
	repeat with part running through body parts:
		now the original printed name of part is the substituted form of "[printed name of part]";
		if the base name of part is empty:
			let x be the substituted form of "[printed name of part]";
			replace the regular expression ".*[apostrophe]s " in x with "";
			now the base name of part is the substituted form of "[x]".

D’oh. Well. Nice to see some good came of it.

Thanks for the response guys, this has been really helpful.

I have one more question if you don’t mind. I want to be able to fail an action for a specifically written reason, kinda like how a scene can end in specifically written ways (e.g “The heist ends in an awesome way when…”). Like, I want to be able to write “fail the action because you’re too short” or “end the action in a deadly way” and then be able to check “if jumping failed because you’re too short” or “if fighting the crocodile ended in a deadly way”.

I’m currently doing this by creating a text value called “the reason” and then altering/checking that value when need be, but I was wondering if there was a built in option I was missing?

There’s “the reason the action failed” (the rule which stopped action processing), used in the Unsuccessful Attempt rulebook but I believe also exposed for the player’s actions?

Unfortunately that’s not what i’m looking for. From what I understand the built in “reason the action failed” requires a pre-existing rule to exist (such as the “can’t take people’s possessions rule”). This is fine if an action can only fail in one or two generic ways, but if an action can fail for multiple specific reasons (and if I want a character to react differently to each one), having to create a separate “if/else/stop action” rule for each one seems like it would get messy very quickly.

Like I said, i’m currently fudging what I need with a text value, so it’s not that important, I just wanted to know if there was a more obvious method I was missing. Thanks for the assistance. :smiley: