Page 1 of 1

Issues with Action Requirements

Posted: Wed Mar 10, 2021 5:21 am
by AArtlone
Hi!

I am facing a bug/problem with the Requirements that you can set per Action that is used for Quest Generation.

I have double-checked this bug in a completely empty project, imported QM, and tested it in the Demo scene. I am using Unity 2020.2.1f1

You can reproduce this bug by doing the following:
  • Find the Kill Action in the Project Assets
  • In the Requirements change the min number from 1 to 5
  • Start the game and talk to the Knight QuestGiver
  • The Knight will generate the quest to kill 3 Orcs
  • The quest cannot be completed, something is broken
In my understanding, this quest should not have been generated in the first place, because the number of Orcs that exist in the domain at that moment is 3, and the minimum requirement is 5.

Please let me know if you are able to reproduce the bug.

Thanks in advance for the help!

Re: Issues with Action Requirements

Posted: Wed Mar 10, 2021 8:52 am
by Tony Li
Hi,

This is a bug. Since the minimum is 5 and the NPC only knows about 3, it should not generate a quest. I'm working on a fix now.

Re: Issues with Action Requirements

Posted: Wed Mar 10, 2021 9:47 am
by Tony Li
I posted a patch in the your thread.

If the Kill action requires a minimum of 5 and there are only 3 targets, it won't generate a quest.

You may notice that the pacifist Pirate still generates a quest to polymorph 3 orcs since the polymorph action still has a minimum of 1. But the knight doesn't generate a polymorph quest. This is a design decision that I'm still debating. Currently when a quest giver decides on a top level goal (e.g., kill or polymorph) it sticks with that goal and attempts to make a plan or fail. The intermediate steps may vary, but the top level goal will stay the same. In the case of polymorph vs. kill, it might seem to make more sense to let the knight fall back to a polymorph quest even though it doesn't fit his personality (drives) as well. But there are many scenarios where you wouldn't want a quest giver to fall back to goals that don't fit its personality, since it could seem very out of character. For now, I'm erring on the safe side and having quest givers stick with their choice of top level goal. If you really wanted to give the knight the ability to choose polymorph vs. kill, you could create a more desirable action called something like Remove. Then the knight's planner would be able to choose a course of action to accomplish Remove that could incorporate the Polymorph or Kill action.

Re: Issues with Action Requirements

Posted: Wed Mar 10, 2021 10:06 am
by AArtlone
Sounds good. Thanks for the explanation and for the help!

I will let you know if I find any other bugs or pitfalls as I continue working with the Quest Generation