Changing player pronoun ('yourself' to 'you')

I’m still pretty new to I7, so please excuse the noobiness of this and my other question… I couldn’t find any answers in searching, probably because I still don’t know enough to know what to search for.

I’m (trying to) have NPCs interact with each other and with the player. When they interact with the player, it doesn’t sound quite right:

The dog bites yourself.

That should be ‘you’ rather than ‘yourself.’ I understand why it’s usually ‘yourself.’ But how do you set the rules so the game knows when the player is the object and not the subject? Or can this only be done through text substitution?

Thanks.

Yes. You’d want to use “[We]” for the player as a subject and “[us]” for the player as a non-reflexive object. See §14.4. Adapting text about the player.

Here’s an example from the standard rules making use of these substitutions:

Report an actor giving something to (this is the standard report giving rule):
	if the actor is the player:
		say "[We] [give] [the noun] to [the second noun]." (A);
	otherwise if the second noun is the player:
		say "[The actor] [give] [the noun] to [us]." (B);
	otherwise:
		say "[The actor] [give] [the noun] to [the second noun]." (C).

Note that this report rule doesn’t handle the player being both subject and object, because that’s blocked by a check rule:

Check an actor giving something to (this is the can't give to yourself rule):
	if the actor is the second noun:
		if the actor is the player:
			say "[We] [can't give] [the noun] to [ourselves]." (A);
		stop the action.

When writing report rules for your own actions, you may also need code like:

To bite is a verb.

so that you can use “[bite]” as a text substitution. This comes in handy when the actor might be someone other than the player or plural. Then you can have “The dog bites you”, but “You bite the dog” or “The wolves bite you”. See §14.3. More on adapting verbs.