ADRIFT Game Development Tips

From ADRIFT 5 Manual Wiki
Revision as of 10:09, 26 August 2013 by Saabie (Talk | contribs) (Folder behavior has changed in recent versions)

Jump to: navigation, search

The Advanced and Location properties tabs are missing

Your developer is in simple mode.

The Home toolbar ribbon will also be missing the Variable, Group, Property, Text override, Hint, Synonym and User Function buttons.

To switch to Advanced mode press the RibbonButtonOptions.jpg button and click on TickBoxSimpleMode.jpg to remove the tick.

What's the difference between General, Specific and System tasks?

  • A general task defines a command (verb) and its synonyms. It is used to give the default response and actions to using the command in the game, as well as define restrictions on when the command is not valid, and the responses to give in those circumstances.
  • A specific task is used to change the default response for a command, either for a specific object/character etc. or when specific restrictions are true.
  • System tasks are completely separate from the command parser.
    There are four main uses of system tasks:
    • They can be set to run when a player enters a particular location.
    • An action in another task can execute them like a subroutine.
    • An event can call a system task to perform some actions at a particular time.
    • They can run immediately when the game starts, to setup initial conditions or prompt the player for their name and gender.

How do I make a "Connector"?

Several other Interactive Fiction systems use a "Connector" object to represent the link between two locations and control access between them.

  • In ADRIFT you can create a "Location Group" and select the locations to be connected.
  • If you then create an object such as a door and locate it in this location group, then it will appear in both locations in the game.
  • Movement between the two locations can then be controlled by using the open/closed/locked properties of the door in a movement restriction.
  • Other functions of "Connectors" can be implemented by creating specific tasks for other commands and using restrictions on other properties of the object (transparency, porosity etc.) to control whether you can see, hear or smell through it.

How do I change the auto-completion of words on Runner command line?

If you type 'i' on the runner command line it suggests 'inventory', and pressing the space bar will confirm it.

But if you type 'in', it instead suggests 'inside'. Likewise, typing 's' gives you 'south', but why not 'sit', 'stand' or 'say'?

The word that is chosen is governed by the auto-fill priority setting on the Advanced page of general tasks.

The general tasks for 'sit' and 'stand' in the standard library have auto-fill priorities of 4, 'say' has 2, and Player movement (which matches the word 'south' from the %direction% reference) has a priority of 1.

When the player types 's' into runner, it recognises that they could be trying to type any of these four words, and chooses the one with the highest priority as the one the player is most likely to want to enter.

If the player continues to type letters then this will eliminate any words that dont start with those letters, so runner will display the word with the highest priority from those that do still match.

When you create a new general task it will have an auto-fill priority of 10, which is lower than any of the standard library tasks, so the runner will always choose one of the standard commands over your new one.

If your new command is actually used more often than the command that the auto-fill chooses to display, you can force it to display the new command by changing its auto-fill to a higher priority (smaller number) than the command in the standard library that is currently being chosen.

If you add lots of new commands to your game then all of them will default to auto-fill priority 10, so before you release your game you should play it through to check that the auto-fill is choosing the best option most of the time, and adjust the auto-fill priority so that the most often used commands can be entered with the least amount of typing, while seldom used commands have to be typed in full.

My game has a secret password as a command, but the auto-fill gives it away by displaying it

Just set the auto-fill priority (on the 'Advanced' page of the passwords general task) to zero. This disables auto-fill and prevents that command from ever being displayed.

I created a new item, but I can't find it in any of the folders

You created a object, character, task etc. using the buttons on the main ribbon, or create an object from a location, but its not in the folder where you expected it to be.

You run the game and find that it has definately been created, so where is it?

When you create a new item in ADRIFT, usually it is placed into its default folder (An Object in the "Objects" folder etc.).

The easiest way to find a lost item is to use the Find function on the home toolbar - type the name of the item you want to find and click on Find All. The results will tell you what folder an item is in.

If it was accidently saved into a folder that contains sub-folders (such as "Standard library" or "Desktop") then you need to right-click on it in the folders list and select "Open in new window" to check if the missing item is there.

If the folder you want it in is also open then you can just drag it across with the mouse.

To create a new item in a specific folder, right-click on the "Name" colomb heading of the folder you want to put it in and select "Add New" from the context menu.

The 10 default folders also have an option to create their default item as the first menu item.

You can also right-click on the wanted folder in the folders list and select "New"

The Standard Library folder is missing

You probably have the "Hide library items" option turned on. To see the Standard Library select "Settings.." from the main menu, then select the "Library" tab. At the bottom left of the window make sure that "Hide library items" is NOT ticked.

A task that increments the %Score% variable only works the first time

This is by design.

Most I.F. games have a fixed maximum score which can only be obtained by performing all of the quests and tasks that the game has asked the player to do.

To prevent the player from simply repeating the same action until they reach the maximum score, the %Score% variable has a special feature that only lets each task write to it once. This is similar to right-clicking a text box and selecting the "Only Display Once" option, or NOT making a task repeatable.

If you do want the opposite behavior, where a task can update the score repeatably, then just create your own integer variable and use that for the score instead of %Score%.

In what order does variable substitution, expression evaluation and text overrides take place?

General Functions (recursively, including variable substitution), Item functions (recursively), Expressions (also includes function evaluation), and finally text override (recursively).

If I alter something in the standard library, does that affect all of my games?

No. When you create a new ADRIFT game, the contents of StandardLibrary.amf are copied into your new .TAF file. Any alterations you make will only affect this local copy.

What happens if I alter something in the standard library, then update with a new version?

If that item in the standard library is identical to the previous version of the standard library then nothing will happen, but if it has been updated then the new version will overwrite your edited version.

As you have no way of knowing when a particular item might be updated in a new version of the standard library, I would recommend that you dont alter anything in the standard library folder but instead make a copy of the particular task you want to change, edit that copy, and ensure it has a higher priority than the one in the standard library, so that your version is executed instead of the original or any updates to it.


<<< FAQ - Frequently Asked QuestionsMain PageConnecting locations using the Map >>>