Page 1 of 1

PostPosted: Tue Oct 26, 2010 5:29 am
by Pinacolada
I thought it would be interesting to simulate liquids being poured to give an environment more realism.

Reading through the manual (nicely done, Campbell!) I found out how to create objects, do the ALR substitutions, and even made a wine glass and wine bottle (which is tested for corked vs. uncorked states, really neat IMHO) but when it comes down to it, pouring the wine doesn't produce a message.

I've got a few conditions set:

Wine bottle must be uncorked
AND wine_bottle_level must be greater than 0 [the amount of wine in the bottle]
(glass must be an object on the table OR
wine bottle must be an object on the table OR
glass must be held by the Player OR
wine bottle must be held by the Player)

Messages for each restriction are, respectively:
Try uncorking the wine bottle first.
No more fruit of the vine remains in the bottle. Alas.
You carelessly pour some wine on to the table and floor.
(You don't have a bottle of wine to fill the glass with.) (Condition set 1)
((You don't have a glass to pour the wine into.) Condition set 2
(You aren't holding the wine bottle, condition 4)

I know, I can't count. Actually I deleted a condition. What I was thinking is change a few ANDs to ORs and move parentheses around for condition grouping, but I'm not sure. I did try the restrictions "glass and wine bottle are in the room" (thinking that would cover bot holding it and being on the table) but that doesn't work either.

Message upon completion is (temporarily) "<<you pour the wine>>" in hopes of seeing something.

Just a prompt.

Has anyone written a module concerning liquids? Although it's a good learning experience trying to figure something like this out on my own, maybe this is too complex a thing for a beginner to start with. I feel as though I almost have the solution! I'm certainly pleased I got this far.

PostPosted: Tue Oct 26, 2010 7:35 am
by Campbell
You say it doesn't produce a message. But it must output something. What does it say when you try running your command?

PostPosted: Tue Oct 26, 2010 8:37 am
by Albaniua
have you ran the debugger?
when you look at the task it will tell you if its completable or not. it it says no, then you know its something to do with your conditions, rooms the task can be done in or something like that.

PostPosted: Tue Oct 26, 2010 10:03 am
by Duncan_B
The only restrictions you should need are
Wine bottle must be uncorked
AND wine_bottle_level must be greater than 0 [the amount of wine in the bottle]

Delete the rest and it should work fine.

PostPosted: Tue Oct 26, 2010 8:20 pm
by Pinacolada
Message upon completion is (temporarily) "<<you pour the wine>>" in hopes of seeing something.


Well, turns out that was the problem. I think the angle brackets were being interpreted as HTML tags, and invalid ones at that. Campbell, it was outputting ">" which I thought was a prompt. :)

I did play with the debugger a bit, and noticed the variables decrementing/incrementing properly, just no message output.

Thanks for everyone's suggestions! I learned a few things.

Coming to screens near you: The Wine Glass, the Thread, and a Newbie. :yeah:




Edited By Pinacolada on 1288124613

PostPosted: Wed Oct 27, 2010 6:53 pm
by KFAdrift
Putting things within angle brackets is like making a comment that is not output but visible in generator

PostPosted: Sat Oct 30, 2010 5:29 am
by Pinacolada
D'oh. I thought that's what # was for. Thanks. :)

PostPosted: Sat Oct 30, 2010 7:18 am
by KFAdrift
# makes a task command name comment.

The thing with angle brackets is often used in room names, particularly where rooms would have the same name. An example might sections along a road.