I would like to ask public opinion on what constitutes the “natural” and/or “expected” behavior from an NPC in response to a command in a parser game. Note that this inquiry is not specific to any particular language, so it does not matter what actually happens for any particular platform. This is about what you think should happen.
[EDIT: To clarify, when I say “what you think should happen,” I mean what seems natural to you in an idealized parser that conforms to your intuition. Again, the way that any particular language or system works should be considered irrelevant.
Also, assume that there is no chance of word collision between nouns or any implemented verbs. For example, “BOB” can never be interpreted as a verb, only as the NPC Bob.
Also, unless otherwise noted, every example command line should be considered as applying to the same initial conditions that are described for a given scenario.]
Imagine the following one-room scenario: There is a player character and one NPC, Bob. On the floor of the room is a bucket in which is a rock. Also in the room is a table on which is an apple.
Assume that NPC Bob is amenable to executing any command from the PC. The human player of the game enters the following at the command prompt:
>BOB, TAKE ROCK THEN PUT ROCK ON TABLE. JUMP.
Which of the following is the most natural-seeming sequence of events?
Over three separate turns: Bob takes the rock, Bob puts the rock on the table, Bob jumps.
Over three separate turns: Bob takes the rock, Bob puts the rock on the table, the PC jumps.
Over three separate turns: Bob takes the rock, the player tries to put the rock on the table, the player jumps.
In one game turn: Bob takes the rock, Bob puts the rock on the table, Bob jumps.
In one game turn: Bob takes the rock, Bob puts the rock on the table, the PC jumps.
In one game turn: Bob takes the rock, the player tries to put the rock on the table, the player jumps.
Over two game turns: First, Bob takes the rock at the same time that the player jumps. Second, Bob puts the rock on the table.
Over two game turns: First, Bob takes the rock at the same time that the player tries to put the rock on the table. Second, the player jumps.
Huh, interesting! I wonder what actually happens in different languages. For example, ZIL does “Over three separate turns: Bob takes the rock, Bob puts the rock on the table, Bob jumps.” What about Inform?
I think most IF players are going to expect the second option (Bob taking the first two actions and then the player jumping over the course of three turns).
And although that’s what I’d expect, I think a more “natural” game version is the player and Bob both acting on the first turn after the conversational instruction. Because telling Bob to do two things is a single action for the player, even though it should take two turns for Bob to do them.
Separately I think there should be a syntax for relaying instructions to NPCs that doesn’t involve stringing together a runon sentence with a bunch of conjunctions. But I think the ship has sailed on this. In the sense that a second sentence in the same command input is nearly universally parsed as an “indpendent” command (and so parsed the same as if it was the second of two separate command inputs).
And although you didn’t ask I generally think >BOB, TAKE PEBBLE should produce a failure message if the pebble is not in scope, and there needs to be a separate syntax (probably needing to be explained to the player) like BOB, GO TAKE THE PEBBLE to indicate that out-of-scope objects should be considered.
In my WIP I’ve been fiddling around with weakly modal conversational interface for handling complex, multi-step planning with NPCs. So basically building a command stack that is then executed when conversation ends, rather than (by implication) loading everything into a single conversational command to then begin execution when the command is entered.
I don’t have an easy way to check right now, but I’m pretty sure that in all of Infocom’s games (where the >NPC, COMMAND syntax originates as far as I’m aware) the whole line following an NPC’s name is parsed as a command to that NPC even if it contains full stops. Inform seems to parse it that way (including having >BOB, JUMP. BOB, JUMP parsed as “tell Bob to jump followed by telling Bob to tell Bob to jump”).
I’m kind of horrified by the fact that players can ask so much of an NPC in one command. I’ve never even considered putting all these bossy things into one command. Does anyone actually do this?
There are games like Infocom’s Suspended where the only way you can interact with the world is by asking NPCs to do stuff, so when you want them to (e.g.) take a specific route through the map you have to give compound commands like this.
(Suspended implements >ROBOT, GO TO [ROOM] to cut down on this but I seem to remember there are points where you want to make sure they take a specific route to avoid hazards.)
I would expect the command to stick to the NPC initially addressed, so 3 turns, all Bob. If there were a need to queue commands for Bob and protag all at once, I’d enter multiple NPC commands and then enter mine while Bob is doing what I told him to do.
Another option would be bob, get rock while I jump but that seems like heady stuff
Holy moses, that’s a hard call. I voted for Bob jumping because everything else is instructions for Bob, but I can understand how “Jump” can be understood as something the player’s character is doing.
This is exactly why I’d be tempted to refuse the command. It’s too much at once. Bob, take the rock; Bob, put the rock on the table (maybe that second command is enough, assuming putting the rock someplace assumes Bob takes it first); and jump is a lot less ambiguous. Just jump means I’m jumping. Otherwise I’d say Bob, jump.
I’ll just wade in to say I think this is kinda context-specific. If I’m playing a game about ordering Bob about, a la suspended, I’d expect all the commands to apply to him (and the timing may or may not matter). If it’s about coordinating action via timing, first two being commands to Bob and last one being for the player makes sense. And if the game isn’t about those things - and if it is it should clearly communicate that - I’d expect weirdness and / or “hold up there champ” as a response.
I am somewhat surprised by the shape of the response graph so far. I would appreciate your participation in some clarifying polls.
Each poll will take the form of a true or false question about whether or not two distinct command inputs should be considered equal, where “equal” means that they should result in precisely the same sequence of events. (I think the mathematical term is “idempotent”? [EDIT: No, it is not.])
Comparison A – True or false: The following commands should be interpreted identically.
BOB, JUMP. BOB, JUMP.
BOB, JUMP THEN JUMP.
True
False
0voters
Comparison B – True or false: The following commands should be interpreted identically.
BOB, JUMP. JUMP.
BOB, JUMP THEN JUMP.
True
False
0voters
Comparison C – True or false: The following commands should be interpreted identically.
JUMP. BOB, JUMP.
JUMP THEN BOB, JUMP.
True
False
0voters
Comparison D – True or false: The following commands should be interpreted identically.
JUMP THEN JUMP.
JUMP. JUMP.
True
False
0voters
Comparison E – True or false: The following commands should be interpreted identically.
For the game I’m working on there’s a day-to-day cycle, and my intention is for the player to have a sort of planning session in the evening with the NPCs they’ve befriended. So I want the player to be able to convey concepts like “Alice, you should go look for the bell in the abandoned rectory. Bob, look for the Book of the Dead in the library. Carol, look for a votive candle in the candle shop in the mall.”
And then additionally have the NPCs interrogate the player for more information when they’re given tasks they don’t fully understand, and/or have the player supply additional pointers/strategies to the NPCs. Like “Bob, if you encounter the undead librarian, use the holy water” and so on.
This is probably way beyond the scope of most IF order-giving, though.
Rematch requires this, and boy did that stump me for a while, as when I played I’d rarely seen commanding NPCs used at all, let alone telling them to do multiple things in one command…
Yeah, I recoil from the thought of both typing such commands as a player and programming them as an author. I’ve only played a few games that required giving NPCs extensive commands, and I was not a happy camper.
Just to check, when you say “should be”, you’re asking what we expect to happen in actual games today, right? How this should work in an idealised universe is not necessarily the same as how I think it does work.