Find out the exact word used?

In I7, is there a way to test which actual word was used to refer to an object?

I’m thinking of something like this, where “gold” and “egg” refer to the same object but I want to treat the first time the player uses “gold” in a special way.

Silly example, but something like this:
[Understand “gold” as egg when gold has been smelled, or something like that would solve the part where gold is not understood until a certain point…]

So I’m looking for something like
Before doing something to the gold:
if word used was “gold”:

I suppose it could be solved by using a second gold object and placing it in scope…is that the way to do it perhaps?

/Savaric

You can add conditions to the understand rules, so I believe if you set a property for the egg (ie “The egg is known or unknown.”) And then “Understand “gold” as the egg when the egg is known.”, you should be okay. (Untested - the syntax may be off.)

Yes, that solves it as far as controlling when “gold” is understood as referring to the egg, but I don’t want the player to find out that the egg is made of gold by examining “egg”, he must use the actual word “gold” to find that out…

But it may not be possible as long as “gold” and “egg” refer to the same object, that’s why I’m thinking I may need a second, off-stage gold object, but it seems a bit inelegant :stuck_out_tongue:

/S

This pretty much works…but it needs a second object.
But perhaps that’s ok :slight_smile:

[code]The gold is a thing. The gold can be smelled.
The player carries an egg. The egg can be discovered.
Understand “gold” as egg when egg is discovered.

After deciding the scope of the player:
If gold is smelled and egg is not discovered, place gold in scope.

Instead of smelling:
say “You smell gold!”;
now gold is smelled;

Before of doing something to the gold:
say “You know there is gold here somwehere…hey! The egg is made of gold!”;
now egg is discovered;
now printed name of egg is “golden egg”;
now the noun is the egg;[/code]

Ah, sorry, I misunderstood. Would adding a check that looks at the player’s command help winnow it down?

After doing anything with the egg: if the player's command includes "gold": [insert necessary code here]

Hmm, after looking at your example, I have a new vision of what you’re doing. Must be Friday!

What’s wrong with using a second object, anyway?

Ah, that seems like it could be what I was looking for. Thanks!

/S

Nothing really, but I’m a programmer at heart and creating two objects where one will serve goes against my instincts :stuck_out_tongue:

Not long ago, an idea that I was tossing around in the “ideas I might want to use someday” part of my brain was that of an NPC who could be addressed (or referred to) with two different names, one quite respectful, the other less so. Depending on which one you used, his attitude towards the player (and hence his responses to diffreent things then player might do) would differ. It occurred to me that this could only be done if you could have two synonyms which are understood as referring to the same thing, but where the machine keeps track of which one you use. I didn’t know if it was possible to do that – but it sounds like its basically the same thing that you’re trying to do.

Robert Rothman

Yes, sounds pretty much like the same kind of problem.

And with the method gravel suggested, you should be able to do something like this:

[code]Sir Reginald is a person in the Lab.
Understand “dude” as reginald;

Instead of answering reginald that:
if player’s command includes “sir reginald”:
say “‘A very good day to you, sir!’”;
else:
say “‘Harumph! Impudent whippersnapper!’”;

[/code]

Robert Rothman: this was used for a slightly subtle effect in (first spoiler is the name of the game and the second is what the effect was) Ad Verbum where the directions listed in the room descriptions were abbreviated if the player used abbreviations for them: if the player issues direction commands like “> go e” or “> e” the room descriptions say things like “To the e you see [whatever].”

Hm, I thought you were going to say (first spoiler the name of the game, second spoiler a little about it)

The Warbler’s Nest

where

how you refer to the baby is very important

though I don’t remember exactly how it was implemented.

Savaric: you probably want “sir” instead of “sir reginald,” don’t you? “sir, hello” seems as though it should be acceptable. Of course this allows for “sir dude.”

Which would totally be appropriate for certain characters. :stuck_out_tongue:

I don’t think Cunctator will mind if I post a bit of code from Gigantomania:

[spoiler][code]Understand “comrade” as a person.
[…]
Before talking to or examining an other proper-named person during Proletariat:
if the player’s command does not include “comrade”:
say “Don’t you mean [italic type]Comrade[roman type] [printed name of the noun]?” instead

Before printing the name of someone proper-named during Proletariat:
say "Comrade "
[/code][/spoiler]

Capmikee, that was one of my favorite bits of the comp.

I can’t take credit for the idea, but thanks!

I don’t know how you’ve planned the puzzle, but you need to be extremely careful to hint this correctly and not to frustrate players if this is a mandatory thing and not an… um… easter egg. Many if not most players (or, at least I) don’t give such a strong connection between the parser and the game world itself, just like the compass directions are just a convenient abstraction for navigating the map and the player character doesn’t actually think in compass directions. If the game understands the player when they use EGG to refer to the object but expects the player to use some other wording to solve the puzzle, most people won’t make the connection without help. Anyway, playtesting should reveal flaws in the design if any.

That is a good point. What I am after is not so much a puzzle as a gradual revealing of information…
An ordinary object becomes special only after the player makes ANY sort of reference to the special object (and the name of the special object will be mentioned to the player before I expect him to use it…this is me trying to be as helpful as possible in order to NOT frustrate the player…but as you say, maybe its too “non-standard” to work. Well, well see. Maybe I need to throw in more hints if it’s too obtuse…)