ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Combining two items to make a new one?

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.

Combining two items to make a new one?

Postby PHatDriver » Thu Feb 23, 2017 11:06 am

Hello beautiful people,

Neewbie here and in need a bit of advice.
Most certainly been asked before but I cant find it.

So, I have a "wood" and a "String"
and want to combind them to make a new objct - a Bow.

Im guesing I have to hide both and replace.
But dont even know where comands
"use - with" or combind "* with *" are.
Or even how to replace the above.

Thank you too much for any help...
Remanence, The Chosen. Expected release date: 2117!
65+kb and sill to finish part one! <- Nightmare
Carbide 100R window - XFX 750 Black - Asus Z170 AURA - i5 6600k
RX480 Saphire Nitro+ - Vengeance 2x8gb - Crucial MX300. [No OC]
User avatar
PHatDriver
 
Posts: 35
Joined: Sat Feb 11, 2017 11:47 am
Location: London

Re: Combining two items to make a new one?

Postby Lazzah » Thu Feb 23, 2017 5:15 pm

PHatDriver wrote:Hello beautiful people,

Neewbie here and in need a bit of advice.
Most certainly been asked before but I cant find it.

So, I have a "wood" and a "String"
and want to combind them to make a new objct - a Bow.

Im guesing I have to hide both and replace.
But dont even know where comands
"use - with" or combind "* with *" are.
Or even how to replace the above.

Thank you too much for any help...

Hi PHatDriver, welcome to the world of ADRIFT.

Right, first of all you must create a GENERAL task for the command ATTACH object TO object. Start a new task and click on General. You must think of other verbs that mean the same as "attach" so that the command line in your general task will be:

[attach/fit/join] %object1% [to] %object2%. The default message for this task should be "You cannot attach %TheObject[%object1%]% to %TheObject[%object2%]%"

Note that I will probably get shot down in flames for using the old-style functions (%TheObject[%object1%]%, etc) in the completion message above, but I really do not understand the new-style functions at all. If any Drifter wants to show you how to do this using the new-fangled functions, let him/her go ahead!

ADRIFT will automatically add the restrictions you need for this task. When this has been done, click on OK on the Description tab to save the task.

Assuming you have already created objects for A LENGTH OF WOOD, A PIECE OF STRING and A BOW, you must now create a SPECIFIC task to actually perform the action.

Start a new task and give it a name, e.g. ATTACH STRING TO WOOD. Before you do anything else, make the task a GENERAL one, click on the "Advanced" tab and put a tick in the "Prevent this task from being inherited" box. Click on the Description tab when you have done this and switch the task back to a SPECIFIC one.

Where it says "Task should override:" click on the triangle far right and select the ATTACH OBJECT TO OBJECT general task you created earlier. The command will appear below as Attach first object to second object.

Where it says "first object" click on this and select "a piece of string" from the drop-down list and for the second object select "a length of wood". Now, in the large box at the bottom, type in the text that you want to appear when the player actually types ATTACH STRING TO WOOD. I have done this in the attached demo. You can click on "Apply" at any stage to keep what you have done.

Click on the Restrictions tab and click "Add". The first restriction you need is Object 'a piece of string' must be visible to character 'Player'and the second is Object 'a length of wood' must be visible to character 'Player'.

Now click on "Actions" and type "Add" again and add the actions Move object 'a piece of string' to location [Hidden], Move object 'a length of wood' to location [Hidden] and Move Object 'a bow' to held by Player.

Finally, switch back to the Description tab, as before, and click OK to save the task.

I have created a small demo where the above has been implemented. Note that you should try to think of other commands which the player might type in to achieve the same as ATTACH STRING TO WOOD. The simplest of these would be MAKE BOW. Using the above as an example, maybe you could add this command to the demo?

I hope the above and the demo helps.
Attachments
Basic Stuff.taf
(15.35 KiB) Downloaded 22 times
OUT NOW: The Lost Children
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
User avatar
Lazzah
Moderator
 
Posts: 2008
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England

Re: Combining two items to make a new one?

Postby PHatDriver » Mon Feb 27, 2017 12:34 pm

Hi Lazzah,

Thank you for a comprehensive yet easy to understand set of answers,
much appreciated.

If I could, can I pick your knowledge a touch more? You know I have to.
I need to comprehend a few additional actions
and my “masterpiece” [coughs] should be well on the way.

First of all, why did I have to: Prevent this task from being inherited?

You pointed out: [attach/fit/join] %object1% [to] %object2%.
I’ve done this and was wondering if it’s an okay way of doing things:
[attach/fit/join] %object1% [to] %object2%.
[attach/fit/join] %object2% [to] %object1%.

Swopped OBJ1 and OBJ2 around in the same box,
so it doesn’t matter which way round the player enters the input.
Wondering if there will be consequences of that later on.

I want the bow drill to just be used on its own, as in:
[Use bow/make fire/use bow drill/use bowdrill] <- that did not work!
Burn wood was easy enough to work out but that doesn’t seem enough somehow.
The bow can only be used in one location everywhere else is too windy.

Differing ways for the player to fail or be killed
and conversely a few ways the player can win – within Adrift.
Managed to work out if the player gets to a certain room he is killed but that’s it so far.

Lastly, the player has, say, 50 moves from the start of the game until he dies of hypothermia. They really need that fire.

That’s a lot, I know, sorry.
Again, thanx...
Remanence, The Chosen. Expected release date: 2117!
65+kb and sill to finish part one! <- Nightmare
Carbide 100R window - XFX 750 Black - Asus Z170 AURA - i5 6600k
RX480 Saphire Nitro+ - Vengeance 2x8gb - Crucial MX300. [No OC]
User avatar
PHatDriver
 
Posts: 35
Joined: Sat Feb 11, 2017 11:47 am
Location: London

Re: Combining two items to make a new one?

Postby Lazzah » Mon Feb 27, 2017 5:19 pm

Hi PHatDriver,

If you get into using ADRIFT your games might get big, as mind did, so when you need to reference a general task when you are creating a specific one, you don't want to have to search through hundreds of tasks from the drop-down lists. When you tick the "Prevent this task from being inherited" box that particular task will not appear in the dropdown lists. You should only do it with SPECIFIC tasks!

One trick to make finding anything easier when you are programming is to put an underline character at the front of the name, i.e. _MAKE FIRE for the name of a task or _THE BOW DRILL, etc. This will make it appear at the top of whatever the list is, so you won't need to search for it. When you have finished referencing that particular task/variable/object, you can delete the underline from the name.

You should create two general tasks, MAKE object and USE object for the commands MAKE FIRE and USE BOWDRILL. If you are having trouble with these, attach your game file to your next forum post and we can look at it to see where you are going wrong.

To save going into a long-winded explanation here, I have knocked up a small demo as attached. You have 5 moves before you die of hypothermia.

I hope it helps. Any questions, just ask.
Attachments
Use Bow Drill.taf
(16.14 KiB) Downloaded 20 times
OUT NOW: The Lost Children
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
User avatar
Lazzah
Moderator
 
Posts: 2008
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England

Re: Combining two items to make a new one?

Postby DazaKiwi » Wed Mar 01, 2017 7:33 pm

I have always wondered what "Prevent this task from being inherited" mean't Lazzah good to know finally.
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Combining two items to make a new one?

Postby PHatDriver » Fri Mar 03, 2017 10:41 pm

Thank you for all your help n tips, Lazzah.
I get it, it's simple!
I can see it getting very complicated very quickly though.
Nightmare, what have I gotten myself into.

Again thank you.
Remanence, The Chosen. Expected release date: 2117!
65+kb and sill to finish part one! <- Nightmare
Carbide 100R window - XFX 750 Black - Asus Z170 AURA - i5 6600k
RX480 Saphire Nitro+ - Vengeance 2x8gb - Crucial MX300. [No OC]
User avatar
PHatDriver
 
Posts: 35
Joined: Sat Feb 11, 2017 11:47 am
Location: London


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest