Procedural Quests Caring about Invector Items

Announcements, support questions, and discussion for Quest Machine.
Post Reply
DeidreReay
Posts: 93
Joined: Wed Jan 22, 2020 1:20 pm

Procedural Quests Caring about Invector Items

Post by DeidreReay »

Have been slowly integrating more and more into our game using this great procedural quest setup. Am wondering if you can help us with some functionality (or if i missing how to explain the setup)
We are hoping to have procedural quest givers care about and give quests regarding bringing to them Invector Item Ids.
Example
NPC Healer cares about healing potions (In our setup they can have their own invector inventories if this would help at all but..) When needing healing potions (compared to their own inventories) or even all the time they really want healing potions offer these type of quests.
Hope is to then be able to have unlimited quests revolving around collecting Item IDS and not just killing things in the world. I could not really find any information on this or tutorials on this part of the system. Thank you as always and hopefully you can help us figure this out.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Procedural Quests Caring about Invector Items

Post by Tony Li »

Hi,

Define an EntityType for healing potions. Assign an urgency function so the NPC Healer will think that it's urgent. Assign a "fetch" action that removes the healing potion from its current domain (e.g., somewhere in the world).

Then add a GameObject with a Quest Entity component (set to the healing potion EntityType) to the scene, inside the trigger area of a Quest Domain. Make sure the NPC Healer's Quest Generator Entity watches this Quest Domain.

When the NPC Healer generates a quest, it will see that one or more healing potions are in a Quest Domain. These healing potions will have high urgency for the healer, so it will generate a quest to resolve the urgency. It will do this by choosing the "fetch" action.
CecilBaker
Posts: 1
Joined: Sat Apr 15, 2023 4:22 am

Re: Procedural Quests Caring about Invector Items

Post by CecilBaker »

DeidreReay wrote: Thu Feb 23, 2023 12:56 am Have been slowly integrating more and more into our game using this great procedural quest setup. Am wondering if you can help us with some functionality (or if i missing how to explain the setup)
We are hoping to have procedural quest givers care about and give quests regarding bringing to them Invector Item Ids.
Example
NPC Healer cares about healing potions (In our setup they can have their own invector inventories if this would help at all but..) When needing healing potions (compared to their own inventories) or even all the time they really want healing potions offer these type of quests.
Hope is to then be able to have unlimited quests revolving around collecting Item IDS and not just killing things in the world. I could not really find any information on this or tutorials on this part of the system. Thank you as always and hopefully you can help us figure this out.
One way to approach this might be to have a system in place where each NPC quest giver has a list of specific Invector Item IDs that they are interested in. When the player speaks to the quest giver, the game could check the player's inventory to see if they have any of those items. If the player does have the item(s), the NPC could offer a quest that requires the player to gather a certain number of that item.

To implement this, you could create a script for each NPC quest giver that stores the list of Invector Item IDs they're interested in. Then, when the player interacts with the NPC, the script could check the player's inventory for those items using the Invector Item ID system. If the player has the item(s), the NPC could offer a quest that requires the player to collect more of the same item(s).
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Procedural Quests Caring about Invector Items

Post by Tony Li »

That's a good idea. You could assign custom method to the NPC's QuestGeneratorEntity.updateWorldModel delegate. In this method, do what CecilBaker suggests, and add a Fact for an Entity Type representing the desired item. Then the NPC will generate a quest to fetch the desired item.
Post Reply