Page 1 of 1
Quest Content and Failure-Node for procedural generated Quests
Posted: Wed Dec 12, 2018 7:00 am
by fbit
Hello everyone!
I wonder if you can also add different quest content than text to procedural generated quests, e.g. IconQuestContent or an AudioClipQuestContent.
I noticed that you can add an IconQuestContent to the offer text when using the rewards UI content, but I think it would be nice if you could use these options for actions (in the section "Task Text") as well.
Also, is it possible that procedural generated quests can not fail? Maybe I am missing something here.
Thanks in advance,
Franca
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Wed Dec 12, 2018 9:05 am
by Tony Li
Hello Franca,
fbit wrote: ↑Wed Dec 12, 2018 7:00 amI wonder if you can also add different quest content than text to procedural generated quests, e.g. IconQuestContent or an AudioClipQuestContent.
I noticed that you can add an IconQuestContent to the offer text when using the rewards UI content, but I think it would be nice if you could use these options for actions (in the section "Task Text") as well.
By default, generated quests will use the target entity's image as the quest image. If you talk to a quest giver that has more than one quest, it will show a list of quests with each quest's image.
Reward systems can add whatever type of content you want. For example, when the Inventory Engine integration's reward system adds an item to the list of quest rewards, it adds an IconQuestContent depicting the item.
Apart from that, nothing is built into the generator for icon or audio content. However, Quest Machine is written so you can add subclasses to extend functionality. For example, you could write a subclass of Action that supports different types of quest content.
I could also build in support for more quest content types in a future update. What would be a good way to specify this?
Also, each action can send a message when its quest node becomes active and/or complete. You can set up message listeners to start spawners, play audio, etc.
Another option to show images is to use TextMesh Pro and include
<sprite> tags in your text. TextMesh Pro will show these as inline images.
fbit wrote: ↑Wed Dec 12, 2018 7:00 amAlso, is it possible that procedural generated quests can not fail? Maybe I am missing something here.
That's correct. You can either complete a generated quest or abandon it. There are no failure conditions. However, you could make a subclass of Action that supports a failure condition.
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Mon Dec 17, 2018 8:28 am
by fbit
Hi Tony,
Thanks a lot for your detailed answer!
Apart from that, nothing is built into the generator for icon or audio content.
Yes, I have noticed that the plugin is very flexible and customizable, which is great
I could also build in support for more quest content types in a future update. What would be a good way to specify this?
Hm, I felt like procedural generated quests are limited in their function compared to hand-written quests. Maybe it would be a good approach to approximate the features implemented for hand-written quests for procedural generated quests? I am talking about all types of quest content and maybe something like QuestActions (e.g. Animator Quest Action, not Actions as tasks) - if that is possible, of course.
For example, you could write a subclass of Action that supports different types of quest content.
[...] However, you could make a subclass of Action that supports a failure condition.
True, I totally forgot that actions are scriptable objects as well, my bad! Thanks for the tip!
Another option to show images is to use TextMesh Pro and include <sprite> tags in your text. TextMesh Pro will show these as inline images.
This is also a very useful hint, thank you!
Great support and enjoyable plugin!
Franca
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Mon Dec 17, 2018 8:50 am
by Tony Li
fbit wrote: ↑Mon Dec 17, 2018 8:28 amHm, I felt like procedural generated quests are limited in their function compared to hand-written quests. Maybe it would be a good approach to approximate the features implemented for hand-written quests for procedural generated quests? I am talking about all types of quest content and maybe something like QuestActions (e.g. Animator Quest Action, not Actions as tasks) - if that is possible, of course.
Yes, this is something I'd like to add. I've been experimenting with ways to do this without adding more complexity. I have some ideas, but I'm going to let the just-released version 1.1.2 settle in for a while. Version 1.1.2 is primarily a maintenance release for bug fixes and small improvements.
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Mon Jan 07, 2019 5:37 am
by fbit
Hi Tony,
Tony Li wrote: ↑Mon Dec 17, 2018 8:50 am
I've been experimenting with ways to do this without adding more complexity. I have some ideas, but I'm going to let the just-released version 1.1.2 settle in for a while.
I can imagine that this takes some time. But it is good to know that this may be implemented in a future release, thanks!
I have another question that might be easy to answer: Is it possible to get quest information out of QuestContent?
For example, I tried to access the quest title without setting the tick "Use Quest Title" in HeadingQuestContent. I noticed that QuestContent derives from the class QuestSubasset, but the access to its quest is protected, so I can't get the title in my quest alert class.. Probably there is a simple way around this, it feels like I am overlooking something.
Kind regards,
Franca
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Mon Jan 07, 2019 9:39 am
by Tony Li
I'll make it public in the next update. However, typically you'll write a new quest content type and let that content type return the quest's title (or whatever text you want) by overriding the
runtimeText property. For example:
Code: Select all
public class UppercaseTitleQuestContent : QuestContent
{
public override string runtimeText { get { return quest.title.value.ToUpper(); } }
}
Re: Quest Content and Failure-Node for procedural generated Quests
Posted: Mon Jan 07, 2019 12:18 pm
by fbit
Tony Li wrote: ↑Mon Jan 07, 2019 9:39 am
However, typically you'll write a new quest content type and let that content type return the quest's title (or whatever text you want) by overriding the runtimeText property.
Ahh, I see, thanks a lot! That will do nicely.
Tony Li wrote: ↑Mon Jan 07, 2019 9:39 am
I'll make it public in the next update.
However, thank you for this as well!