Two strange problems

Erohiel
17 Nov 2012, 04:41
I've been trying a bunch of different programs, trying to find the best for my game. I was really, really liking the ease of using Quest until I came across a couple problems.

I'm trying to make a HIGHLY interactive game, so I was expanding the number of verb synonyms. I was able to make "Lay on" (accounting for the common grammatical mistake people would likely use) act as 'lie on', but when I tried to expand the synonyms that would act as 'eat', (chew on being one), suddenly the game insisted "on" was a part of the object name and therefore wasn't recognizing any object starting with the name "on".

My second problem... I start the player off wearing pajamas. which are mentioned in the player's description. The pajamas are stained with blood, but i want to allow for specific interactions with the stains irrelevant to the clothing itself. So I made 'blood stains' also an item on the player. But the problem arises when I make "bloody pajamas" or "blood stained pajamas" one of the synonyms for the pajamas. And despite making 'blood' a synonym for the stains, when i choose to 'examine blood', I can only look at the pajamas and not the stains.

Can this be fixed while still allowing the level of interactivity and account for all the possibly things someone might type?
(Please do not bother to mention the fact that my game is wholly empty at the moment, or criticize my 'priorities' in making people able to chew on tables before there's even a second room, because these points are both irrelevant to the situation.)

jaynabonne
17 Nov 2012, 04:51
For the first problem, you have both "chew #object#" and "chew on #object#" in your list, and "chew" comes before "chew on", so that one matches first (with #object# being what's left of the line). If you switch their order in the list so that it tries "chew on" first, then it works for both.

The second, I'll try now.

Erohiel
17 Nov 2012, 04:56
jaynabonne wrote:For the first problem, you have both "chew #object#" and "chew on #object#" in your list, and "chew" comes before "chew on", so that one matches first (with #object# being what's left of the line). If you switch their order in the list so that it tries "chew on" first, then it works for both.

The second, I'll try now.


Ok, i'll do that. you may need to re-add "blood stained pajamas" into the synonyms for pajamas before trying it in my game because i think i removed it in trying to pinpoint the problem.

jaynabonne
17 Nov 2012, 04:58
I did that, but for some reason, I didn't have the problem you did. If you could post it with the issue (sorry!) it would be helpful.

Erohiel
17 Nov 2012, 05:16
jaynabonne wrote:I did that, but for some reason, I didn't have the problem you did. If you could post it with the issue (sorry!) it would be helpful.


Odd. I'll try to recreate it then

Erohiel
17 Nov 2012, 05:25
Hmm... Maybe it was an issue related to when I previously had the blood stains as a 'child' object to the pajamas rather than the player.

But while I have your attention, can I ask a quick question? How do I prevent the player from being able to put their pajamas on things? Obviously I want them non-removable, but at the moment 'put pajamas on table' takes them off the player.

And how might I make them not listed on the inventory on the side while still making them capable of being examined and interacted with?

The Pixie
17 Nov 2012, 08:50
If I was doing this I would have a flag on the pyjamas object that indicates if they are stained or not, and change the description and alias when they are cleaned.

And how might I make them not listed on the inventory on the side while still making them capable of being examined and interacted with?


Set it as "Scenery" on the first tab.

Erohiel
17 Nov 2012, 10:35
The Pixie wrote:If I was doing this I would have a flag on the pyjamas object that indicates if they are stained or not, and change the description and alias when they are cleaned.

And how might I make them not listed on the inventory on the side while still making them capable of being examined and interacted with?


Set it as "Scenery" on the first tab.



I've set it as scenery, but that doesn't stop it from showing up in the inventory. I'm hoping I wont have to go the long way around and make pajamas an item in every room.

The Pixie
17 Nov 2012, 16:04
Do you need pyjamas to be an object at all? Could you just create comands like "clean pyjamas" that changes the descriptio of the player or whatever? Ifthe pyjamas can be removed, create a command "remove pyjamasa" that spawns a pyjamas object in the current location (actually I would move it here from some offstage location) and updates the player desciption.

jaynabonne
18 Nov 2012, 16:18

But while I have your attention, can I ask a quick question? How do I prevent the player from being able to put their pajamas on things? Obviously I want them non-removable, but at the moment 'put pajamas on table' takes them off the player.



You seem to have run into one of those Querks ("Quest quirks") known as "uncontrollable default behavior". In this case, the "put x on y" command does not allow for the source object to say it's not "put-able". I was actually quite surprised, as "drop x" is more or less "put x on <some unspecified location in the room>", and you can control dropping. "drop" and "put on" have semantic similarity. You would think that "put on" would honor the same properties as "drop". Sadly, it doesn't.

I have attached a file that tries to fix that. I copied the core "put" command up into the game file and then just added some lines to check the "drop" attribute. If the object does not support dropping, then it won't support putting. You can decide how you want to handle the message for that. Given what you had, I just had it print out "dropmsg", which you already had set. So it behaves the same as attempting to drop in this case.

Let me know how that works.

Alex
18 Nov 2012, 17:21
Yes I agree this sounds like a design flaw. The "put" functionality is certainly rather lacking at the moment. Happy to accept pull requests from anyone who feels like implementing something sensible in the core library!