Game confuses two object names - partial matching problem

So I have an object "casks" and a character "bran". They are in the same room. If I try to interact with Bran, I get a "which do you mean? 1. brandy 2. bran" interaction

This is because "casks" has an alt attribute (other name) of brandy. I don't want to remove the other name because the player is likely to interact with the object using the word "brandy".

Clearly the game is running a partial match, that's why interacting using the word "bran" pulls both "bran" and "brandy".

Looking in the docs (https://docs.textadventures.co.uk/quest/important_attributes.html) under "The alt attribute" heading it says "Quest will match bits of names", and clearly this is hurting, not helping, in this situation!

Anyone know if I can stop Quest doing partial matches on a particular object, or perhaps how to introduce a "brandy" NOT "bran" boolean thingy?


Interestingly, I do not have this problem in a different room, with an object "cloak" and a figure "cloaked figure". Interacting with cloak, it understands I mean the object and not the figure. So now I am really confused as to why the behaviour is different!


It should only do partial matching if there are no full matches. So if the object's alias is "bran" and the player uses the name "bran" in a command, it shouldn't look for partial matches.

I'm not sure, but I think this might happen if Bran's alias has a space at the end or something similar – not visible, but it's enough to stop the engine considering it to be an exact match.


@mrangel

That was it exactly! Thank you so much! It's just a minor thing, but it was causing me so much grief! Yes, I had put the character's full name (so first name and surname) in the alias, so it did contain a space, exactly as you say. Now it works perfectly! Fab!


I've had issues like that before. Such as when I have "book of poetry" and "green book", but the disambiguation list always included "bookcase" when the player types "read book". Putting "book" in the alt list (even if it's already part of the object's alias) solves this neatly :)


wow, great solution to the problem


Thank you. I have had this problem for years


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums