RMMV How do I make a item quest with three or more items?

mumin

Villager
Member
Joined
Apr 3, 2021
Messages
10
Reaction score
0
First Language
english
Primarily Uses
RMMV
I am in the process of making a quest where I have to gather three items for a NPC to make an item. The NPC, Bumor, is requesting one Redberry, one Greenflower, and a Blueweed. I am wondering how to go about this, because I know it's possible.

I have tried just plain switches, but it's a little weird with just the switches and not something to support them, because the NPC says some stuff out of line whenever I have or don't have an item, despite the fact that I have the item.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
585
Reaction score
253
First Language
PT-BR
Primarily Uses
RM2k3
Use the "conditional branch" command:
Code:
◆If:Party has Potion
  ◆If:Party has Magic Water
    ◆If:Party has Dispel Herb
      ◆Control Self Switch:A = ON
      ◆
    :End
    ◆
  :End
  ◆
:End

On the page activated by "Self Switch A" leave it in "automatic" mode and place the dialog confirming that the player has the 3 items.
 

Lady_JJ

Veteran
Veteran
Joined
May 6, 2019
Messages
232
Reaction score
133
First Language
English
Primarily Uses
RMMZ
There are many ways to do this. This is just one of those ways. Set up 3 variables, one to give you the number of Redberries you have, one to give you the number of Greenflowers, and one to give you the number of Blueweeds. (You do this by selecting Control Variables and then selecting Game Data -> click on the default Map ID to open up the other options and then select Items, from which you can select Redberries, repeat for Greenflowers, repeat for Blueweeds)

The pseudo code would then be

Code:
variable01 = number of Redberry
variable02 = number of Greenflower
variable03 = number of Blueweed

If variable01 = 0
    I still need that Redberry dialogue
    Exit event processing
If variable02 = 0
    I still need that Greenflower dialogue
    Exit event processing
If variable 03 = 0
    I still need that Blueweed dialogue
    Exit event processing

If you haven't exited the event by now, then you must have at least each of the items, so now you can Quest complete dialogue
If you like, you can set a Quest complete switch so the NPC doesn't keep checking for the items.

You can find Exit event processing under Flow Control on the first tab of the event commands.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,012
Reaction score
1,523
First Language
Dutch
Primarily Uses
RMMV
or if you have conditional brance+

if: script: Check.each_more([1, 2], [2, 4], [3, 3])

this checks if there are at least 2 of item 1, at least 4 of item 2 and at least 3 of item 3.

this can make things easier, without it, you need $dataItems.item(3) && etc && etc
and hte amount of it, so conditional branch can make it short and sweet.
if one of the condition fails, it cannot be activated :)
 

fugahagen

Veteran
Veteran
Joined
Oct 31, 2017
Messages
30
Reaction score
11
First Language
english
Primarily Uses
RMMV
I was thinking just have one page for every item you need. If you have the first item the first page triggers a self switch to the next page that looks for the second item to go the the third.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,908
Reaction score
8,248
First Language
German
Primarily Uses
RMMV
I was thinking just have one page for every item you need. If you have the first item the first page triggers a self switch to the next page that looks for the second item to go the the third.
that is a very bad way to handle such cases for a lot of reasons.
1) you can only check for one item of the same type as the condition triggers on one, you can't count for multiple of the same item
2) you need autoruns or parallels to automatically trigger the next page, and that can cause timing problems
3) you use up event pages needlessly - each event can have only a limited number of event pages, and for more complex cases you'll need a lot of them
4) it makes the events difficult to read as you always have to check multiple pages, the other solutions here are all on one page
and a number of other disadvantages...
 

Latest Threads

Latest Posts

Latest Profile Posts

Quite the versatile cast so far :p

chars.PNG

Edit: Sprites are made by Alexdraws and TheMightyPalm. I just edited them.
Degica Games Turn Komodo | RPG Maker News #77

Well, rats. Was really looking forward to trying out FPS Creator, but trying to install and set it up was pretty much impossible for my tiny brain to comprehend. So much for that, then.
Ah, home once more! I think I can safely work on my games now.
Let's hope power remains on for the day

Forum statistics

Threads
112,414
Messages
1,068,138
Members
146,068
Latest member
Oiram19
Top