Page 1 of 1

Problem with HUD when using QuestGeneration

Posted: Thu Mar 25, 2021 5:49 am
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 493 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 493 times

Looking forward to your response.

Artem

Re: Problem with HUD when using QuestGeneration

Posted: Thu Mar 25, 2021 8:51 am
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.

Re: Problem with HUD when using QuestGeneration

Posted: Thu Mar 25, 2021 9:33 am
by AArtlone
Sounds good. Thanks for the reply!

Re: Problem with HUD when using QuestGeneration

Posted: Thu Mar 25, 2021 10:00 am
by Tony Li
Happy to help!