VXAce Different shops can only buy specific items?

Hello! I'm wondering if there is a script that can have different shops only buy certain items.

For example, a weapons shop will only buy weapons, so you can't just sell whatever you have.

I would like it to be item specific if possible, instead of category, since I'm also hoping to have a shop that only buys a collectible key item.

Thank you!
Hmm. From the sounds of your description, are we talking about just 1 singular item? In that case, couldn't you just event the "selling" of such item(s)?

Like if they're only buying any amount of one said key item, it would be pretty straight forward to just save the amount the player has into a variable, tell the player what they would get for selling them, and then hand out the money.

Of course if there's a reason for the player to keep some of them it might be a little more involved, but in any case, this may be an approach worth considering.
There is a script for sell only and one for hiding categories, so you can hide items and armour, making it only sell weapons.
But I don't know of any script to buy only specific items.
There are scripts for limited inventory where you would have a weapon and only two of them can be bought. I think there is also scripts to have an item shop have items you sell to it.
There is however mr trivel dynamic shop
Hmm. From the sounds of your description, are we talking about just 1 singular item? In that case, couldn't you just event the "selling" of such item(s)?

Like if they're only buying any amount of one said key item, it would be pretty straight forward to just save the amount the player has into a variable, tell the player what they would get for selling them, and then hand out the money.

Of course if there's a reason for the player to keep some of them it might be a little more involved, but in any case, this may be an approach worth considering.
Thank you! If that was the only instance then I would go that route, but I was hoping to have weapons shops only buy weapons, armor only armor etc etc. as well
There is a script for sell only and one for hiding categories, so you can hide items and armour, making it only sell weapons.
But I don't know of any script to buy only specific items.
There are scripts for limited inventory where you would have a weapon and only two of them can be bought. I think there is also scripts to have an item shop have items you sell to it.
There is however mr trivel dynamic shop
Thank you!! I'll look into this, I can probably make due with hiding categories and do a work around for the specific special item
Thank you!! I'll look into this, I can probably make due with hiding categories and do a work around for the specific special item
Seiryuki - hide shop item categories

Seiryuki - Sell only


Spoiler: Shop Buys Unique Item
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Shop Buys Unique Item                  ║  Version: 1.00     ║
# ║ Author: Roninator2                            ║                    ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function:                                     ║   Date Created     ║
# ║                                               ╠════════════════════╣
# ║   Alter Shop Buy                              ║    02 Apr 2026     ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: nil                                                      ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description:                                                 ║
# ║       Limit shops from buying any item                             ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions:                                                      ║
# ║  Set note tags and turn switch on before shop processing in event  ║
# ║    <shop buy: 5>                                                   ║
# ║    shop will buy item when switch 5 is on                          ║
# ║    Will buy any item with the same switch id                       ║
# ║    So if you have weapon 17 and armour 15 using the same switch    ║
# ║    then both could be be purchased in that shop                    ║
# ║  Only for items with note tag                                      ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates:                                                           ║
# ║ 1.00 - 02 Apr 2026 - Script finished                               ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks:                                                ║
# ║   Roninator2                                                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use:                                                      ║
# ║  Follow the original Authors terms of use where applicable         ║
# ║    - When not made by me (Roninator2)                              ║
# ║  Free for all uses in RPG Maker except nudity                      ║
# ║  Anyone using this script in their project before these terms      ║
# ║  were changed are allowed to use this script even if it conflicts  ║
# ║  with these new terms. New terms effective 03 Apr 2024             ║
# ║  No part of this code can be used with AI programs or tools        ║
# ║  Credit must be given                                              ║
# ╚════════════════════════════════════════════════════════════════════╝

module R2_Shop_Buy_Unique_Item
  Regex = /<shop[ -_]buy:[ ](\d+)>/i
end

# ╔════════════════════════════════════════════════════════════════════╗
# ║                      End of editable region                        ║
# ╚════════════════════════════════════════════════════════════════════╝
$imported = {} if $imported.nil?
$imported[:r2_sbui] = 1.00        # Shop Buy Unique Item

#==============================================================================
# ** DataManager Load Notetag
#==============================================================================
module DataManager
  class <<self; alias load_database_r2_sbui_load_database load_database; end
  def self.load_database
    load_database_r2_sbui_load_database
    load_notetags_sbui_items
  end
  def self.load_notetags_sbui_items
    groups = [$data_items, $data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_sbui_items
      end
    end
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Item < RPG::UsableItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Weapon < RPG::EquipItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Armor < RPG::EquipItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

class Window_ShopSell < Window_ItemList
  #--------------------------------------------------------------------------
  # * Display in Enabled State?
  #--------------------------------------------------------------------------
  def enable?(item)
    return false if (item.shopbuy != 0) && ($game_switches[item.shopbuy] == false)
    item && item.price > 0
  end
end
Seiryuki - hide shop item categories

Seiryuki - Sell only


Spoiler: Shop Buys Unique Item
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Shop Buys Unique Item                  ║  Version: 1.00     ║
# ║ Author: Roninator2                            ║                    ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function:                                     ║   Date Created     ║
# ║                                               ╠════════════════════╣
# ║   Alter Shop Buy                              ║    02 Apr 2026     ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: nil                                                      ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description:                                                 ║
# ║       Limit shops from buying any item                             ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions:                                                      ║
# ║  Set note tags and turn switch on before shop processing in event  ║
# ║    <shop buy: 5>                                                   ║
# ║    shop will buy item when switch 5 is on                          ║
# ║    Will buy any item with the same switch id                       ║
# ║    So if you have weapon 17 and armour 15 using the same switch    ║
# ║    then both could be be purchased in that shop                    ║
# ║  Only for items with note tag                                      ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates:                                                           ║
# ║ 1.00 - 02 Apr 2026 - Script finished                               ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks:                                                ║
# ║   Roninator2                                                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use:                                                      ║
# ║  Follow the original Authors terms of use where applicable         ║
# ║    - When not made by me (Roninator2)                              ║
# ║  Free for all uses in RPG Maker except nudity                      ║
# ║  Anyone using this script in their project before these terms      ║
# ║  were changed are allowed to use this script even if it conflicts  ║
# ║  with these new terms. New terms effective 03 Apr 2024             ║
# ║  No part of this code can be used with AI programs or tools        ║
# ║  Credit must be given                                              ║
# ╚════════════════════════════════════════════════════════════════════╝

module R2_Shop_Buy_Unique_Item
  Regex = /<shop[ -_]buy:[ ](\d+)>/i
end

# ╔════════════════════════════════════════════════════════════════════╗
# ║                      End of editable region                        ║
# ╚════════════════════════════════════════════════════════════════════╝
$imported = {} if $imported.nil?
$imported[:r2_sbui] = 1.00        # Shop Buy Unique Item

#==============================================================================
# ** DataManager Load Notetag
#==============================================================================
module DataManager
  class <<self; alias load_database_r2_sbui_load_database load_database; end
  def self.load_database
    load_database_r2_sbui_load_database
    load_notetags_sbui_items
  end
  def self.load_notetags_sbui_items
    groups = [$data_items, $data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_sbui_items
      end
    end
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Item < RPG::UsableItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Weapon < RPG::EquipItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

#==============================================================================
# ** Load Item Notetag
#==============================================================================
class RPG::Armor < RPG::EquipItem
  attr_accessor :shopbuy
  def load_notetags_sbui_items
    @shopbuy = 0
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when R2_Shop_Buy_Unique_Item::Regex
        @shopbuy = $1.to_i
      end
    }
  end
end

class Window_ShopSell < Window_ItemList
  #--------------------------------------------------------------------------
  # * Display in Enabled State?
  #--------------------------------------------------------------------------
  def enable?(item)
    return false if (item.shopbuy != 0) && ($game_switches[item.shopbuy] == false)
    item && item.price > 0
  end
end
Thank you~! 😍

Original thread: https://forums.rpgmakerweb.com/threads/different-shops-can-only-buy-specific-items.183109/