ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Tricks of the (ADRIFT) Trade #1

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.

Tricks of the (ADRIFT) Trade #1

Postby Lazzah » Sat May 23, 2015 5:08 pm

I use one or two tricks to make programming with ADRIFT easier and quicker. It occured to me that other Drifters might like to learn these tricks, and also I wondered if any other Drifter might also have thought of them?

The main one is use of the _ underline character when creating tasks where I reference new locations, objects and variables, etc. Say, for example, you have just created a new variable called Lazzah. You may need to reference this variable in the restrictions and/or actions of several tasks, and when you have to find it in the drop-down list of variables of each task you would have to scroll down through the list until you find it - and if your game is a big one (as mine are) this can take some time. However, if you prefix the name with an underline (i.e. _Lazzah) then this will place the variable right at the top of the list where you can quickly select it, so there is no scrolling down to find it. Once you have finished adding the variable in all the tasks in which it is referenced, you simply edit it to remove the underline and it will resume its alphabetical place in the list.

One variable which is the most frequently referenced one in my games, i.e. the SCORE variable, I prefix with TWO underlines (__SCORE) so that it is always at the very top of the variables list when I want to add a score to a task, as in the image below.

Underline.jpg
Underline.jpg (27.91 KiB) Viewed 4685 times


I hope the above is of use.
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: Tricks of the (ADRIFT) Trade #1

Postby P/o Prune » Sun May 24, 2015 7:45 am

Cool! :yeah:
Thanks Lazzah... Anyone else?
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 64Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4413
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: Tricks of the (ADRIFT) Trade #1

Postby DazaKiwi » Mon May 25, 2015 1:54 am

Thanks Lazzah for that tip, i didn't know about that. I think this is a good thread idea. I have something to add, although some of these most of you might do anyway but helpful for new Drifters.

1#
This one a light version of the debugger (i use this for specific tasks or events i want to monitor along with specific variables and check they passed) the actual Runner debugger has a lot of info, and you can choose the "Low detail option" in debugger which just shows tasks attempted to run so this is a minimalist method for ones you specifically want to monitor as well as variables within runner itself.

You set up a integer variable called Debug set to 1, Alt Desc with restriction Debug must =1 and in output window of task you want to monitor. This allows you to turn on and off your own built in debugger.
<window debug><font size=10>Task: Name (passed) insert here variables to output if any </font></window>

2#
Create a Code Snippet wordpad doc or whatever, and paste in common expressions lines or maybe font/colour changes you might make often in a project, ascii characters,
names of variables you are using to paste in embedded expressions, lowercase code all in one document you can copy and paste when needed. Also handy for checking syntax too etc.

3#
This is more of a preference and would be interesting to know what other drifters do here, Organising their themselves within a project in the Developer:
I have been recently getting into a habit of making folders for locations and moving all variables, objects, characters tasks that pertain to that location into that folder or a folder might be a scene that is crucial to a plot point. Originally i did not do this and you project as it grows can get unwieldy if you don't do something like this.

To other drifters How do you organise your project?

4#
Tools handy for IF Game projects; (Sorry if there is already an old thread on this topic. I thought in the spirit of this thread it would be handy adding.)

XMind - (https://www.xmind.net/)
There is a free version for mind mapping and brainstorming ideas.
Paint.Net - (http://www.getpaint.net/index.html)
Excellent free Paint program- its easy to use and less of a learning curve than other free paint programs like GIMP)
YWriter - (http://www.spacejock.com/yWriter5.html)
More for novel and short story writing, but can be useful for using its character database, scenes and also you can create objects and tag them to scenes as a means to tracking things. Worth a look.
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Tricks of the (ADRIFT) Trade #1

Postby Lazzah » Wed May 27, 2015 4:43 am

Hi Daza, this is interesting...

DazaKiwi wrote:2#
Create a Code Snippet wordpad doc or whatever, and paste in common expressions lines or maybe font/colour changes you might make often in a project, ascii characters,
names of variables you are using to paste in embedded expressions, lowercase code all in one document you can copy and paste when needed. Also handy for checking syntax too etc.


This was gonna be my TotT#2, I do the same thing but what I do is to create a "dummy task" in the Developer with the kind of items you mention above, like so:

Dummy Task.jpg
Dummy Task.jpg (110.81 KiB) Viewed 4592 times


I call the task "Function Messages" (for want of anything better) and have it in a folder which is permanently open in my Developer so I can open the task at any time so I can copy and paste anything from it. I have another similar dummy task with more such items called "Restriction Messages".

BTW, I make no excuses for the old-fashioned functions, e.g. %TheObjects[%objects%]%, etc. I learnt to use ADRIFT using these, and if anyone wants to use this idea but with the new functions they are more than welcome to.
DazaKiwi wrote:3#
This is more of a preference and would be interesting to know what other drifters do here, Organising their themselves within a project in the Developer:
I have been recently getting into a habit of making folders for locations and moving all variables, objects, characters tasks that pertain to that location into that folder or a folder might be a scene that is crucial to a plot point. Originally i did not do this and you project as it grows can get unwieldy if you don't do something like this.

To other drifters How do you organise your project?

The above is exactly how I organise my projects. Great minds think alike! :yeah:
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: Tricks of the (ADRIFT) Trade #1

Postby DazaKiwi » Wed May 27, 2015 6:00 am

I call the task "Function Messages" (for want of anything better) and have it in a folder which is permanently open in my Developer so I can open the task at any time so I can copy and paste anything from it. I have another similar dummy task with more such items called "Restriction Messages".

How did you create a permantant folder? did you create a master file with your said folder upon which you open this file and rename for a new project?

That idea is similar to another thing i do i forgot to mention- i just make a task a system task and use <!-- Notes: To-do list...blah blah ---> being able to name this task something that is more specific to the contents of the notes for myself is handy. And speaking of comments- i use them a lot to help remind me how i have set up something because as you know if you come back to an old project sometimes you forget why you did something in a specific way.

5#.
The search/Find Function:
Lately i've been using the Developers "find" function (hotkey: Ctrl+F) to find tasks that sometimes save themselves into a folder I didn't expect or that are closed or its a custom task i forgotten the exact name of but use a keyword to search for it, this next part is the important bit, in that find function window if you click on 'Find All' it will list all matching results. Which includes tasks, variables,properties or characters etc that might be referenced in anyway to that keyword, this find feature i guess has been there for a long time but i never really used it to begin with, now I use it a lot because it's so powerful- being able to see all entities that share the common keyword. It's also handy to see if you have a duplicate specific task or whatever.
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Tricks of the (ADRIFT) Trade #1

Postby Lazzah » Wed May 27, 2015 7:04 am

DazaKiwi wrote:How did you create a permantant folder?

I said "permanently open" - I just right click on one of the folders in the "Folders" window on the left of the Developer and select "Open in new window". Whatever folder you selected (e.g. Characters) will stay open in the main window of the Developer until you close it.
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: Tricks of the (ADRIFT) Trade #1

Postby saabie » Thu May 28, 2015 12:44 pm

DazaKiwi wrote:XMind - (https://www.xmind.net/)
There is a free version for mind mapping and brainstorming ideas.

No need for fancy software if all you want is a flowchart to track the interdependancies of objects and events in your game. Just add an extra page to the map and draw the flowchart using the map tools 8)
Flowchart.JPG
Flowchart.JPG (17.02 KiB) Viewed 4555 times
saabie
 
Posts: 977
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: Tricks of the (ADRIFT) Trade #1

Postby DazaKiwi » Thu May 28, 2015 12:52 pm

:bravo: Hey thats a cool idea saabie! Heck that could even be a good idea interactive mind map for walking someone through problem solving with more details about each step in the locations description. I never even considered this idea before. Awesome.
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Tricks of the (ADRIFT) Trade #1

Postby Dksmall » Sat Oct 31, 2015 2:51 am

With reference to using an underline to bring your preferred items to the top of a drop-down list. I find it just as easy to click on the drop-down list and then type the first character of the item I'm after. The index will now jump to items beginning with that letter. I suppose if there are a lot of items with the same letter, using the underline(s) will isolate even better.
User avatar
Dksmall
 
Posts: 32
Joined: Sun Sep 20, 2015 1:02 am
Location: Phoenix, AZ

Re: Tricks of the (ADRIFT) Trade #1

Postby ParadoxGames » Sun Nov 08, 2015 8:24 pm

I use that type of adrift tip #1 in ALL my file organizing throughout digital life!

Here's one I use that's so simple maybe others overlooked it. I make a folder for each room, in the OBJECTS window, and put all the objects in the folder by starting location.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Tricks of the (ADRIFT) Trade #1

Postby DazaKiwi » Sun Aug 04, 2019 11:14 pm

I accidentally stumbled onto finding the hotkey for being able to make comments in a transcript:

When testing someone's game or your own in Runner and have a Transcript active to record your play through and you want to add comments without using a turn or have Runner tell you it doesn't understand...

adrift Code: Select all
Toggle Comment mode, Press the following keys: Shift  "
both shift and " keys have to be pressed together. The icon on screen where you type will change when you do.
If you want to exit out of this mode without writing anything press spacebar then enter. It will go down a line and return to normal.

You will to be able to write a comment or note without Runner computing it.

This hotkey will work for US and UK keyboard layouts. Not sure about other language keyboard layouts.
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests