GO TO "room" command -- PUT/USE command -- Library

Anonymous
08 Sept 2004, 21:11
I like the idea of adding a prefix as in "the" before a room name under the GO TO tab. Unfortunately, the only thing this does is make the description realistic (You can go to the right room, the left room).
But when you type "go to the right room", it says you can't. It forces you to type "go to right room" and leave out "the". What the heck? :?

Another question. Why can't I have a user put an object that they are holding onto an object that they are not holding? The software thinks that both objects need to be in the inventory to use one on the other if you use the PUT command. This forces you to say USE which isn't perfect English. I am not trying to be picky but I want to make a very realistic and yet scrumptiously ridiculous game where one could PUT a hamster in the microwave and not have to USE the hamster on the microwave. :shock:

Lastly, I have read many ideas in the forums of how to correct the library error when one tries to email an .ASL file to another. I have emailed in more than one way, I have saved the file to my yahoo briefcase to have another person download it and I have saved it to a floppy disc and physically carried it to my friend's house and receive the same stupid error EVERY TIME!!! I can email it to myself from home to work with no problem. So again I say, WHAT THE HECK!!?? :?

Please keep in mind that I am not using advanced technology here, I am using QDK or whatever it's called.

thanks,
Steve

davidw
08 Sept 2004, 21:35
steve the gaming guy wrote:I like the idea of adding a prefix as in "the" before a room name under the GO TO tab. Unfortunately, the only thing this does is make the description realistic (You can go to the right room, the left room).
But when you type "go to the right room", it says you can't. It forces you to type "go to right room" and leave out "the". What the heck? :?


Maybe because people tend not to type "the". After all, if you're moving north, do you type "n" or "go north"?

Anonymous
08 Sept 2004, 22:51
Thanks for the question. Alex might be best to answer this question apparently.
Most people, including myself, choose to type N for north. It's easier. One rule of thumb in making text adventure games is to give the player as many options as possible. With this is in mind, I should note that it never occured to me to create this option of typing "go to the right room" until someone I used as a guinea pig typed it and it didn't work.
Further, in QDK, there is a tab to add a GO TO room. AND it asks if you'd like a prefix. If people aren't going to type it as they see it, then why even have the choice to make the game that way?

Room Description Example:

You are in the First Room
You can go to the north room, the south room, the east room and the west room.
You can go north, south, east, west

The above example is what is shown if you choose to use the GO TO feature in QDK.

Now, again I thank you for your response. If you don't know the answer to this question, do you (or anyone else) know the answers to the other 2 questions I asked in the same original post?

thanks,
Steve

asdfg
09 Sept 2004, 00:31
[ link removed - Alex ]

007bond
09 Sept 2004, 06:29
1. What did that last post have to do with anything?
2. I agree with steve. More basic commands are needed, like put (steve's idea), climb, read, and many others. This would save people having to use/write libraries that do these most basic commands

Alex
09 Sept 2004, 08:25
Prefix stuff - yes, I agree it would be sensible if Quest recognised "go to the blah blah". I'll add it to my "to do" list.

PUT - not entirely sure what you mean here as there's no built-in "put" command - but it's really quite easy to create one yourself. You need to add a command like "put #@thing1# on #@thing2#". I can see it might be nice to have a standard library for these kinds of things though, and it's something that will probably appear at some point.

Library error - I think you sent me an email about this. (Sorry I've not replied yet - also I can't check right now as I'm at work) - I don't know why you should be getting an error, but the most likely explanation is that your friend simply doesn't have the library on their machine. It should either be in the same folder as the ASL file, or in the Quest folder.

Anonymous
09 Sept 2004, 14:24
Alex wrote:Prefix stuff - yes, I agree it would be sensible if Quest recognised "go to the blah blah". I'll add it to my "to do" list.

PUT - not entirely sure what you mean here as there's no built-in "put" command - but it's really quite easy to create one yourself. You need to add a command like "put #@thing1# on #@thing2#". I can see it might be nice to have a standard library for these kinds of things though, and it's something that will probably appear at some point.

Library error - I think you sent me an email about this. (Sorry I've not replied yet - also I can't check right now as I'm at work) - I don't know why you should be getting an error, but the most likely explanation is that your friend simply doesn't have the library on their machine. It should either be in the same folder as the ASL file, or in the Quest folder.


Cool, thanks for the "to do" update.

I just tried the PUT thing again so I can give you a proper example. Let's say "thing 1" is an object you can pick up and "thing 2" is an object you cannot pick up. You want to put "thing 1" on "thing 2" (which your solution above sounds like it would work). What I currently get right now is as follows (if I am holding thing 1):

>put thing 1 on thing 2
You are not holding such a thing.

That's why it leads me to believe that the program will only let you put an object on another object if you are holding both of them. Regardless, I will try your solution.

Library Error - yes, that was me who emailed you. No problems on the response delay, I know how it is. I will definitely tell my friend to check his ASL library. One thing about that is confusing though. As I make updates to my game, I save it as "filename0909" Where 0909 is the date I complete the update. So when I email it home, I have several versions of the same game. My very first one was "filename" without the date. I sent 5 versions to my friend, one with no date and 4 with the date in the filename. Strangely, only the one without the date works and that, of course, is a very early version of the game. I'm pretty sure we tried saving the latest version as "filename" without the date and he still couldn't open it. We will get together and research his ASL library location to make sure it is in the right place. Thanks a lot for the help! :lol:

steve

Alex
09 Sept 2004, 16:51
Is the PUT command part of the Q3EXT library? If so then Alan Bampton will probably be able to help you out.

Anonymous
09 Sept 2004, 18:10
Well what do you know... It sure is part of the Q3EXT file:

!addto synonyms
of; the =
x = examine
put; put down = drop
give back = give
pick up; pick; get; take back = take
out of; back from = from
in to; into; inside = in
back to = to
don; drop on = wear
take off; remove = unwear
shut = close
talk = speak
look at in = examine
go = go to
to to = to

007bond
09 Sept 2004, 18:50
It would help if you could give us the ASL file plz

Anonymous
09 Sept 2004, 20:16
007bond wrote:It would help if you could give us the ASL file plz


This is in response to Alex's suggestion above. I assumed the Q3EXT.qlb is something we all had. Maybe I downloaded it from this site. I'm not sure how to attach on here anyway. No matter. I think it came from MaDbRit.

Anonymous
10 Sept 2004, 08:34

think it came from MaDbRit.



yes it did - a LONG time ago... :-)

if you want to put something on another thing, the Q3EXT library as it was then is working in 'put on clothes mode' - and so you won't get the effect you want.. (it is looking for a 'put jacket on' construct - if you see what I mean.)

this is why the item has to be present, you can't wear what you don't have...

If you actually want to put (say) a hamster on a microwave (sadist!) what you need to do is make the microwave a container and the hamster a containable. By default that will let you put the hamster IN the microwave and subsequently describe it as being IN the microwave - a few simple overrides in the lib and those IN's can easily become ON's - problem sorted.

By the way, Q3Ext is VERY out of date, it was replaced by 'Typelib.qlb' some 2 years ago (I think thats when I let the typelib beta escape)

Typelib itself is due for replacement (Typelib Version 3)as soon as I complete my basic testing (which depends on my being available to fix things - which I haven't been for some time :-( )

Al (MaDbRiT)

007bond
10 Sept 2004, 10:21
Since when was there a TypeLib 3? V2 hasn't even been released!

Anonymous
10 Sept 2004, 13:14

if you want to put something on another thing, the Q3EXT library as it was then is working in 'put on clothes mode' - and so you won't get the effect you want.. (it is looking for a 'put jacket on' construct - if you see what I mean.)



I totally see what you mean.

If you actually want to put (say) a hamster on a microwave (sadist!) what you need to do is make the microwave a container and the hamster a containable. By default that will let you put the hamster IN the microwave and subsequently describe it as being IN the microwave - a few simple overrides in the lib and those IN's can easily become ON's - problem sorted.



Of course, the hamster in the microwave was simply an example! hehe. I hate to sound more newbie'er' than I already do but what is a basic way to make the microwave a container and the hamster a containable? Is that using types or properties? I've tried making types and properties for other objects for other reasons but I don't quite understand the process so I don't know how to put the script in for it. How would the container and containable thing be accomplished? Further, what if I want a default message posted if you try to put ANY object in the microwave?

By the way, Q3Ext is VERY out of date, it was replaced by 'Typelib.qlb' some 2 years ago (I think thats when I let the typelib beta escape)

Typelib itself is due for replacement (Typelib Version 3)as soon as I complete my basic testing (which depends on my being available to fix things - which I haven't been for some time :-( )

Al (MaDbRiT)



I knew I had seen typelib.qlb somewhere, I wasn't sure which came first. I believe I looked it just a couple days ago and thought it was a dup of the Q3ext because of the similar swimming pool scenario which is included in the download.

Thanks again, you guys know your stuff.
Steve

Anonymous
10 Sept 2004, 13:34
Oops I left out a question. In the microwave example, let's say I want a default message or script to happen when the player types "use microwave". I have a similar problem where the game tells me "you don't have that." I would like it to simply say "You can't use the microwave with nothing inside it."

Anonymous
10 Sept 2004, 18:40
To 007Bond...

Typelib2 was released to my trusty testers last year and was (to be blunt) quite horrible - LOL

I decided to embark on a complete re-write as a lot of the code could now be done better (as Quest has matured) and this re-write is under test now

meantime "Typelib3" is a developed version of the original typelib that works now - but really isn't very QDK friendly as yet

Al (MadBrIt)

Anonymous
10 Sept 2004, 18:43
I guess we're online at the same time. I just asked about that in the other string. And now I have my answer!!

steve

MaDbRiT
10 Sept 2004, 19:00
Steve

If you are still online you can IM me (AOL) or e-mail me, I'm quite happy to go through how to (mis)use my typelib ;-)

Al (MaDbRiT)

Anonymous
10 Sept 2004, 20:01
heres a very quick 'demo' - using your hamster & microwave scenario. it shows how you can easily use typelib to make objects that can have things put ON them rather than IN them, and a very simple way to script a use command (for the microwave) that doesn't require the microwave to be actually held at the time. (In this example I simply have the microwave reported as broken if it is in the room but you can do whatever you like with the same method)

Cut the following, paste it into a text editor and save it as 'hamster.asl'. You'll need a copy of typelib.qlb in the same folder (or in the quest main folder) for the example to run.

Note - make sure you have typelib.qlb 1.009 dated 6-Sep-2003. !

 ' "Hammy the Hamster"
' Created with QDK Pro 3.52

!include <Typelib.qlb>

define game <Hammy the Hamster>
asl-version <350>
gametype singleplayer
start <kitchen>
game author <MaDbRiT>
game info <Created with QDK Pro 3.52>
command <drop #@fstobj# on #@scdobj#> exec <put #fstobj# in #scdobj#>
command <use microwave> {
if here <microwave> then msg <The Microwave is broken, sorry.>
else msg <What microwave?>
}
end define

define synonyms
end define

define room <kitchen>

define object <microwave>
type <TLTcontainer>
properties <listHeader=Sitting on the microwave is; sizeLimit=15; sizeLimit=15>
end define

define object <hamster>
alt <hamster; hammy>
look <he's kind of cute in a rodent way...>
take
prefix <a>
displaytype <furry animal>
gender <he>
type <TLTobject>
type <TLTcontainable>
properties <size=15>
action <speak> say <squeak-squeak!>
end define

end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define


You can also open the hammy.asl file in QDK to see how I set this up - it took a few minutes only. :-)

Al (MaDbRiT)

steve the gaming guy
10 Sept 2004, 21:30
Anonymous wrote:

Note - make sure you have typelib.qlb 1.009 dated 6-Sep-2003. !



Firstly, I wasn't online for but a couple minutes earlier, sorry I didn't catch your IM message.

typelib.qlb 9/6/03? Is there a link where I can get that one? The one I got from your website was from 2002, I believe. I'll check again later. I'll also have to try out your scenario later too.

steve :wink:

steve the gaming guy
05 Oct 2004, 16:29
I know this was like a month ago. I was going to try to use it in my game but decided to wait until future games because I didn't want to get into coding.
I copied your microwave/gerbil program into QDK under the Misc ASL code section and I was able to get the game to run. However, I could not make the two objects interact with the other. I can look and examine both objects. I can pick up the hamster. I can use the microwave. But I cannot put the hamster on or in the microwave nor can I drop the hamster on the microwave.

What command should I be typing in?

I was reading the lengthy string that Frank started about Containables and am interested in working with them. I'm still slightly frightened about using the actual coding. I guess I'm going to have to eventually if I want to get the things done that I want to do. In regards to questions about that post, I will post in that string.

With that said, what do I do with this fuzzy little creature?

steve the gaming guy :oops:

EagleWing
05 Oct 2004, 17:39
Steve said

typelib.qlb 9/6/03? Is there a link where I can get that one? The one I got from your website was from 2002, I believe. I'll check again later. I'll also have to try out your scenario later too.



You definitely want the one from 2003. It makes a great deal of difference. It certainly did for me, at least.

Frank

Anonymous
05 Oct 2004, 17:39
Steve wrote

I copied your microwave/gerbil program into QDK under the Misc ASL code section and I was able to get the game to run. However, I could not make the two objects interact with the other. I can look and examine both objects. I can pick up the hamster. I can use the microwave. But I cannot put the hamster on or in the microwave nor can I drop the hamster on the microwave.

What command should I be typing in?



You should be able to use 'put hamster on microwave' or 'drop hamster on microwave' and variations thereof - works for me!

A limitation of the container code currently is you can have either "on" or "in" for a specific object (the microwave here) but not both at the same time. That said you should be able to make the code above work fine - here's my game log as produced by the sode cut n' pasted...

 (Start of new game)


You are in kitchen.


You can see a microwave and a hamster here.


> take hamster
Taken.

> put hamster on microwave
O.K.

> x microwave
Nothing out of the ordinary.
Sitting on the microwave is a hamster.


As you can see - this is working OK! Except for the lack of a prefix in kitchen but that's hardly relevant to the problem in hand.

Al (MaDbRiT)

steve the gaming guy
05 Oct 2004, 17:51
Well...I guess I need to copy the code elsewhere or something. In QDK, I clicked Script/Misc ASL and it opens a blank window, so I just copied the entire code into that. Right off the bat, there's something obviously screwy with the way I did it because when you start the game, there is no room description and no objects listed which makes you believe there is no game. But when you say 'get hamster', it suddenly appears as does the microwave and you then have a hamster in your inventory.

No further commands seem to work as far as putting on or dropping on.

Is there somewhere else I should put the code for the game to test it?

steve the gaming guy :?:

Anonymous
05 Oct 2004, 18:53
Hi Steve

Just save the code above as (say) 'test.asl' and then double click to run it.
You can then open it in QDK if you want - just don't put it inside another game!

Al (MaDbRiT)

steve the gaming guy
05 Oct 2004, 20:07
gotcha :wink: