Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Tony Li »

That looks correct. Or you can store them in custom fields in your actors, such as Actor["Adam"].HairColor. Then you can use [lua(code)] tags like this: [lua(Actor["Adam"].HairColor)].

Is it working the way you want?
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Mchia_Soo »

No, I didn't use it since I have created the variables for them. :D

But now I am a bit confused since I want to display the information in the Journal, do I still need to look for the Quest Nodes? Or just straightaway get the one from the Journal? If I have to retrieve the information from the Journal, what syntax should I use, as well as for displaying the information using Dialogue System?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Tony Li »

You are talking about Quest Machine's journal UI, correct?

If so, add Dialogue System Text Quest Content wherever you want. Try adding it to the main quest's Active > Journal Text section first. Make sure that you can see the variable values.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Mchia_Soo »

Yes, I have created that.

Then what should I do to make it display on the panel?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Tony Li »

If the quest is active, then any content in the quest's Active > Journal Text section should appear in the journal UI.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Mchia_Soo »

Alright, I did that too.

I have another idea, instead of displaying in a new panel, what if displaying it as responses using Dialogue System (one node one response)

Not all information of the nodes will be displayed (only the node with Active state).
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Mchia_Soo »

Below is the elaboration.

As I mentioned before, in the Quest Editor, one characteristic is put in one node. The node will be active only when that particular line is talked and the characteristic will be displayed in the Journal, as shown in the image below.
QuestNodeState.JPG
QuestNodeState.JPG (56.06 KiB) Viewed 1122 times

In the Dialogue System, I have one variable named "Meeting", where it will become false after the player meets the NPC.

In the game:
  • I will be putting the conflict information (e.g. long hair, short hair) in the conversations so that the player can determine and choose the conflicted one through Dialogue System.
  • There will be 3 choices for the player to choose, such as True, False and Conflict.
  • Thus, once the player chooses Conflict, another group of choices (the conflicted one) will be listed out for the player to select.
  • The conflicted one will be the information that the player has chosen True in the previous conversation.
I hope this information is sufficient for you. Please do let me know if you need extra information. Thanks a lot.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Tony Li »

I'm sorry; I'm having trouble understanding how it should look. Can you please post a mock-up of how you want it to look to the player? You can draw it by hand or copy-paste UI elements in a paint program, whatever is most convenient.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Mchia_Soo »

WhatsApp Image 2019-12-09 at 20.47.04.jpeg
WhatsApp Image 2019-12-09 at 20.47.04.jpeg (33.31 KiB) Viewed 1107 times
  • The player has to meet the Quest Giver to accept the mission.
  • He then goes to the NPCs, Mary, John & Mike to ask for the requirements (REQ).
  • In each conversation, the player has to choose either accept (True), reject (False) or conflict (If there is any) for the REQs.
  • The REQs will be stored in the Journal if it is chosen True.
  • Once the REQ is chosen conflict, the following question is 'Choose the conflicted requirement' and the options will be the REQs that has been stored in the Journal.
  • Score will be then given and the total score will be displayed in the conversation of the Quest Giver after the mission is completed.
So, here's the basic idea of the game I am developing.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Retrieve Variable & Adding Checkbox and Radio Buttons to A Panel

Post by Tony Li »

Hi,

Let's say your quest looks like this:

conflict1.png
conflict1.png (43.2 KiB) Viewed 1104 times

In your Dialogue System conversation, use group nodes and conditions like this:

conflict2.png
conflict2.png (39.92 KiB) Viewed 1104 times

In the conversation above, the first node is a group node titled "Check Conflicts".

It links to group nodes for Mary, John, and Mike.

Mike's node checks if the "mikeConflict" node was set true. If so, it asks the player to choose REQ1 or REQ2. When the player chooses, you can change the node states, such as:

Code: Select all

SetQuestNodeState("example", "mikeConflict", "unassigned");
SetQuestNodeState("example", "mikeTrue", "success");
The REQ1 and REQ2 choices then loop back to the original "Check Conflicts" node so it can check if John or Mary have conflicts. If not, it chooses the lower-priority link to "No conflicts".
Post Reply