Forum rules - please read before posting.

Dynamic menu for questions

I am new to AC and really find it a great plugin.

As part of a new serious game, I needed to use the menu system to allow the game to ask the player to choose between various options after interacting with objects. Also wanted this to be dynamic. Here's my approach, question and some suggestions for AC:

- Have all the questions stored in a popUp variable (as an array and easier for translation)
- Have hotspots on game objects which call an ActionList which just specifies the ID within
the questions popup of the first question and calls a Setupmenu ActionList
- This ActionList transfers the 4 questions following the given ID into 4 variables which are used with tokens to set the menu texts (also transfer into 4 other variables the next action to execute after the user selects one of the menu entries, also stored in a global popup)
- If one of the text variables is empty (empty slot in the popup), disable the corresponding menu element
- According to player's choice, branch onto the corresponding Action List in the other variable

My question is the following:

I'm having trouble disabling the menu elements using Menu-Change state-Hide Menu Element, as I can't find the correct value to specify under "Element to hide". I can hide the entire menu by specifying Menu as "Conversation" and Element to hide as the name I gave to the DialogList below this menu (called it "QuestDialog"). So, how do I specify say the third element in this dialog list? Tried QuestDialog:3 or QuestDialog(3), but that doesn't work.

Having worked on this, I also have a few suggestions to improve AC (perhaps these have already been stated, not sure):

- Allow to specify any parameters of an Interaction called from a hotspot within the hotspot's "Use/Examine/Inventory" dialogue boxes (avoids have to call an interaction to just then use the ActionList:Run feature with the parameters)

- Allow use of tags [var:varname] instead of [var:n] for greater readability

- Action List Editor: Allow for "Paste After action" within the editor window (as it is possible in list of interactions)

Comments

  • edited October 2017
    Welcome to the community, @wmsgva.

    Individual slots in a DialogList cannot be hidden through the Menu, as their display is directly tied to the Conversation that they're linked to.  To control the visibility state of individual Conversation options, use the "Dialogue: Toggle option" Action.

    Are you not using a Conversation in the assumed way?  Your description doesn't state what element type you're using tokens in.  If you want to do it all through tokens / variables etc, try Button elements instead of DialogLists.

    I'm unclear as to why you're doing it this way, however - is the provided Conversation system not right for your needs?

    Thank you for the suggestions.  The Interaction parameter settings is an unfortunate necessity, and the [var:varname] token is desirable but brings with it performance issues.

    As for the "Paste after Action", could you elaborate?  Pasted Actions are not connected to existing ones automatically, so their actual order is irrelevant - only the sequence in which they occur due to node connections.
  • Thanks Chris.

    To answer your questions:

    - I created a Conversation element (based on the Conversation menu) and under the "Dialogue options" tab, I used the tokens for each of the slots of the DialogList in this menu
    - I will check buttons instead of dialogue list and the Dialogue : Toggle action to see if this solves the issue
    - Doing things this way in order to have one Popup in which all questions are listed, another with all follow-up actions lists and the ability within the game to only have to create hotspots on graphic objects and a corresponding call to a single action list

    Quick question about conversations: If you want to create your own conversation menu (say a modified version of the existing Conversations menu), when you then create a Conversation from the AC Scene tab, is there any way to specify that you want the conversation script to use this new menu or are you just obliged to modify the existing Conversation menu?

    - For the "paste after" suggestion: The issue is when you're in the editor window, once you've added many actions which are linked and have an id, if you need to insert a new one somewhere within the sequence, there's no "insert after" on the action cog wheels which would automatically add a new action and link it to the previous. If you click on insert it just creates a new action with an id corresponding to the next available at the end of your sequence. I was therefore doing the following: move out of the editor and click on the cog of the action after which you want to insert a new action and click "Insert after" (or cut it off the end if created in the editor and use "Paste after"). Basically, you need to add an "insert after" on the cog wheels within the editor.
  • Tried using the "Dialogue: Toggle option" to turn off an individual dialogue line and it works.

    Problem solved, thanks.

    Perhaps this point needs to be made clearer in the user-manual, as the "change state" action option is not described in detail under the "Menu" chapter (just states it  provides various options, without describing their effect)?
  • is there any way to specify that you want the conversation script to use
    this new menu or are you just obliged to modify the existing
    Conversation menu?

    Any Menu with the Appear type of During Conversation will be turned on when a Conversation is made active.  However, you can lock Menus using the Menu: Change state Action to prevent them appearing when they normalled would.

    Suggestion noted re: the Manual.
  • Regarding the ActionList Editor suggestions, this should be do-able.  I'll look into adding an insert option.
  • Great thanks.

    Wonder if it wouldn't be easier to add an option to the Conversation component to allow to specify which menu to use (instead of having to change the state of different menus if you want to use many conversation formats)?
  • edited October 2017
    It's possible to control which menu is active through script:

    AC.PlayerMenus.GetMenuWithName ("Conversation").isLocked = true;

    It's the same principle as using the Menu: Change state Action, but you can use this to create a function that unlocks a given menu and locks all others, and then call it as required.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.