ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Faraway objects and locations.

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Faraway objects and locations.

Postby rovarsson » Thu Mar 05, 2020 10:13 am

Hi all!

What are your methods for looking at faraway objects and locations without being able to interact with them? I wrote a more detailed version of this question on the W.I.P. page under "Climb Tree".

Thanks,
Rovarsson.
rovarsson
 
Posts: 86
Joined: Mon Dec 23, 2019 10:37 pm
Location: Belgium
Points: 15

Re: Faraway objects and locations.

Postby P/o Prune » Thu Mar 05, 2020 10:18 am

I usually create a task taking care of the problem:
Say you are on a road and there's a house in the distance.
Create a task [look {at}] {the/distant} [house] With the restriction that player must be at a certain / adjacent location or location group.
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 97kb
User avatar
P/o Prune
Site Admin
 
Posts: 4608
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 93

Re: Faraway objects and locations.

Postby rovarsson » Thu Mar 05, 2020 10:33 am

General tasks then. I had a method in mind where I would lump all visible locations (and their objects) in a loc group and use alternative descriptions with restriction 'player must be a location 'On Boulder'.
rovarsson
 
Posts: 86
Joined: Mon Dec 23, 2019 10:37 pm
Location: Belgium
Points: 15

Re: Faraway objects and locations.

Postby Denk » Thu Mar 05, 2020 12:49 pm

In your other thread (Climb Tree) you mentioned three methods (A, B and C). To refer to them, I have inserted a quote below:

rovarsson wrote:Today I will be implementing looking at faraway stuff from a high vantage point. How would you go about this: PC is standing on a high rock and can see several other locations. I want the PC to be able to X/LOOK AT those locations and objects in them, but not interact with them in any other way. A) I could create the objects in location "On Boulder" and write Specific Tasks and descriptions, taking care to override SEARCH and other tasks. B) I could include all visible locations in a location group and write alternative descriptions for visible objects with the restriction 'Player Character must be at location On Boulder'. C) I could do it all with General Tasks so objects don't have to exist in my location (group). I'm afraid this would bring with it a bunch of Priority issues though.
Any thoughts?


I personally avoid method C whenever I can, since it increases the risk that the parser isn't behaving consistently. But if you go with method C, be sure to copy the command field from the Examine Objects task in the Standard Library:
adrift Code: Select all
[examine/exam/ex/x/look {at/in{side}/under}]

Sure, you can erase "under" when examining something far away, but doing it this way ensures that a player who tends to type e.g. EXAM object, is understood by your general task. If we for instance, take P/O Prune's example above, EXAMINE is not understood and you cannot type LOOK AT THE DISTANT HOUSE, only LOOK AT DISTANT HOUSE and LOOK AT THE HOUSE, i.e. THE and DISTANT are not allowed in the same sentence. What I am trying to say is, that you should be very thorough when you use general tasks like this, which is why I try to avoid method C whenever I can. More over, if you try something else, e.g. SEARCH object, you get a "Sorry, I'm not sure which object you are referring to." so the player might think that the object is not implemented in this location.

I don't think I understand the details of method B so I cannot comment on that. It might be doable.

I personally stick with method A since it is simple and ensures a consistent parser. There are many tasks in the Standard Libary which can give silly default responses for faraway objects, e.g. "You squeeze the forest but nothing happens." or similar. As you mention, you could override SEARCH object etc. for these faraway objects. To speed up that work, you can create an objects group with the faraway objects, so that for each task you override, you don't define the object. Instead you put in a restriction saying that the object must belong to that group. If you think that is too much work, you can create a general task with high priority:
adrift Code: Select all
%text% %objects%

which e.g. gives the response: "You can only look at something far away." This task should run whenever you try to interact with an object in the faraway-group unless %text% is equal to "x","ex","exam","examine" or if it contains "look".
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251

Re: Faraway objects and locations.

Postby rovarsson » Thu Mar 05, 2020 1:11 pm

Denk,
The problems you mention with C are exactly what I mean.
For some reason, I am reluctant to create doubles of objects that already exist in another location (my brain is not yet used to program-thinking), but your explanation of method A with an object group of 'faraway objects' makes sense.
I have already used method B for looking at hills that are visible from multiple locations.
In my current situation I would do something like this: PC is at location 'On Boulder'. Object 'a statue' is in faraway location 'Field'. I would create a location group 'OnBoulder&Field' , and add an Alternative Description for object 'a statue', describing it as seen from far away. This alternative description would have the restriction 'Player Character must be at location On Boulder'.
This does mean that with each new location I will have to remember to check if it is visible from 'On Boulder' and write alternative descriptions for its objects. (Same for method A). Working with general tasks doesn't require that the objects already exist.
rovarsson
 
Posts: 86
Joined: Mon Dec 23, 2019 10:37 pm
Location: Belgium
Points: 15

Re: Faraway objects and locations.

Postby Denk » Thu Mar 05, 2020 1:39 pm

rovarsson wrote:In my current situation I would do something like this: PC is at location 'On Boulder'. Object 'a statue' is in faraway location 'Field'. I would create a location group 'OnBoulder&Field', and add an Alternative Description for object 'a statue', describing it as seen from far away. This alternative description would have the restriction 'Player Character must be at location On Boulder'.

Ah, okay I think I understand. So the object 'statue' is in the location group 'OnBoulder&Field' and so it can be examined from both locations. That makes sense. I like that method too. I guess you will have the same problem as method A when it comes to silly responses such as "You squeeze the statue but nothing happens." when you are far away from the statue. These silly responses could be avoided in the same way as described for method A.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 14 guests

cron