ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

ADRIFT 5 newcomer advice

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.

ADRIFT 5 newcomer advice

Postby Denk » Wed Jul 24, 2019 4:44 pm

This thread is intended to contain advice to ADRIFT 5 newcomers, be it former ADRIFT 4 users or ADRIFT users in general. Try to remember the things you found confusing when you first started using ADRIFT 5 and explain how it can be handled.

This very first post in this thread will be updated whenever new advice is added, so this first post is a sort of Table of Contents for the rest of this thread.

CONTENTS
-------------
1. Unhide Library items and disable Simple Mode ( http://forum.adrift.co/viewtopic.php?f=14&p=106010#p106010 )
2. Creating a new verb: TALK TO ( http://forum.adrift.co/viewtopic.php?f=14&p=106015#p106015 )
3. When specific tasks do not run ( http://forum.adrift.co/viewtopic.php?f=14&p=106069#p106069 )
4. Example - Enter ( http://forum.adrift.co/viewtopic.php?f=14&p=106098#p106098 )
5. How to create a decent map ( http://forum.adrift.co/viewtopic.php?f=14&p=106099#p106099 )
6. How to use Item Functions ( http://forum.adrift.co/viewtopic.php?f=14&t=12082&p=106101#p106101 )
7. Avoiding known bugs in Standard Library ( http://forum.adrift.co/viewtopic.php?f=14&p=106120#p106120 )
Last edited by Denk on Thu Aug 01, 2019 12:32 pm, edited 10 times in total.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Unhide Library items and disable "simple mode"

Postby Denk » Wed Jul 24, 2019 5:23 pm

There may be different opinions on this, but I think that the default "Simple Mode" of ADRIFT 5 is too restrictive, even to newcomers. Very quickly the user will start asking why they cannot see the options etc. other users are seeing. Similar to this, I don't think there is any reason to hide the Standard Library items. You can learn a lot from looking at the Standard Library items. So this post will describe how to disable Simple Mode and how to make the Standard Library items visible.

Both things are handled from within Settings. Settings are opened up here:
OpenSettings.png
OpenSettings.png (40.79 KiB) Viewed 1799 times
(scroll down to the right to see the bottom of this picture)

You will then get this window:
Untick Simple Mode.png
Untick Simple Mode.png (30.16 KiB) Viewed 1799 times


Here you must untick "Simple Mode".

Then go to the Libraries pane:
Go to Libraries.png
Go to Libraries.png (18.45 KiB) Viewed 1799 times
(scroll down to the right to see the bottom of this picture)

In here untick "Hide Library Items".

Table of Contents can be found here: http://forum.adrift.co/viewtopic.php?f=14&t=12082
Last edited by Denk on Tue Jul 30, 2019 5:12 pm, edited 1 time in total.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: ADRIFT 5 newcomer advice

Postby David Whyld » Wed Jul 24, 2019 9:32 pm

Simple view and hiding library items certainly didn't help me much. I was trying to override some of the default responses but couldn't find an option for it anywhere and even Googling it didn't help. Then I turned off simple view and stopped hiding the library items and suddenly there it was.
David Whyld
 
Posts: 6914
Joined: Sat Dec 18, 2004 5:15 pm
Location: United Kingdom
Points: 35

Re: ADRIFT 5 newcomer advice

Postby Denk » Thu Jul 25, 2019 6:05 am

Good to hear you figured it out. BTW, requests for topics in this thread are very welcome.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Creating a new verb - example: TALK TO

Postby Denk » Thu Jul 25, 2019 7:16 am

When you create a new verb, you should "always"(*) make a general task handling the general cases and specific tasks for handling the specific cases.

(*): Exceptions exist - see discussion below in the following posts.

Example:

I have made a small demo on how to implement a "Talk To"-command:
ImplementingTalkTo.taf
(15.67 KiB) Downloaded 21 times

Try talking to the three persons in the house, e.g. TALK TO JOHN. You will find that John and Jake give the same response. This is handled with the general task.

Lisa in the kitchen gives a different response. This is handled by a specific task, which overrides the general TALK TO response.

If you want your game to have a strong parser, you must remember to make a general task handling the general cases and then use specific tasks to override in specific cases whenever possible.

So try to avoid using general tasks for something specific.

Also, note the two restrictions in the general task. When you create a new general task from scratch, these two restrictions are automatically created:
1. The Player character must have seen Referenced Character
2. The Player character must be visible to Referenced Character

Keep them as they ensure you get meaningful responses when the characters are not visible and if you have never met a character in the first place.

Finally, you might try to ask/tell/say something to the characters. You will find that when trying to do this, you are advised to TALK TO <character> instead. Open the taf-file to see how this was done.


Table of Contents can be found here: http://forum.adrift.co/viewtopic.php?f=14&t=12082
Last edited by Denk on Tue Jul 30, 2019 5:14 pm, edited 2 times in total.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: Creating a new verb - example: TALK TO

Postby Lazzah » Fri Jul 26, 2019 2:05 pm

Denk wrote:NEVER(!) use general tasks for something specific.


I actually disagree. There are many occasions where you would use a general task instead of a specific one. For example, very often my playtesters have commented that they didn't like the response when they try to take a static object, for example some berries on a bush, where the default response would be "You cannot get the berries!". The library TAKE OBJECT general task will only work on a dynamic object.

In this case I would create a new general task using the command line [get/take/pick] {a/some/the} {red} [berry/berries] and the message text (for example) "You think about taking some of the berries from the bush, but decide not to as they might be poisonous." I would alter the task priority of this general task so it is a higher number - I just delete one of the digits in the priority - so that the task will execute.

See attached demo. See the different responses if you GET LEAVES and the one for GET BERRIES. Which would you prefer?
Attachments
General Task Demo.taf
(15.02 KiB) Downloaded 20 times
WIP: The Lost Labyrinth of Lazaitch

ALSO AVAILABLE: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, Magnetic Moon, Starship Quest

COMING SOON: Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2237
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 55

Re: Creating a new verb - example: TALK TO

Postby Denk » Fri Jul 26, 2019 3:33 pm

Okay, "NEVER" is too strong a word. Perhaps I should have said "Whenever possible" in the sense that if you don't know how to handle it in any other way, you could use a general task. It is, of course, a matter of taste when to use general tasks. I would just like to emphasize it, since far too often newbies are using general tasks all the time instead of using specific tasks, very often resulting in a bad parser.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EDIT: I have now changed the wording in my post so that it is recommended to use specific tasks for specific situations, though exceptions exist.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I agree that the more thorough response for the berries in your demo is better. But you don't need to use a general task for that.

Instead, you could have used a text override. Or you could add an alternative description in the Standard Library task for those objects which should have a different response than "You can't take the red berries!".

If done right, there may not be any noticeable difference between using a specific task and using a general task. But using general tasks for specific situations require more effort if you don't want to reduce the quality of the parser.

For instance, in your demo, if I decide to type "pick up berries" I get the response "You can't take the red berries!". It is easy to change that when you are aware of it, but if you are not aware of it, the quality of the parser is reduced. Also, if you decide to add additional synonyms for an object, you will have to modify all the general tasks which are using that object.

Such problems do not occur when you use specific tasks. But as you mentioned, you cannot use a specific task to override TAKE <static object>. In such cases, you can use other methods instead of using general tasks. Which method to choose is a matter of taste.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

When specific tasks do not run

Postby Denk » Sun Jul 28, 2019 12:07 pm

One of the things which I found confusing when I first started to use ADRIFT 5 was that sometimes a specific task does not run. For instance, I had a specific task for TAKE AXE. The axe was initially a static object since, to begin with, it could not be taken (it was stuck under a bush). However, I wanted a different response than "You can't take the axe!".

Since it is possible to make a specific task for TAKE AXE, I expected this specific task to run when typing TAKE AXE but it didn't. The reason is, that a specific task will only run if the restrictions of the general task are fulfilled.

If you open the standard library task "Take Objects (Parent Task)" (found in the folder: Standard Library->Give, Take and Drop) and go to restrictions you will see that the fourth restriction is: "Property 'Object type' for Referenced Objects must be 'Dynamic'"

Thus the general task and hence the specific tasks will only run for dynamic objects, not static objects.

There are several ways to fix this. Lazzah gave an example on how to use a general task for a specific purpose in this post:http://forum.adrift.co/viewtopic.php?f=14&p=106037#p106037

Another method is to make the object dynamic and then prevent taking it with tasks. However, if you insist on making the object static there are other methods available.

Especially, if you only want to change the message when typing TAKE AXE, i.e. no actions, there are other methods.

One method is to use a text override for "You can't take the axe!". Then you can replace that default response with any message you like. However, text overrides must be changed, in case you change the name of the axe, e.g. if you decide to call it a "sharp axe" instead of just "axe".

A method which is immune to this problem is to add an alternative description to the restriction message in the task "Take Objects (Parent Task)". If you open that task and go to restrictions you must double click on the fourth restriction "Property 'Object type' for Referenced Objects must be 'Dynamic'".

The restriction is then opened for editing and you will see the text box for that restriction, which is: "%CharacterName% can't take %TheObjects[%objects%]%!":
FindRestriction.png
FindRestriction.png (39.04 KiB) Viewed 1541 times


Now right click on the text box and select "Add Alternative Description". Here you must require that the alternative description only runs when the referenced object is the axe. Then you can type your chosen alternative description for TAKE AXE:
AlternativeDescription.png
AlternativeDescription.png (18.83 KiB) Viewed 1541 times


Don't worry, you are only changing the standard library task in this game file. As soon as you start on another project, the default standard library is back.

If you want actions to occur when typing TAKE <static object>, e.g. TAKE AXE, you will need to write a general task. You can either make a general task for a specific situation as demonstrated by Lazzah in a previous post ( viewtopic.php?f=14&p=106037#p106037 ) or you can write a general task which accounts for all static objects and then subsequently write a specific task for the axe, overriding the new TAKE STATIC OBJECTS general task. This is a bit more complicated. I have thus demonstrated this in the taf-file below.

If you are interested in this method and something is not clear, just ask and I will try to elaborate on this method.
Attachments
NewTakeTaskForStaticObjects.taf
(15.16 KiB) Downloaded 16 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: ADRIFT 5 newcomer advice

Postby saabie » Sun Jul 28, 2019 1:00 pm

Another option would be to remove that restriction from the general task and use a specific task to override it for all static objects and give the default message.
Then you can add specific tasks that override that specific task if you want something to happen if they try to take a particular static object.
saabie
 
Posts: 977
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: ADRIFT 5 newcomer advice

Postby Denk » Sun Jul 28, 2019 1:49 pm

saabie wrote:Another option would be to remove that restriction from the general task and use a specific task to override it for all static objects and give the default message.
Then you can add specific tasks that override that specific task if you want something to happen if they try to take a particular static object.
Just tried this method and it works very well too. Good idea Saabie. :)
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Example - Enter

Postby Denk » Tue Jul 30, 2019 11:42 am

If you would like to be able to type e.g. ENTER SHOP and then be moved to the location "Inside Shop" you will find that if you make a specific task overriding the general task "Go Inside Object" and you set object to SHOP, this specific task will not run. That is because one of the restrictions in the general task "Go Inside Object" are not fulfilled.

The general task can be found in Standard Library->Player Movement. Open the task "Go Inside Object" and go to restrictions. Note the fourth restriction. It requires that the object has the property 'Characters can go inside this object'.

When an object has that property, you can override the general task with a specific task. So one way to handle the problem is to give that property to the object, which you would like to enter. Then you can make a specific task which overrides the general task and moves the player to the relevant location.

This method is demonstrated in this taf-file:
ExampleEnter.taf
(15.75 KiB) Downloaded 17 times


When we give that property to an object, e.g. a shop, we have made that object a container. This means that unless we do something about it, the player can put objects inside the container. This unwanted behaviour can be avoided by making a specific task which overrides the general task "Put objects in others".

Moreover, we need a decent reply to LEAVE SHOP. The default response is "You are not inside the shop!". This is a decent reply unless we are inside the shop. Thus I made a text override for that response, which only applies when you are inside the shop.


Another method: If you are sure that the player will never need to go inside an object (like the phone booth in the taf-file above) you might as well disable the tasks "Go Inside Object" and "Get Out of Object", which are both found in Standard Library->Player Movement.

To disable them without deleting them, you simply change them to system tasks. Then they will never run and you can always change them back to general tasks, e.g. if you want to see the applied commands. Once these tasks are disabled it is much simpler to create a new ENTER object general task, since it will not be conflicting with an existing Standard Library Task. This method is demonstrated in this taf-file:
ExampleEnter2.taf
(16.07 KiB) Downloaded 17 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

How to make a decent map

Postby Denk » Tue Jul 30, 2019 12:04 pm

Campbell explains in detail how you create and modify your map in this video: http://forum.adrift.co/viewtopic.php?f=33&t=11434

Table of Contents can be found here: http://forum.adrift.co/viewtopic.php?f=14&t=12082
Last edited by Denk on Tue Jul 30, 2019 5:17 pm, edited 1 time in total.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

How to use Item Functions

Postby Denk » Tue Jul 30, 2019 2:57 pm

You might have seen some examples of item functions in some of the more advanced tutorials.

Here are some examples:

adrift Code: Select all
%character%.Held.Count (gives the number of held objects by a character)
 
%character%.Held.Openable.Count (gives the number of openable held objects by a character)
 
%location%.Exits.Count (gives the number of available exits in a location)
 
%object%.Contents.List (gives a readable list of the contents of a container object)


But how do you know which item function to use? Is there a list of all item functions somewhere?

No. Instead ADRIFT helps you by displaying the possible options as you type.

For instance, go to a text box in a task and type: %character%

Now type full stop. Once you have done that, a list of options pops up. You can choose any option with the mouse, but if you instead scroll down using the arrow keys, you will get an explanation for each option. It looks like this:
Display Options.png
Display Options.png (51.11 KiB) Viewed 1381 times

Those options which outputs text has the abc-icon, e.g. Character Name. Other options have a house-icon such as "At which location?". This option provides the key to the character's location, which in turn can be used to output information about that location.

Let's for now choose "Held" which is a group of objects containing those objects which are held by the character. Add now a full stop again. Then you get a new list of options:
Display Options2.png
Display Options2.png (53.64 KiB) Viewed 1381 times

Note the option "List" with the abc-icon. This option will output a list with the objects in a readable format.

Let's now choose "Count" with the 123-icon, which means that the output is a number. You can output the number in a text box as done here, but you can also copy the entire expression into a restriction if you like, e.g. if you will not allow the player to carry more than three objects for instance.

You can read more about the item function here: http://wiki.adrift.co/Item_functions


Table of Contents can be found here: http://forum.adrift.co/viewtopic.php?f=14&t=12082
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Avoiding known bugs in standard library

Postby Denk » Thu Aug 01, 2019 12:31 pm

There are a few bugs in the standard library. Since they are bugs in the library and not in ADRIFT itself, the bugs can be fixed. Some of the bugs can be worked around too.

If you don't want to fix these bugs, but just want to get working on your game, I recommend that when you start on a new game, you use the taf-file below as a starting point. In this taf-file the most important bugs have already been fixed so you do not need to care about them.

TAF-FILE WITH FIXED BUGS:
LibraryBugFixV2.taf
(16.11 KiB) Downloaded 19 times
The taf-file contains some test locations, test objects, test characters and test tasks. You can just delete those (don't delete Player Character!).

However, if you have already started working on your game, you can't use the above taf-file directly. However, you can open the taf-file and see how the bugs were fixed and then fix the relevant bugs in your own game-file in the same manner.

The bugs, which are fixed are (They will be explained later):

1. Container bug
2. No route north, only north
3. get off objects before moving
4. Task "Ask about (Lazy)" never runs

----------------
1. Container bug
----------------
If you make an object a container, you can put any other dynamic object inside it unless you do something about it. However, you can easily make a group containing those objects which are allowed to go inside your container and then make a task which prevents the player from putting other stuff inside the container.

However, the ADRIFT Standard Library can use another method. Unfortunately, there is a bug in this method:

If you in the Object Properties select "Object is a container" you can furthermore select "...and the container can hold". If you do select "...and the container can hold" you will get an ADRIFT error when you try to put an object in the container. This bug can be fixed as explained here: http://www.adrift.co/bug/19030

However, it is much easier to untick "..and the container can hold" to avoid the bug, and then apply the first-mentioned method above, i.e. by making a group with the allowed objects and then make a specific task, which prevents other objects to be put in the container.

------------------------------
2. No route north, only north
------------------------------
This bug reveals hidden exits before they become available. The bug occurs whenever a direction restriction is not fulfilled. Let's say we cannot go west before a variable has a certain value, but we can go east. For instance, a door may be hidden or locked. If you haven't made a "direction restriction message" you will get the default response which is: "There is no route to the west, only east and west." This sentence doesn't make sense. If you instead try to go north, you get the response: "There is no route to the north, only east and west." If there is a locked door to the west this latter response is not so critical but if the door hasn't been discovered yet, it is a problem. Thus we should change the default response to something better.

The source of the problem lies in the Standard Library Task "Player Movement" which can be found in Standard Library->Player Movement. If you open that task and click on Restrictions, you will see that this task only has one restriction: "The Player Character must have a route available to the Referenced Direction". If you double click on that restriction it will open and you can see the restriction error message. This message is quite complicated. However, you can open the taf-file attached above and copy the corresponding fixed message into your own Player Movement Restriction. If you would like more information about this bug, it is described in this thread: http://forum.adrift.co/viewtopic.php?f=14&t=11661&hilit=Exits+improperly+displayed

--------------------------------
3. get off objects before moving
--------------------------------
This is not so critical a bug but makes ADRIFT looks a bit clumsy. Before fixing the bug, you could get a transcript like this:

adrift Code: Select all
LIVING ROOM
There is a couch here. An exit leads west.
 
>sit on couch
You sit on the couch
 
>go west
(getting off the couch first)
 
 
>go west
You move west
 
KITCHEN
An exit leads east.
 


In the above transcript, you have to type "go west" twice before you are moved to the west.
After fixing this bug the transcript looks like this:

adrift Code: Select all
LIVING ROOM
There is a couch here. An exit leads west.
 
>sit on couch
You sit on the couch
 
>go west
(getting off the couch first)
You move west
 
KITCHEN
An exit leads east.


How to fix it is explained here: http://forum.adrift.co/viewtopic.php?f=14&t=11612&p=102609&hilit=difference+in+the+behaviour#p102609

-------------------------------------
4. Task "Ask about (Lazy)" never runs
-------------------------------------
If you are alone with a character it should be sufficient to type "ask about something" but due to a simple bug, you will get the response "I'm not sure who you are referring to."

The reason is that the Standard Library task "Ask about (lazy)" (found in Standard Library->Conversation) has too low priority, i.e. the priority number is too high. Open the task, go to the advanced tab and reduce the priority number sufficiently. In my file the priority was 50048. I then changed it to 40048.


Table of Contents can be found here: http://forum.adrift.co/viewtopic.php?f=14&t=12082
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: ADRIFT 5 newcomer advice

Postby Campbell » Wed Oct 02, 2019 9:52 am

To disable Simple Mode, you can also just double-click on the status bar where it says "Simple Mode: On".
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4652
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 4 guests