Page 1 of 2
Journal & Alert UI Questions
Posted: Sun Oct 03, 2021 2:10 pm
by tootyboi95
Hi Tony,
I have been playing around more with changing the font of the Quest Journal UI in your QuestMaker asset pack. I intend to use TextMeshPro, and have followed your instructions to turn on TMP support via the welcome window. I proceeded to remove the original text component on the 'Quest Name Text' gameobject, and replaced that with a TMP component instead. Unfortunately, the TMP text does not get updated like how the original text does, when a new quest has been assigned. Am I doing something wrong here? (See attached)
Thanks!
Re: TextMeshPro not working
Posted: Sun Oct 03, 2021 3:24 pm
by Tony Li
Hi,
Make sure you've assigned your new TMP component to the corresponding template script that used to reference the old Text component:
- qmTMPro.png (78.83 KiB) Viewed 977 times
Re: TextMeshPro not working
Posted: Sun Oct 03, 2021 8:48 pm
by tootyboi95
Hi Tony,
That's weird, I don't seem to have that TMP gameobject despite activating it on my welcome window. Must I have TMP enabled on the welcome window before I modify the Journal UI prefab?
Thanks!
Re: TextMeshPro not working
Posted: Sun Oct 03, 2021 9:03 pm
by Tony Li
Hi,
Yes. You won't see the Caption Text > None (Text Mesh Pro UGUI) field until you do two things:
1. Enable TextMesh Pro Support via the Welcome Window.
2. And also unassign the UI Text element from the Caption Text if it's assigned.
Re: TextMeshPro not working
Posted: Mon Oct 04, 2021 9:17 am
by tootyboi95
Hi Tony,
This works great, thank you very much!
Re: TextMeshPro not working
Posted: Mon Oct 04, 2021 10:34 am
by Tony Li
Happy to help!
Re: TextMeshPro not working
Posted: Mon Oct 04, 2021 12:06 pm
by tootyboi95
Hi Tony,
Since we are at this topic of Journal UI, I have a few more questions:
1) Are we able to move completed quest from one group to another? More specifically, are we able to change the Quest info's title field from 'Main Quests' to 'Completed' upon the completion of the quest?
2) Are we able to set specific groups to be expanded by default, while other groups to be collapsed by default? More specifically, I would want the 'Main Quests' group to be expanded by default, while 'Completed' group to be collapsed (expanded only upon button press).
Thanks as always!
Re: TextMeshPro not working
Posted: Mon Oct 04, 2021 1:13 pm
by Tony Li
Hi,
tootyboi95 wrote: ↑Mon Oct 04, 2021 12:06 pm1) Are we able to move completed quest from one group to another? More specifically, are we able to change the Quest info's title field from 'Main Quests' to 'Completed' upon the completion of the quest?
No. For hand-written quests (that is, quests made in the Quest Editor window), groups and titles are static to minimize the amount of data that needs to be saved in saved games. However, you can make a subclass of UnityUIQuestJournalUI that checks the quest's state and puts it in a different visual group in the UI.
tootyboi95 wrote: ↑Mon Oct 04, 2021 12:06 pm2) Are we able to set specific groups to be expanded by default, while other groups to be collapsed by default? More specifically, I would want the 'Main Quests' group to be expanded by default, while 'Completed' group to be collapsed (expanded only upon button press).
No, but if you make the subclass you can specify it in your subclass. For example, you can override Start() or Repaint() and set the expandedGroupNames list. Example:
Code: Select all
public class MyJournalUI : UnityUIQuestJournalUI
{
protected virtual void Start()
{
base.Start();
expandedGroupNames.Clear();
expandedGroupNames.Add("Main Quests");
}
}
Re: Journal & Alert UI Questions
Posted: Wed Oct 06, 2021 2:10 pm
by tootyboi95
Hi Tony,
I've followed your advice and the quests are now automatically labelled as 'Completed' upon completion. Thanks!
I have a question on Alert UIs. I have carefully followed all of your steps in
this tutorial , and everything is working as expected. However, when I tried to add alert UI text bodies in the True conditions for all the nodes (Start, Enter Circle, Return), the alert UI text body shows up only after completing the 'Enter Circle' state, but not for the other states.
I have tried placing the alert UI text on either the True block or the Active block, but both showed similar results anyway. My ideal state would be to have alert UIs show up whenever there is a quest state transition. Am I missing something here?
p.s. Could it be that alert UIs are only triggered whenever there is a state transition due to Message Conditions being met? (Only the Enter Circle state has Message condition)
Thanks again!
Re: Journal & Alert UI Questions
Posted: Wed Oct 06, 2021 2:16 pm
by Tony Li
Actions (such as the Alert action) only run when the quest or quest node enters the action's state. It doesn't matter what type of conditions (e.g., Message Condition) causes the transition to the state.
For example, if you have a "Return To NPC" node and add an alert action to its Active state, then the alert will appear when the "Return To NPC" node's state changes to Active.