ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Creating/using liquids

This forum is the place to discuss the older ADRIFT versions 3.9 and 4.0.

Please refer to the ADRIFT 4 Manual for more information.

Postby Pinacolada » Tue Oct 26, 2010 5:29 am

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.
Pinacolada
 
Posts: 8
Joined: Wed Feb 07, 2007 11:09 pm
Location: Washington state, USA

Postby Campbell » Tue Oct 26, 2010 7:35 am

You say it doesn't produce a message. But it must output something. What does it say when you try running your command?
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4620
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Postby Albaniua » Tue Oct 26, 2010 8:37 am

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.
Honk if you've played Escape from Rungistan.
User avatar
Albaniua
 
Posts: 87
Joined: Tue Sep 30, 2008 8:55 pm
Location: Las Vegas, NV

Postby Duncan_B » Tue Oct 26, 2010 10:03 am

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.
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby Pinacolada » Tue Oct 26, 2010 8:20 pm

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
Pinacolada
 
Posts: 8
Joined: Wed Feb 07, 2007 11:09 pm
Location: Washington state, USA

Postby KFAdrift » Wed Oct 27, 2010 6:53 pm

Putting things within angle brackets is like making a comment that is not output but visible in generator
KF
Staring harder at the screen doesn't give any more inspiration
User avatar
KFAdrift
Site Admin
 
Posts: 4884
Joined: Sun Jun 23, 2002 4:42 pm
Location: Surrey, southern England

Postby Pinacolada » Sat Oct 30, 2010 5:29 am

D'oh. I thought that's what # was for. Thanks. :)
Pinacolada
 
Posts: 8
Joined: Wed Feb 07, 2007 11:09 pm
Location: Washington state, USA

Postby KFAdrift » Sat Oct 30, 2010 7:18 am

# 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.
KF
Staring harder at the screen doesn't give any more inspiration
User avatar
KFAdrift
Site Admin
 
Posts: 4884
Joined: Sun Jun 23, 2002 4:42 pm
Location: Surrey, southern England


Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron