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
562
Reaction score
239
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
224
Reaction score
132
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,005
Reaction score
1,520
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,821
Reaction score
8,229
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 Profile Posts

Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!
Oof, this "side project" of mine is starting to get as complex as a VS plugin, at least as far as plugin parameters are concerned. I think I now understand why a plugin like this doesn't already exist(that I know of). Learning a lot while trying to make it work though!

Forum statistics

Threads
112,224
Messages
1,066,652
Members
145,828
Latest member
Frostdrache
Top