Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Created February 26, 2026 14:52
Show Gist options
  • Select an option

  • Save KageDesu/d580f95028a7e1fd5ddffed6d6a379a0 to your computer and use it in GitHub Desktop.

Select an option

Save KageDesu/d580f95028a7e1fd5ddffed6d6a379a0 to your computer and use it in GitHub Desktop.
Alternative Shop Plugin — Guide

Alternative Shop Plugin — Guide

Shop

Author: Pheonix KageDesu
RPG Maker Versions: MZ, MV
URL: http://kdworkshop.net/plugins/shop

Special thanks to Raffle — the person who gave the idea and commissioned this plugin.


Requirements

Warning: Map Inventory version 2.0 or higher (BASIC or PRO) is required.

Item description tooltips (on hover) require Map Inventory 2.3+.


Table of Contents

  1. How to Create a Custom Shop
  2. How to Add Items to a Shop
  3. Item Note Tags
  4. Script Calls
  5. Plugin Commands

1. How to Create a Custom Shop

  1. Open Plugin Parameters → All Shops and copy (or add) a new Shop entry.
  2. Set a unique ID for your shop — this ID is used in script calls to open that specific shop.
  3. Configure any other parameters as needed, or leave them at their defaults (if copied from an existing shop).
    • All parameters have descriptions.
    • It is recommended to copy an already-configured shop and then modify only the properties you need.
  4. Optionally, add items, weapons, and armors to the shop via the Default Goods parameter.

2. How to Add Items to a Shop

Items can be added to a shop via note tags (in addition to the Default Goods parameter).

Items added this way can be hidden at start, unlocked, or removed during gameplay via script calls.

Note Tag Syntax

<pShopConfig:SHOP_ID, CAT_ID, SELL_PRICE, BUY_PRICE [,hidden] [,noSale] [,unique]>

No quotes around values — this is a note tag, not a script call.

Parameters

Parameter Description
SHOP_ID The unique ID of the shop this item belongs to
CAT_ID The category ID within that shop
SELL_PRICE The price at which the shop sells the item to the player
BUY_PRICE The price at which the shop buys the item from the player
hidden (optional) Item is hidden at the start; use PSHOP_Unlock to reveal it
noSale (optional) Player cannot sell this item to the shop (shop sells only)
unique (optional) Player can buy this item only once per shop

One item can have multiple <pShopConfig> note tags to register it in different shops.

Example

<pShopConfig:testShop, cat1, 300, 150, hidden, noSale>

3. Item Note Tags

These note tags modify item behavior across shops.

Note Tag Description
<pNotForSale> Item cannot be sold to any shop
<pOnlyForSale:SHOP_ID> Item can be sold only to the specified shop
<pItemTrade:X,Y> Player must trade item ID X (quantity Y) to acquire this item

<pItemTrade> Details

  • X — the ID of the item to trade (items only, not weapons or armors)
  • Y — the required quantity
  • You can add up to 5 <pItemTrade> tags to a single item or equipment entry.

Examples

<pNotForSale>
<pOnlyForSale:testShop>
<pItemTrade:5,3>

4. Script Calls

Available in All Versions

PSHOP_Open(SHOP_ID)

Opens the shop with the given ID (defined in Plugin Parameters → All Shops).

PSHOP_Open("testShop")

PSHOP_IsOpen()

Returns true if any shop is currently open.


PRO Version Only

PSHOP_Unlock(TYPE, ITEM_ID, SHOP_ID)

Unlocks a hidden item so it becomes visible in the shop.

  • TYPE"item", "weapon", or "armor"
PSHOP_Unlock("armor", 2, "testShop")

PSHOP_Remove(TYPE, ITEM_ID, SHOP_ID)

Removes an item from the shop.

Note: Does not work with items added via the Default Goods parameter.


PSHOP_HowManyBought(TYPE, ITEM_ID)

Returns the number of times the player has bought the specified item.

PSHOP_HowManyBought("item", 22)

PSHOP_HowManySell(TYPE, ITEM_ID)

Returns the number of times the player has sold the specified item.

PSHOP_HowManySell("item", 22)

PSHOP_SetSellPrice(TYPE, ITEM_ID, NEW_PRICE, SHOP_ID)

Overrides the sell price (shop → player) for a specific item in a specific shop.

PSHOP_SetSellPrice("item", 7, 300, "testShop")

PSHOP_SetBuyPrice(TYPE, ITEM_ID, NEW_PRICE, SHOP_ID)

Overrides the buy price (player → shop) for a specific item in a specific shop.

PSHOP_SetBuyPrice("item", 7, 300, "testShop")

Use "$all" as SHOP_ID to apply the price change to all shops.

PSHOP_SetBuyPrice("item", 7, 300, "$all")

PSHOP_SetDiscountMode(PERCENT [, CAT_ID])

Activates a discount mode for the next shop opening.

  • PERCENT — discount percentage (1–99)
  • CAT_ID(optional) category ID to limit the discount to a specific category

Call this script immediately before opening the shop. Discount mode is automatically disabled when the player exits the shop.

PSHOP_SetDiscountMode(30)              // 30% off all goods
PSHOP_SetDiscountMode(10, "items")     // 10% off items category only

5. Plugin Commands

This plugin has no plugin commands. All functionality is accessed via script calls (see Section 4).


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment