Using Switches to control what's sold in shops

So what I'm planning on doing is having a common event for a shop that uses switches to determine whether or not that item is sold. Unfortunately I'm not doing it in order (Like weapon set 1, weapon set 2, weapon set 3, etc.), like the player will have to do sidequests in order to unlock the new guns. Is there any way to do this?
There is, but I recommend a script for that. Try dynamic shop scripts. For switches, just activate the common event when the switch is activated, and add the item.

http://www.rpgmakervxace.net/topic/10434-est-dynamic-shop/?hl=shop
In default, you can only use conditional branches to decide which shop, and then use different shop processing commands in each of the branches.


If you're willing to use a script, then there are several advanced shop scripts that have additional options for the shops, and if I remember correctly at least one of those scripts has the option to use conditional item sales, and you can place conditions on the available items.


Unfortunately I don't remember which one (might be Tsukihimes, could be Galv's) so I suggest going to the master script list and compare the shop-scripts available there.
http://himeworks.wordpress.com/2013/02/22/shop-manager/

The Shop Manager allows you to set up "shop good conditions"

For example, if you want the first shop good to be disabled when switch 1 is ON, you would make this script call before the actual shop processing command

disable_good(1, "s[1] == true")You can simply create a single shop with all the goods, and then set conditions for each good.You may also want to consider hiding shop goods from the player using the following script call

Code:
hide_good(1, "s[1] == true")
This will hide the 1st item if switch 1 is ON.

Original thread: https://forums.rpgmakerweb.com/threads/using-switches-to-control-whats-sold-in-shops.20758/