ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Contextual Menu the lowdown..

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.

Contextual Menu the lowdown..

Postby DazaKiwi » Fri May 29, 2015 12:39 am

I have been meaning to do a post about this so here it is. I can't find any info on the Contextual Menu in the manual or the wiki.

From experimenting with contextual menus, here is what my findings are with objects at least;

Trying to get an task player option to show in the list:

There are two contextual menu drop downs:
(left-click for custom commands
and right-click for all other possible commands that do not have restrictions or has restrictions that would pass).

Your custom task doesn't show when;
If you have a general task that has %object% in the general command construction area and its restrictions uses 'Referenced Object must be..' etc What happens is when you left-click on the underlined word in runner, it just prints/puts the name in the players input/command entry area each time per click. (If you right click at the very end of the underlined keyword in this case 'button' you get a list of all other kinds of commands the player can try- eg. whistle, jump, sing, think etc. But nothing for your custom task. This was what i was seeing at first when trying to figure out contextual menus a while back and thought that it was odd that the menu displays ONLY when you click at the end of the word. I thought contextual menu was broken.)

It does show when;
You remove the 'Object must be referenced object' restriction, but keep %object% in the command construction area eg. ([press/touch/activate] {the} [blue] [button] %object%). You can then left click the underlined word and see the drop down menu.

I made a little demo for testing this out;
I have a three objects called A red button, blue button, green button (Static). The task for press the red button has %object% in the command construction area (no restriction references to it), the others don't have the %object% in the command area. With this setup oddly enough when i Left click on the button underline link in runner it only lists two of the command options for the player out of the three tasks i created.

One of task with %object% in the command area (no object reference in restrictions)
Image

Two tasks with %object% in the command area (no object reference in restrictions)
Image

Adding %object% on all three tasks (no object in restrictions) it lists six combinations
Image

If one of these has %object% omitted from the command construction area in the task, in the rightclick menu (click at end of the word) listing all other possible commands at the very bottom it has the command for that singular task eg. Press the Green button (only listed once) how would a player (a new player at that) would know they have to right-click at the end of the word and see the contextual options? (As for the extra tasks showing sleep, sing etc. I know you can set autocomplete to zero for tasks that you want to hide or create a restriction for them and if they are not met will be omitted from that right-click drop contextual list, so i guess that answers how to remove redundant tasks.)

Perhaps using three similar kinds of tasks and objects makes things a little more complicated, but then again this would be a good time to ask how to do this better with similar named objects that share a keyword.

The keyword is 'button' and the list shown in its structure (command + object name ) right, so why is it mix and matching them "press red button the green button etc"? I can only guess it does this because the keyword 'button' is shared between them all, so how would you avoid this? you would want just three options in total. I tried to add <1> to each object with button eg. button<1> but this just removed it completely from being clickable.

So to sum up my questions:

Why can't i use reference objects restrictions with the left click keyword? (rightclick contextual list doesn't list it either)

If you have multiple objects with the same keyword in its object name how do you avoid the unwanted combinations the contextual menu adds?

Contextual Menu is a powerful feature for Adrift but is very confusing to implement. As a suggestion, why not make the right-click possible anywhere on the underlined keyword instead of the very end of it or perhaps make it left-click only and the primary custom tasks all display at the top and then any other tasks that might relate indirectly is listed below it. It would be less confusion for the player if they forget which mouse button to press or they need to rightclick at the end of the word to see other options.

**Update**
Still experimenting with this. I discovered that if i change one of the objects to dynamic get object becomes available when you left click on the object keyword/name, which has restrictions for referenced objects. Once you pick it up Drop object becomes available left-click object keyword/object name. I cannot work out why this works and not my press the buttons ones. I even did a specific task for examine objects and this won't show either. This is rather frustrating.
User avatar
DazaKiwi
 
Posts: 468
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron