Events triggered by collecting Key Items

Hi there, first off I am not sure I have this in the right subforum. Forgive me, I am a noob and this forum confuses me.

Anyway, I have a question about event triggers. Specifically, I want to make an event where the trigger is that my party has collected pre-determined key items in the game. How would I go about doing this specifically? I have tried messing with control variables, but I just cannot wrap my head around how to connect those to the event I want to set up.

If you need any more details, this is what I envisioned the gameplay of the event would look like:

After the character collects the last key item, a character transfer begins, taking them to a nearby room on the map. there the characters discuss the effects of the item resonating. Then further dialogue points the player in the direction of the next objective.


I was also considering connecting it to a class change for my main character.

Again, all the rest of that should be largely easy for me, I just cannot yet figure out how to connect that to the variable of having all 8 items.
Should I try connecting it to the possession of all 8, or tie it to the last item and then make the dungeons for all of the other items locked with the requirement being the possession of the previous item?

Any advice or thoughts on this would be appreciated.
If you only have one of each of these key items, then on each event, give the key item to the player, and call a common event (the same common event for each one). In the common event, use Control Variables to add 1 to the variable. Then a Conditional Branch to see if the variable is equal to the full number of key items required. If it is, do all the stuff you want to do when the player has collected all the key items.
If you only have one of each of these key items, then on each event, give the key item to the player, and call a common event (the same common event for each one). In the common event, use Control Variables to add 1 to the variable. Then a Conditional Branch to see if the variable is equal to the full number of key items required. If it is, do all the stuff you want to do when the player has collected all the key items.
Okay, ill try this.
Pretend I am stupid though (let's face it, I basically am), can you give me a detailed explanation of this?

Cause here is my understanding of your explanation. What I need to do is set up x number of events. In each event, I set a variable to check for the previous events.

Now is there a way to make it so the next event doesn't become available till a previous one does? That way it is harder for a player to miss an event granting them a key item, so they don't get to the end of the main quest and realize they forgot a dungeon all the way in the beginning and have to go all the way back?
Are you saying they have to collect the items in a certain order? In that case it gets even easier. If the player obtains the last key item, then you know they have obtained all of them, and you don't have to check each time an item's obtained, or keep a count of how many they have.

That's basic event conditions and switching. You might want to read up on those, or find a tutorial, if you don't understand how they work.

Method A - Player can get key items in any order
Let's say the player has to get an egg, some milk and some flour, then they can bake a cake.
On the egg event, show text "You got an egg", add an egg to inventory, call the "cake ingredients" common event, turn on self switch A. Add an extra page conditioned by self switch A with no commands (or show text "You already have an egg") so the player can't get several of them.
On the milk event, do the same thing, using "milk" instead of "egg".
On the flour event, do the same thing, using "flour" instead of "egg".
Now create your "cake ingredients" common event. Add 1 to the "cake ingredients" variable. Then do a conditional branch to see if the "cake ingredients" variable is 3. If it is, show text "You have all the ingredients - go make a cake" and turn on a new switch.
On the mixing bowl event, page 1 has no conditions and says "you could make a cake, if you had an egg, milk and flour", and page 2 has the switch as a condition, removes the egg, milk and flour from inventory and gives a cake, then turns on a self switch so it can't be repeated.

Method B - Player must get one item before they can get the next
How you do this depends on how you want to block the player - do you want to stop them entering the next area if they don't have the item? In that case just put an event on the entrance to the new area (could be a door, transfer event, whatever) with no conditions on the first page, and "There is more to do here before you move on" (or some less generic text). On the second page, use Item X in Inventory as the condition, and whatever is needed to let them move into the next area. Also turn on a self switch and have a third page conditioned by that self switch, which allows them through - this is only required if you plan to later take the items off the player but the player can come back (otherwise if you take away the item, the conditions on the second page will no longer be true, and they won't be able to go through).
Are you saying they have to collect the items in a certain order? In that case it gets even easier. If the player obtains the last key item, then you know they have obtained all of them, and you don't have to check each time an item's obtained, or keep a count of how many they have.

That's basic event conditions and switching. You might want to read up on those, or find a tutorial, if you don't understand how they work.

Method A - Player can get key items in any order
Let's say the player has to get an egg, some milk and some flour, then they can bake a cake.
On the egg event, show text "You got an egg", add an egg to inventory, call the "cake ingredients" common event, turn on self switch A. Add an extra page conditioned by self switch A with no commands (or show text "You already have an egg") so the player can't get several of them.
On the milk event, do the same thing, using "milk" instead of "egg".
On the flour event, do the same thing, using "flour" instead of "egg".
Now create your "cake ingredients" common event. Add 1 to the "cake ingredients" variable. Then do a conditional branch to see if the "cake ingredients" variable is 3. If it is, show text "You have all the ingredients - go make a cake" and turn on a new switch.
On the mixing bowl event, page 1 has no conditions and says "you could make a cake, if you had an egg, milk and flour", and page 2 has the switch as a condition, removes the egg, milk and flour from inventory and gives a cake, then turns on a self switch so it can't be repeated.

Method B - Player must get one item before they can get the next
How you do this depends on how you want to block the player - do you want to stop them entering the next area if they don't have the item? In that case just put an event on the entrance to the new area (could be a door, transfer event, whatever) with no conditions on the first page, and "There is more to do here before you move on" (or some less generic text). On the second page, use Item X in Inventory as the condition, and whatever is needed to let them move into the next area. Also turn on a self switch and have a third page conditioned by that self switch, which allows them through - this is only required if you plan to later take the items off the player but the player can come back (otherwise if you take away the item, the conditions on the second page will no longer be true, and they won't be able to go through).
Thanks. Considering the semi-linear nature of the map I have in mind, I think I should go with B there. Now its only a matter of how to execute it within my envisioned scenario. 🙂

Thank you so much!!

Original thread: https://forums.rpgmakerweb.com/threads/events-triggered-by-collecting-key-items.116615/