I honestly have no idea where to start on this. But let’s say I have the following:
Test room is a room.
Bob is a man.
Anne is a woman.
Jim is a man.
Bob, Anne, and Jim are in test room.
Watch is a kind of thing. Ring is a kind of thing.
Bob's watch is a watch. Bob's watch is a part of Bob.
Anne's watch is a watch. Anne's watch is a part of Anne.
Anne's ring is a ring. Anne is holding Anne's ring.
Jim's ring is a ring. Jim's ring is in test room.
Understand "band", "circlet", "loop", or "ringlet" as ring.
Instead of examining a man:
say "His name is [printed name of item described]."
Instead of examining a woman:
say "Her name is [printed name of item described]."
Instead of examining player:
say "Your name is [printed name of item described]."
Body switcher is a device.
Instead of switching on body switcher:
if player is Bob:
now player is Anne;
now anne is holding the body switcher;
now player is Bob;
now bob is holding the body switcher.
The player is bob. Bob is holding the switcher.
Now I want a way to understand that “my watch” means “bob’s watch” when I’m bob, and “Anne’s watch” when I’m anne, but also that “my ring” or “my circlet” means “anne’s ring” when I’m anne. Is this possible without creating a huge understanding list of “understand “my ring”, “my circlet”, “my ringlet”, “my loop” or “my band” as Anne’s ring when player is Anne”? Because that’s going to get unwieldy fast.
Does something like this work? This is pretty much pseudocode, as I haven’t checked the syntax at all, but hopefully it’s clear how to make it work.
[code]Ownership relates one person to many things. The verb to own [conjugations etc.] implies the ownership relation.
When play begins:
repeat with item running through things enclosed by a person:
now a random person enclosing item owns item;
now Jim owns Jim’s ring. [and any other special cases you need, including anything where more than one person encloses an item at startup.]
Understand “my” as a thing when the player owns the item described.[/code]
Or try editing the player’s command:
After reading a command when the player is not yourself:
if the player's command includes "my", replace the matched text with "[the printed name of the player in lower case][']s".
(Apparently the internal name of the player is always “yourself”, no matter what the printed name is; and, again apparently, the command line parser converts all letters to lower case.)
That’s awesome, I like it.
I just wonder why “x my car” produces “I only understood you as far as wanting to examine Bob’s watch”, but that’s not a problem with this technique as it does the same thing if I do “x bob’s car”.
“x bob’s” would be a valid command on its own, because “bob’s” is part of the name of bob’s watch. (Just as you’re allowed to type “x silver” instead of “x silver dish.”) So, if I’m not mistaken, it understand “x bob’s car” as “x bob’s [watch]” with something extra on the end; just as “jump up” is understood as “jump” with something extra on the end and gives you a similar error.
On closer scrutiny that’s mere appearance. The default player is internally called yourself in I7 and selfobj in I6 and any other player is internally called whatever they were created as. The appearance was due to the standard name printing rule, which slyly prefers “yourself” to any printed name when the game is asked to say “[ the player]” (as opposed to “[the printed name of the player]”).