ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Newbie questions/frustrations

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 Chilli » Thu Oct 14, 2010 7:47 pm

Hi all:

I'm working on my first adventure with ADRIFT and am really liking it... for the most part. I keep stumbling, though, when I try to do certain things. I'm wondering if I'm running into limitations of ADRIFT 4 or just am not understanding how to use this powerful engine. At the moment, it seems as though I'm spending 90% of my time trying to catch exceptions to how things should work.

Here are some examples:

1) I have created a command to allow me to unlock a gate. The command reads:
[unlock/open] {iron} [gate]

This works just fine, EXCEPT if I first type in something like:
look at gate

and then type in:
open it

The indirect reference doesn't execute my command; instead, it simply says:
The iron gate is now open.

Is there way way to catch this exception?

2) I have a number of items that I'm placing in rooms for "atmosphere" that I want the player to be able to look at but not to take. It seems that Static objects stay in one place and cannot, by design, be taken. However, I cannot seem to create a Static item that is then placed on another item (i.e., I cannot create a Static "dusty jar" that sits on a Static "dusty shelf"). I can, though, make the item a Dynamic one. But, that allows the player to then take the item, which I don't want.

I created an action:
take *

that is supposed to override the default action of Take to force the item to stay put. And this works, EXCEPT when I am in a room with the one item that I DO want to take. I've tried to create a specific command:
take {sealed} {metal} [container]

that would allow the item to be taken and transferred to the Player, but the less specific command listed above (take *) seems to take precidence and prevents the more specific command from being executed.

3) I cannot figure out how to use %object% or %theobject% variables in text being displayed as the completion of an action. If I type in the command:
open jar

and I put the following text in the box for the completion of the action:
You try to open %theobject%, but are unsuccessful. It does not want to be opened.

when this action is executed, the message displayed is exactly what I've typed in above, including the %theobject%. The same occurs if I change to %object% instead.

4) What is the "recommended" way to trigger a one-time action (perhaps the displaying of some text, perhaps moving the player to a different room, whatever) as soon as the player enters a particular room? The only way I've been able to get something like this to work is to create an Event localized on the room that runs constantly and loops, but this seems like a waste of resources.

Thanks for ANY help you can send my way on any (or all) of these questions! It is TRULY appreciated!

Sincerely,

"Chilli"




Edited By Chilli on 1287085648
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Duncan_B » Thu Oct 14, 2010 8:16 pm

1) I have created a command to allow me to unlock a gate. The command reads:
[unlock/open] {iron} [gate]

This works just fine, EXCEPT if I first type in something like:
look at gate

and then type in:
open it

The indirect reference doesn't execute my command; instead, it simply says:
The iron gate is now open.

When you use "it," the full name of the object will be filled in, including its prefix. So the autocompleted version is "open the iron gate." You task as constructed won't trigger because it doesn't have the "the."

Personally, I would write the task as "* open * gate *". If you just need to display a particular message, you could also replace the door opening message using the ALR.

However, I cannot seem to create a Static item that is then placed on another item

If you can't take it, just make it a static object and say in descriptions that it is on the shelf. If you really wanted, you could make a dynamic object and use a condition check (looped event as you have described, attached to a task checking for a restriction) to move the whatsis back to the shelf if the player carries it. I believe there's potential for that to get thorny if the PC is carrying a container-- you would have to move it back to the shelf if it were also in the container.

I cannot figure out how to use %object% or %theobject%

That's only meaningful if it's used as input for a task first. If it is, the object referred to will be what fills in the variable. For example: "* drop * %object% *" could be used to create a task that triggers whenever the player tries to drop an object (any object). Your response to that input could be "You don't feel like dropping %theobject%." This will then fill in the name of the object with its prefix (%object% does not include prefix).

What is the "recommended" way to trigger a one-time action as soon as the player enters a particular room?

I would use a condition check, as you described. Check the Adventures page for a module you can plug in to get it all set up for you (the module checks for three tasks, but it's just an example; you can take it down to one if need be by deleting two).

Let me know if this is helpful. Would you care to tell us more about your game here?
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby Chilli » Thu Oct 14, 2010 8:50 pm

Hi Duncan:

Thanks for the speedy reply!

I see your point about the indirect reference not completely meshing with my command. I have fixed that now. I guess I thought that the articles in front of the object name (i.e., a, an, the, some, etc.) weren't included in the object name proper. Now I know better. ;)

Regarding static versus dynamic items, I can make them all static other than for those items that can be taken. I just liked the fact that the items placed "on" a static item didn't show up when LOOKing at the room until the player LOOKed at the static item.

I still don't quite follow the workings of %object% and %theobject%. I tried to create an action that read "take %object%" and it wouldn't execute. I guess I need to see an example of how this works....

Speaking of examples, you mentioned an "Adventures" page with modules and things. Where would I find this?

Thanks again for the help! It is TRULY appreciated!

Sincerely

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Duncan_B » Fri Oct 15, 2010 1:38 am

Regarding static versus dynamic items, I can make them all static other than for those items that can be taken. I just liked the fact that the items placed "on" a static item didn't show up when LOOKing at the room until the player LOOKed at the static item.

If you only want the vase to show up when the player >LOOKs at the shelf, of the shelf (or whatever surfaced item), you could just write it into the shelf item's description. "There is a vase atop the desk," or something like that. If you create a separate static item for the vase, it can still have its own description, too.

I still don't quite follow the workings of %object% and %theobject%. I tried to create an action that read "take %object%" and it wouldn't execute. I guess I need to see an example of how this works....

When you create an object, you are prompted to give it a prefix and a name. %object% refers only to the object name. %theobject% refers to the name of the object plus its prefix. If your task was just "take %object%", then you would not be able to use "it," since "it" automatically plugs in the full name of the object.

Speaking of examples, you mentioned an "Adventures" page with modules and things. Where would I find this?

Click here. Click the link that says, "Adventures." This space is where ADRIFT games are published. You are free to browse through, download, and play games at your own whims. Some games are not password protected, so you can view the source code in the Generator. They can provide good examples.

You'll see there are drop-down menus for "Sort by" and "Category." If you click "Category" and change it to "Modules," you can see all of the modules published for ADRIFT.




Edited By Duncan_B on 1287106846
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11


Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: No registered users and 3 guests

cron