Need help setting up a shop full of "unique" items

Im making a very small game and one of the main aspects of it is the player can purchase upgrades from a shop with money they earn

The issue is I want each upgrade to only be purchasable once, and they can be purchased in any order.

So, for example, The shop would sell items A B C and D, each for a different price. Say the player buys Item C first, the shop would then only offer items A B and D.

The items do not ever disappear or get used up so the player will never need to re-buy them, therefore I dont care about any type of re-stocking the shop.

I hope Ive explained it right, is there a way to make a shop function like this? Ive seen that Yanfly's Item plugin can set the max items held to be 1, but the item stil displays as for sale which is something I don't want.
One way to do this is by using Yanfly's item core where you can limit how many a player can have an item in his inventory.

If you set the item limit to 1, player cannot buy more than one.

After that, you can set up conditional shop list to remove items a player has purchased.
One way to do this is by using Yanfly's item core where you can limit how many a player can have an item in his inventory.

If you set the item limit to 1, player cannot buy more than one.

After that, you can set up conditional shop list to remove items a player has purchased.

Yeah Im tinkering with the branch right now, its just REAL long since I have 7 items all for purchase. Its starting to look like a Matryoshka doll of cases, and Im not even sure Im doing it right. Was just hoping a plugin could make it easier
Messy but that's probably the easiest path.
I had gone the same route for some unique equipment for my games.

I think I also looked at Yanfly's unique item feature in Item core or something but not sure why I didn't go for it. It's been a while. Worth looking into that.
Just put each item on a table in the store, and have the player interact with it to buy it. Ask them then if they wish to buy it, use a conditional branch to make sure they have enough $$$ and then use a self switch to disable them from buying it again.
Just put each item on a table in the store, and have the player interact with it to buy it. Ask them then if they wish to buy it, use a conditional branch to make sure they have enough $$$ and then use a self switch to disable them from buying it again.

I hadn't considered that approach, thanks for the idea! Ill either do that or finish the spaghetti branches like sura_tc suggested.

Thank you both a bunch!
You could try to replace the "Shop Processing" event command by a script, although that too might look a bit messy:

var goods = [];
goods.push([0, 10, 0]);
goods.push([1, 11, 0]);
goods.push([2, 12, 1, 1000]);

...
SceneManager.push(Scene_Shop);
SceneManager.prepareNextScene(goods, true);


The code for the shop items is:
- type of item (0 = item, 1 = weapon, 2 = armor)
- database ID
- price type (0 = original price, 1 = custom price)
- price if custom price was selected
In this example, the goods would be Item#10, Weapon#11 and Armor#12 at 1000g.
The highlighted parameter in the last line determines if the shop is purchase only (true/false).

Using javascript code you can make each purchasable item conditional. If you want to add each item only if the party does not already have it in its inventory, you could use (for Item#10 here)
if (!$gameParty.hasItem($dataItems[10])) {
goods.push([0, 10, 0]);
}

for example.


Alternatively you could use a plugin to modify the item list in the buy window itself.
I haven't tested it, but this
Spoiler
Code:
(function() {

var oldWindowShopBuyMakeItemList = Window_ShopBuy.prototype.makeItemList;
Window_ShopBuy.prototype.makeItemList = function() {
    oldWindowShopBuyMakeItemList.call(this);
   var newData = [];
   var newPrice = [];
   for (var i = 0; i < this._data.length; i++) {
       var item = this._data[i];
       if (!item.meta["hide from shop"] || !$gameParty.hasMaxItems(item)) {
           newData.push(item);
           newPrice.push(this._price[i]);
       }
   }
   this._data = newData;
   this._price = newPrice;
};

})();
should theoretically remove items from the list if your party has the maximum amount in their inventory and the item has
<hide from shop>
in its notebox.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-setting-up-a-shop-full-of-unique-items.113898/