Problem with HUD when using QuestGeneration

Announcements, support questions, and discussion for Quest Machine.
Post Reply
AArtlone
Posts: 37
Joined: Tue Mar 09, 2021 2:54 am

Problem with HUD when using QuestGeneration

Post by AArtlone »

Hi again!

This time I have a question about the HUD when using QuestGeneration.

Let's take a look at the example of the QM Demo.

By default, if you talk to the Knight he generates a quest to kill 3 orcs.

As we can see in the image below, the HUD will show two objects. A heading and a text. The text comes from the TaskText.HUDText of the Kill Action. Where does the title come from? I was not able to find it. Does it happen by default?
one.png
one.png (52.44 KiB) Viewed 494 times

Now another problem that I have noticed, is that if you empty the HUDText on the kill action, then when accepting the quest, the HUD will show the title and an empty game object. You can see it in the image below.
two.png
two.png (58.86 KiB) Viewed 494 times

Looking forward to your response.

Artem
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with HUD when using QuestGeneration

Post by Tony Li »

Hi,

A procedurally-generated quest's title is always the goal action's display name (e.g. "Kill") plus the main target's descriptor (e.g., "3 Orcs"). If you want to change that behavior, you can make a subclass of PlanToQuestBuilder, and assign an instance of your subclass to the QuestGeneratorEntity's generator.planToQuestBuilder property.

In the next update, I'll make sure the generator checks if you've left HUD Text blank. If so, the HUD won't add a blank line.
AArtlone
Posts: 37
Joined: Tue Mar 09, 2021 2:54 am

Re: Problem with HUD when using QuestGeneration

Post by AArtlone »

Sounds good. Thanks for the reply!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with HUD when using QuestGeneration

Post by Tony Li »

Happy to help!
Post Reply