7
\$\begingroup\$

I'm trying to create a quest (in RPG Maker MV) where the player has to collect 35 berries. But when I go to create the conditional branch, this is what I see:

see picture of item in conditional branch

It does not let me add a number limit, so basically all the player has to do is collect 1 berry to complete the quest.

How can I change this so the player has to collect 35 berries in order to complete the quest? Is this a limitation of RPG Maker MV?

\$\endgroup\$
2
  • \$\begingroup\$ Use a script, checking "$gameParty.itemNumber($dataItems[yourItemId]) == amountDesired" and trigger your event based on that. \$\endgroup\$ – Exilyth Sep 8 '18 at 22:15
  • \$\begingroup\$ @Exilyth that looks like it would be well worth posting as an answer that we could upvote! \$\endgroup\$ – DMGregory Nov 27 '18 at 2:25
2
\$\begingroup\$

A Conditional Branch cannot refer directly to the quantity of an item, but the quantity can be copied to a variable, and the Conditional Branch can refer directly to that.

Before your Conditional Branch, insert a Control Variables (tab 1). In the Variable pane, select Single, click the button next to Single, select a variable that you're not using for anything else, and name it "Berry Count". In the Operation pane, select Set. In the Operand pane, select Game Data. Click the button next to Game Data to open the Game Data dialog. In the Game Data dialog, select Item. Click the button next to Item and select your item "Berry". The Game Data dialog should look like this:

Game Data Dialog

and the Control Variables dialog should look like this:

Control Variables Dialog

In your Conditional Branch, don't select Item (tab 4). Select Variable (tab 1), set the variable to "Berry Count", set the comparison to ≥, and set the value to constant 35. The Conditional Branch dialog should look like this:

Conditional Branch Dialog

and your event code should look like this:

Event Code

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.