Quest 6: PRONOUNS command (working code)

image


commands.push(new Cmd('MetaPronouns', {
	regex:/^pronouns$/,
	script:function() {
		//NOTE:  This command is for everyone accustomed to INFOCOM and/or Inform games.
		var { it = "is unset", him = "is unset", her = "is unset", them = "is unset", ...leftovers } = parser.pronouns
		it.name ? it = "means " + getDisplayAlias(it, DEFINITE) : it = it
		him.name ? him = "means " + getDisplayAlias(him, DEFINITE) : him = him
		her.name ? her = "means " + getDisplayAlias(her, DEFINITE) : her = her
		them.name ? them = "means " + getDisplayAlias(them, DEFINITE) : them = them
		var s = `{random:At the moment:Right now:Currently:As of this turn}, "it" ${it}, "him" ${him}, "her" ${her}, and "them" ${them}.`
		msg (s)
		// DEBUGGING
		//I don't think "them" is included (as of v 0.3), but I am including "them" anyway.
		//The next line will catch any leftovers.
		if (leftovers.length) {debugmsg("There seem to be unlisted pronouns! Check the console log!");console.log(leftovers)}
		// END OF DEBUGGING
		return world.SUCCESS_NO_TURNSCRIPTS;;
	},
}));


Are you aware there is already a command that does this? It outputs to the console, rather than the screen; is that what your point is?


Are you aware there is already a command that does this?

I was not aware of that.

Hrmm... I just looked for it and still don't see it.

I see :

DebugWalkThrough (undefined)

DebugInspect (undefined)

DebugInspectByName (undefined)

DebugTest (undefined)

DebugInspectCommand (undefined)

DebugListCommands (undefined or undefined)

DebugParserToggle (undefined)

I also tried entering PRONOUNS before I decided to create a pronouns command.

What is the name and/or pattern of this command of which you speak?


It outputs to the console, rather than the screen

If I'd have found the existing equivalent of the PRONOUNS command, I probably would have just modified it to print to the screen.


is that what your point is?

I'm just trying to make a game that either (A) lives up to or (B) surpasses the expectations of serious text adventurers, most of whom are accustomed to standard/common commands .

In this case, PRONOUNS is a command I see players use when they are playing a game in which the turn count matters and a wasted turn could be the difference between a perfect ending and an average one.


Typing PRONOUNS should have worked. It does for me. It is around line 253 in _commands.js.

I understood it to be for debugging. If you are that worried about the turn count, type the word, not IT. That will be less typing than doing PRONOUNS first, I would have thought.

By the way, I started a thread on MetraCommands on IntFiction, which is where I first heard of it.
https://intfiction.org/t/what-meta-commands-are-useful/48594/10


Typing PRONOUNS should have worked. It does for me.

I probably messed something up in one of my files, then.


If you are that worried about the turn count, type the word, not IT. That will be less typing than doing PRONOUNS first, I would have thought.

A-ha! Touché, sir!

That is solid logic, I must admit.

Also, I must admit that "it" isn't as important in a Quest game. In the old parsers, we had to type at least 6 letters of a name for the game to understand. So, "it" came in very handy.


Log in to post a reply.

Support

Forums