Hi, long time lurker here. I am working on a game where the player character changes, so message substitution parameters are important for the game output to be consistent with the current POV. It’s a challenge to get it right, but this is the first issue I haven’t been able to work out for myself.
The problem is that when I request the objective pronoun (eg - him, her, it) with {him obj}, I am getting the reflexive case pronoun (eg - himself, herself, itself) instead. After some tinkering, it seems that the parser is using information from elsewhere in the sentence and decided that what I really need is the reflexive case, even though I used {him obj} and not {himself obj}. Indeed, I was able to get the objective case by cutting out other message substitution parameters from earlier in the sentence, using embedded expressions instead.
Here is some sample code to show what I mean. What I’ve done here is modified the jump verb to give an output to illustrate my issue.
joe: Actor 'Joe;;man;him'
isFixed = true
person = 3 // change to 1 for a first-person game
contType = Carrier
location = startroom
;
modify Jump
execAction(cmd)
{
// Here is the way I'd like to do it using message substitution parameters. The problem is the output is giving reflexive pronouns instead of objective.
"{I} {do} jumping-jacks for a long time, leaving {him actor} tired and sweaty. {He actor} {know} that exercise is good for {him actor}. ";
"<br><br>";
// This way gives the correct case pronoun, but the code is unnecessarily verbose.
"<<if joe.person == 1>>I do<<else if joe.person == 2>>You do<<else>>Joe does<<end>> jumping-jacks for a long time, leaving {him actor} tired and sweaty. <<if joe.person == 1>>I know<<else if joe.person == 2>>You know<<else>>He knows<<end>> that exercise is good for {him actor}. ";
}
;
My output then looks like this.
Joe does jumping-jacks for a long time, leaving himself tired and sweaty. He knows that exercise is good for himself.
Joe does jumping-jacks for a long time, leaving him tired and sweaty. He knows that exercise is good for him.
I tried using the debugger to find out why the parser does this, but that rabbit hole was dark and scary. It seems like what I am trying to do should be possible.
Any hints or ideas?