ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Strange PUT ALL behavior

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.

Strange PUT ALL behavior

Postby Lazzah » Wed Nov 21, 2018 11:58 am

Hi all,

For some reason, in my current WIP PUT ALL IN object seems to be working differently from how it has done in the past!

In my inventory are two containers, and when I type PUT ALL IN BAG, the game responds with "Ok, you put the gold coins, the canvas pouch, the canteen and the water in the bag." The gold coins are in the canvas pouch and the water is in the canteen.

Is there a way to stop this happening? :Thanks:
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2154
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Strange PUT ALL behavior

Postby saabie » Thu Nov 22, 2018 11:48 am

How this works should not have changed but it will depend on whether you are holding the bag or not.
It is also a bit random as 'ALL' will try every object in the world in an uncontrollable order so it will sometimes move the canteen with the water in it first and other times it will move the water out of the canteen before it moves the canteen.
If you want to only put in the bag the directly held items then you will need a set of restrictions that fail for objects inside or on another object if exact text was 'ALL'.
I will upload a demo of this tomorrow and will probably add it to my upgraded standard library as well.
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Strange PUT ALL behavior

Postby saabie » Fri Nov 23, 2018 9:24 am

Here is a demo to force "Put all in bag" to ignore objects in or on other objects so that it only moves the objects directly carried.
PutAll.taf
(15.05 KiB) Downloaded 7 times

At the beginning of the restrictions of "Put objects in others" I added these 3 restrictions (note that all of the brackets and the OR are essential):
adrift Code: Select all
(  [Referenced Objects] [must not] [Be exact text] ['All']            OR
(  [Referenced Objects] [must not] [Be inside object] [Any object]    AND
   [Referenced Objects] [must not] [Be on object] [Any object]     )) AND

None of them should have any restriction text.

Also, on the advanced page in the "If task fails and input references all" box I put:
adrift Code: Select all
%CharacterName% [am/are/is] not carrying anything that can be put inside %object2%.Name.

You will probably want to do the same thing in the "Put objects on others" task.
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Strange PUT ALL behavior

Postby Lazzah » Fri Nov 23, 2018 10:51 am

saabie wrote:Here is a demo to force "Put all in bag" to ignore objects in or on other objects so that it only moves the objects directly carried.
PutAll.taf

At the beginning of the restrictions of "Put objects in others" I added these 3 restrictions (note that all of the brackets and the OR are essential):
adrift Code: Select all
(  [Referenced Objects] [must not] [Be exact text] ['All']            OR
(  [Referenced Objects] [must not] [Be inside object] [Any object]    AND
   [Referenced Objects] [must not] [Be on object] [Any object]     )) AND

None of them should have any restriction text.

Also, on the advanced page in the "If task fails and input references all" box I put:
adrift Code: Select all
%CharacterName% [am/are/is] not carrying anything that can be put inside %object2%.Name.

You will probably want to do the same thing in the "Put objects on others" task.

Thanks saabie! :Thanks: :claps: :D
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2154
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 8 guests