Page 1 of 1

Item requirements for quests

Posted: Fri Dec 16, 2022 10:12 am
by Crowsinger
Hello. I've been reading the documentation trying to learn the basics, but I can't figure out how to set up an item requirement for a quest. I've created an item, but I can't figure out how to enter that as a requirement in the quest inspector. I'm trying to use an entry for it, but I'm not sure how to do this. Is there an example of an item quest that I can look at? Thanks

Re: Item requirements for quests

Posted: Fri Dec 16, 2022 5:02 pm
by Crowsinger
I've sort of got this working, but I'm not sure about the item. In the video, he adds Usable and Dialogue System Trigger components to the crate. But if we're talking about an item like goatskin or meat that isn't actually in the scene, but is part of RPG Builder, how does that get connected to the quest?

Re: Item requirements for quests

Posted: Fri Dec 16, 2022 9:51 pm
by Tony Li
Hi,

To check in a conversation if the player has an item named "goatskin" in the RPG Builder player's inventory, set the Conditions field to:

Code: Select all

rpgGetItemAmount("goatskin") >= 1
You can click the Conditions field's "..." button, click "+" to add a row of dropdowns, then select Custom > RPG Builder > Inventory > rpgGetItemAmount so you don't have to type as much.

This is an RPG Builder Lua Function, so make sure your Dialogue Manager GameObject (in the Main Menu scene) has a Dialogue System RPG Builder Bridge component. This component makes the RPG Builder Lua Functions available.