ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Descriptions / Directions Layout

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.

Descriptions / Directions Layout

Postby DannyBurnley » Sun Aug 12, 2018 10:44 am

Hello again!

My question comes in 2 parts, the former is my issue and the latter is more of a curiosity. Apologies, it's a little lengthy

Firstly, I was wondering about the best way to display descriptions and directions.

The way I currently set out my location descriptions, I will write the description first and then afterwards I'll describe the exits.
I've got into the habit of manually typing the exits into my location descriptions because I don't like the automatic 'exits are north and west' that ADRIFT automatically sticks on the end so I've disabled that.


My problem is that when I want to have a dynamic object which might have been dropped in the room, or a character which might have walked in the room, I'll enable the 'list in location description' property because I don't want to have hundreds of alternative descriptions. BUT I don't want it to be tacked on AFTER the directions I've written

e.g.

'Hallway

Your cottage hallway. Old family pictures line the walls.


'NORTH leads to the front door.
WEST leads to the kitchen
Mr Magoo is also here. Also here is an empty can'

because it seems a little bit out of place.


The only way I can think of getting around it is if I format it like such:

'Hallway

Exits:
NORTH leads to the front door
WEST leads to the kitchen

Description:

Your cottage hallway. Old family pictures line the walls.
Mr Magoo is also here.'

or something similar.
This option doesn't really gel well with me aesthetically either!

Are there any different ways for formatting and displaying text which can solve my problem?


Secondly, is the black background and green text standard for the runner, or is this able to be changed? It can be a little straining on the eyes.


Thanks very much in advance!
DannyBurnley
 
Posts: 16
Joined: Fri Aug 10, 2018 10:58 pm
Location: Burnley, England

Re: Descriptions / Directions Layout

Postby Denk » Sun Aug 12, 2018 1:44 pm

Hi Danny,

I will start out answering your second issue first: Yes, the colors can easily be changed. In the developer under the "home"-tab you can click "options". In here, you change the colors. Note that the player can choose to override those colors in the Runner.

Regarding your first issue:
If I understand you correctly, you would like something like:
---------------
Hallway

Your cottage hallway. Old family pictures line the walls.
Also here is an empty can. Mr Magoo is here.

NORTH leads to the front door.
WEST leads to the kitchen.
---------------

If this is what you are trying to do, the solution is a bit complicated, since you want the sentence "Also here is an empty can. Mr Magoo is here." to display in the middle of your location description which requires a workaround.

The solution I have come up with, requires that you put the exits in a specific task EXITS. This task will run after the look task, because it is set to "run after" Look. Inside this task, you must have one alternative description for each location.

In addition, to display the exits when the game starts, I had to make an event "game starts" which prints the exits when the game starts.

I have attached a small taf-file where you can go between the kitchen and the hallway.
If something is not clear, just ask.
Attachments
Cottage.taf
(15.34 KiB) Downloaded 21 times
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 154
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: Descriptions / Directions Layout

Postby saabie » Sun Aug 12, 2018 1:54 pm

Here is a different way to do it:
You would need to create a new text property for locations and put your directions into that property for every location:
NORTH leads to the front door.
WEST leads to the kitchen.
To make the property open the Properties folder and right-click on the window. Select "Add Property" to open the New Property dialog.
Give it the name "Directions", make it a property of Locations and select type "Text".
Click on the "Mandatory" box to tick it and click the OK button.

Then in the "LOOK" task in the standard library (in the "Look and Examine" folder) which displays the message:
%Player%.Location.Description
you would need to add a function to display your new property. Assuming the property we made above has the key "Directions" then the message to display would now have the two lines:
%Player%.Location.Description
%Player%.Location.Directions

Now you just need to cut and paste all your directions, moving them from the description to the new property we added to the properties tab, for every location.

If you just want to modify the runner colors for yourself when you play any game then select the View/Options menu. This opens a dialog box that lets you change the colors and control whether a game can change the colors. I usually have white background, red input, blue links and black text.
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Descriptions / Directions Layout

Postby DannyBurnley » Sun Aug 12, 2018 2:12 pm

Cheers Denk!

I've looked and found the colours option straight away, bold as brass. Strange, I'm sure I looked there at least twice and couldn't find it.

I don't get how I overlooked it, it's literally the largest thing on the options menu. How embarrassing! That must be my tired brain, but thank you very much anyway!



That's indeed what I'm trying to do, you've just saved the day, man! It's a little hard getting used to everything still. Trying to implement everything I learn in my practise adventure.


I also have a quick question about walks. I noticed you used a 1 second timer in the event you provided for me to display the exits

When I'm trying to get a cat in my adventure to walk between rooms, I can't find an option to 'wait ___ seconds' before starting the walk. There's only the options to do it after the task of 'feeding' him. Should that be done in an event? Or a separate task?

I also want the cat to wander in and out of rooms every few seconds. So if I was to idle on a room for a while, it would display something like 'Mogg walks in, slinking around the chairs', and maybe a few seconds later, leaves again.

Would this be better to do it on an event than a walk?

Thanks very much in advance, mate!
DannyBurnley
 
Posts: 16
Joined: Fri Aug 10, 2018 10:58 pm
Location: Burnley, England

Re: Descriptions / Directions Layout

Postby DannyBurnley » Sun Aug 12, 2018 2:15 pm

Thanks very much Saabie, I'll try that method too!

Looks a little more complicated but it would probably help with understanding how functions work in ADRIFT, and I've never had cause to input my own properties before, so that will help too!

Thanks man!
DannyBurnley
 
Posts: 16
Joined: Fri Aug 10, 2018 10:58 pm
Location: Burnley, England

Re: Descriptions / Directions Layout

Postby Denk » Sun Aug 12, 2018 4:08 pm

DannyBurnley wrote:I also have a quick question about walks. I noticed you used a 1 second timer in the event you provided for me to display the exits

When I'm trying to get a cat in my adventure to walk between rooms, I can't find an option to 'wait ___ seconds' before starting the walk. There's only the options to do it after the task of 'feeding' him. Should that be done in an event? Or a separate task?

I also want the cat to wander in and out of rooms every few seconds. So if I was to idle on a room for a while, it would display something like 'Mogg walks in, slinking around the chairs', and maybe a few seconds later, leaves again.

Would this be better to do it on an event than a walk?
Since walks are only turn-based, not time-based, you would have to do it with events. I personally try to avoid real-time elements in games but that is just my personal preference. The reason I used a 1 second timer in the demo, was that it was the only way I could get the exits displayed correctly when the game starts.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 154
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: Descriptions / Directions Layout

Postby DannyBurnley » Sun Aug 12, 2018 5:25 pm

Thanks for all your help

I'll try it out!

I like the timer waiting 1 second for the directions to display.
I tried to do it in every room but there's no option to trigger the event when entering EVERY location, so I created a new task called 'event caller' and created a new event called 'EXIT'. I set the 'event caller' task to run after 'look room', then i had 'EXIT' event launch on completion of the task. The event waited 1 second, and then ran the 'EXIT' task (displaying the exits) which I set to run only when called by event.

It works but is there a simpler way to do this?

Cheers
Dan
DannyBurnley
 
Posts: 16
Joined: Fri Aug 10, 2018 10:58 pm
Location: Burnley, England

Re: Descriptions / Directions Layout

Postby saabie » Mon Aug 13, 2018 6:43 am

Here is a demo of using an event and several tasks to move a cat on a preset path with timed delays.
When you run it an extra window should open in the runner that tells you where the cat is.
KittyCat.taf
(16.19 KiB) Downloaded 26 times
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Descriptions / Directions Layout

Postby Denk » Mon Aug 13, 2018 12:24 pm

DannyBurnley wrote:I like the timer waiting 1 second for the directions to display.
I tried to do it in every room but there's no option to trigger the event when entering EVERY location, so I created a new task called 'event caller' and created a new event called 'EXIT'. I set the 'event caller' task to run after 'look room', then i had 'EXIT' event launch on completion of the task. The event waited 1 second, and then ran the 'EXIT' task (displaying the exits) which I set to run only when called by event.

It works but is there a simpler way to do this?
You can get rid of the task "event caller" by letting the event "EXIT" launch on completion of the look task. However, you can also get rid of the event "EXIT" by utilizing the textbox tag <wait X> where X is the number of seconds. It also supports the use of decimal places, e.g. <wait 0.5> in case you think that 1 second is not the appropriate amout of time.

There is a slight difference between the <wait> method and the event method. With the event method, the player is able to type during the "waiting time", so that if the player is typing fast, the exits may not be displayed at appropriate places. E.g. if you quickly type LOOK followed by I, the exits are displayed after the inventory command.

But with the <wait 1> method you are forcing the player to move slowly between rooms. E.g. if you are passing through 10 rooms, it will take at least 10 seconds. I have read that people don't like this when playing ADRIFT games, so I wouldn't combine the <wait> tag with the look command. I would thus go for the event method if you want a delay.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 154
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 31

Re: Descriptions / Directions Layout

Postby DannyBurnley » Mon Aug 13, 2018 4:03 pm

Cheers Saabie, I'll make something like that! That's very cool.

Cheers Denk, I've noticed that typing quickly displays before the directions too :(
DannyBurnley
 
Posts: 16
Joined: Fri Aug 10, 2018 10:58 pm
Location: Burnley, England


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 4 guests

cron