Help with quest that counts finding unique items

I'm trying to implement a quest that keeps track of unique items the player gets that aren't available at the shop.

There are 4 items that the player can acquire this way and I'm having trouble making the game count if the player has found the items but count it only once as they are synthesis items that can be crafted more than once.

Here's what I got so far:

Spoiler: Item Tracker event
1729520016951.png

I have each page activated by a self switch depending on which item has activated it, page 6 is an empty action button page to stop the event
Spoiler: Example
1729519910049.png

Spoiler: Questgiver event
1729519956282.png

Once the Fusion variable = 4 the quest would be complete and it would stop counting but it's not supposed to count the same item twice (e.g. if you get "Hemorrage" twice before any other item it should count only as 1 fusion instead of 2)
you only need 1 functional page and no switches for this actually. youre not using the 4 pages to print any text

Set the variable to 0 on the first page and then use 4 single conditional branches to check if the party has an item and increase the variable. then at the end, continue your event if the variable is 4. Page 4 of the conditional branch event window has an option for if the item is in the party's possession
@Robro33 you have overlooked that the event is a parallel, and that said items can be created multiple times. so the OP still needs the switches or something similar to check if an item has been counted before.

@Alkaline OK, first let's explain some basic mistakes you made:

Page priority
Only one page of an event can be active at any one time, and if multiple pages have their conditions fulfilled then only the page with the highes number of them will be active.
So if you go into your check event in the wrong order, it will completely break
that is why you have to combine everything into one page as mentioned above, and that requires some different logic checks.

Parallels lag
All parallels (and autoruns) loop sixty times per second, and if you don't need to check something that often it creates lag. And lag is additive, so it should be prevented if possible.
The way to do this is to include waits into the parallel, because in a parallel the wait works as "skip this parallel for x frames before running it again".
So a wait(10) means that a check is only processed about five times per second instead of sixty times.

As few parallels as possible
For a lot of reasons you should try to replace parallels whereever possible, because they can complicate bughunting - especially if you use chained parallels.

In a case like this, a better alternative would be to make it a common event that is called by whatever synthesis event you use to make those items. If that is not possible then of course you need to use a parallel, but it would be preferably be part of the synthesis or shop event where you can get one of the items.



Now for your logic.
The best way to go about this is to have a sequence of four double conditional branches:
if <item> in possession
>> if <item-switch is ON
>> (leave empty)
>> else
>> control <itemswitch> = ON
>> control <itemcount> +=1

next item

and at the end
if <itemcount> >=4
etc
another way is easier which require 2 variables and unique item counts.
if you have 4, this can be done with selfswitches.

if: selfSwitch A = ON
itemCount += 1
else
// nothing here while obtained
end

you can repeat this with with selfSwitch A, B, C, D

or use

if variable 1 = 1
itemCount += 1
else
// nothing
end

and repeat this on 1 page, or common event, and call it within the chest part or
when the item is found 🙂

you over complicated currently things with to many pages while 1 pages works 🙂
Now for your logic.
The best way to go about this is to have a sequence of four double conditional branches:
if <item> in possession
>> if <item-switch is ON
>> (leave empty)
>> else
>> control <itemswitch> = ON
>> control <itemcount> +=1

next item

and at the end
if <itemcount> >=4
etc
This worked perfectly! I was having trouble visualizing this logic... Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/help-with-quest-that-counts-finding-unique-items.172734/