ED5 Random Shop Items
A downloadable tool
๐ ED5 Random Shop Items v2.1
Professional dynamic shop system for RPG Maker MV & MZ
Random items, stock limits, persistence & auto-generation
๐ Features
Core Shop System
- โจ Random Item Selection - Automatically select random items from pools
- โจ Stock & Quantity Limits - Per-item stock with random ranges ("5-15")
- โจ Shop Persistence - Items and stock remembered across visits
- โจ Save/Load Compatible - Full persistence through save files
- โจ Restocking System - Manual or automatic stock restoration
Auto-Generation
- ๐ค Database Scanning - Automatically generate shops from your database
- ๐ค Type Filtering - Filter by items, weapons, armors, or all
- ๐ค Price Range Filtering - Set minimum and maximum prices
- ๐ค Tag Exclusion - Use <NoDrop> tags to exclude items
- ๐ค Smart Selection - Intelligently picks varied items
Advanced Controls
- ๐ฎ Full Plugin Commands - MZ visual + MV text commands
- ๐ฎ Script Call Support - Complete JavaScript API
- ๐ฎ Custom Pricing - Override prices with multipliers
- ๐ฎ Stock Queries - Check stock amounts in events
Compatibility
- โ MV & MZ Compatible - Works on both engines automatically
- โ Plugin-Friendly - Compatible with most other plugins
- โ Performance Optimized - Efficient memory usage
- โ Debug Mode - Built-in logging for troubleshooting
๐ฆ Installation
For RPG Maker MZ:
- Download
ED5_RandomShopItems.js - Copy to
js/plugins/folder - Open Plugin Manager in RPG Maker MZ
- Add the plugin and enable it
- Configure parameters (optional)
- Save your project
For RPG Maker MV:
- Download
ED5_RandomShopItems.js - Copy to
js/plugins/folder - Open Plugin Manager in RPG Maker MV
- Add the plugin and enable it
- Configure parameters (optional)
- Save your project
That's it! The plugin is ready to use. Create an event with a plugin command or script call to open your first shop!
๐ฎ How to Use
Basic Usage
Once installed, you can create shops in three ways:
| Method | Description |
|---|---|
| Auto-Generated | Plugin picks random items from database with filters |
| Custom Shop | You manually specify which items to sell |
| Item Range | Specify ranges like "items 1-10" for quick setup |
That's all you need to know to start creating shops!
๐ Quick Start
RPG Maker MZ (GUI Commands)
- Create an event
- Add Plugin Command
- Select ED5_RandomShopItems
- Choose Open Auto-Generated Shop
- Set Item Count to 10
- Run your event - Done!
RPG Maker MV (Text Commands)
- Create an event
- Add Plugin Command
- Type:
RandomShop auto 10 all unlimited - Run your event - Done!
๏ฟฝ Plugin Commands
RPG Maker MZ (GUI Commands)
Use the plugin command interface:
โPlugin Command: ED5_RandomShopItems โ Open Auto-Generated Shop โโ Item Count: 10 โโ Item Types: All Types โโ Stock Type: UnlimitedOpen Custom Shop
โPlugin Command: ED5_RandomShopItems โ Open Custom Shop โโ Shop Items: 0,1,50,10 0,2,100,5 1,5,500,3Open Item Range Shop
โPlugin Command: ED5_RandomShopItems โ Open Item Range Shop โโ Item Range: 1-10 โโ Stock: 5-15Restock Current Shop
โPlugin Command: ED5_RandomShopItems โ Restock Current ShopRestock All Shops
โPlugin Command: ED5_RandomShopItems โ Restock All ShopsReopen Last Shop
โPlugin Command: ED5_RandomShopItems โ Reopen Last ShopCheck Item Stock
โPlugin Command: ED5_RandomShopItems โ Check Item Stock โโ Item Type: Items (0) โโ Item ID: 1 โโ Result Variable: 10
RPG Maker MV (Text Commands)
Type these directly in the plugin command box:
RandomShop auto [count] [types] [stock] [amount] [price] [min] [max] [exclude] RandomShop custom type,id,price,stock type,id,price,stock ... RandomShop range itemType itemRange price stock maxItems RandomShop restock RandomShop restockAll RandomShop reopen RandomShop checkStock itemType itemId variableId eventId mapId
๐ป Script Calls
Use these in Script event commands (works in both MV & MZ):
Open Auto-Generated Shop
SceneManager.openAutoGeneratedShop({
itemCount: 10, // Number of items to show
itemTypes: [0, 1, 2], // 0=items, 1=weapons, 2=armors
priceMultiplier: 1.0, // Multiply all prices
stockRange: '10-30', // Stock amount or range
excludeNoDrop: true, // Exclude <NoDrop> tagged items
minPrice: 0, // Minimum item price
maxPrice: 999999, // Maximum item price
forceRegenerate: false // Force new items
});
Open Custom Shop
SceneManager.openRandomShopWithItems([
{type: 0, id: 1, price: 50, stock: 10}, // Item
{type: 1, id: 5, price: 500, stock: '5-15'}, // Weapon with random stock
{type: 2, id: 3, price: 300, stock: 0} // Armor unlimited
], 3);
Restock Shops
SceneManager.restockShop(); // Restock current shop SceneManager.restockAllShops(); // Restock all shops
Check Stock
var stock = SceneManager.getShopStock(
eventId, // Event ID (0 = current)
mapId, // Map ID (0 = current)
itemType, // 0=item, 1=weapon, 2=armor
itemId // Item ID
);
// Returns: stock count, or -1 if unlimited
Reopen Last Shop
SceneManager.openRandomShopWithLastItems();
๐ก Examples
Example 1: Basic Auto Shop
// MZ Plugin Command:
Open Auto-Generated Shop
Item Count: 10
Item Types: All Types
Stock Type: Unlimited
// MV Plugin Command:
RandomShop auto 10 all unlimited
// Script Call:
SceneManager.openAutoGeneratedShop({
itemCount: 10,
itemTypes: [0, 1, 2]
});
Example 2: Potion Shop with Limited Stock
// MZ Plugin Command:
Open Auto-Generated Shop
Item Count: 5
Item Types: Items Only
Stock Type: Random Range
Stock Amount: 10-30
Maximum Price: 500
// MV Plugin Command:
RandomShop auto 5 items random 10-30 1.0 0 500
// Script Call:
SceneManager.openAutoGeneratedShop({
itemCount: 5,
itemTypes: [0],
stockRange: '10-30',
maxPrice: 500
});
Example 3: Premium Weapon Shop
// MZ Plugin Command:
Open Auto-Generated Shop
Item Count: 8
Item Types: Weapons Only
Stock Type: Fixed Amount
Stock Amount: 3
Price Multiplier: 1.5
Minimum Price: 1000
// MV Plugin Command:
RandomShop auto 8 weapons fixed 3 1.5 1000 9999
// Script Call:
SceneManager.openAutoGeneratedShop({
itemCount: 8,
itemTypes: [1],
stockRange: 3,
priceMultiplier: 1.5,
minPrice: 1000
});
Example 4: Custom Shop with Specific Items
// MZ Plugin Command:
Open Custom Shop
Shop Items:
0,1,50,10
0,2,100,5
1,5,500,3
// MV Plugin Command:
RandomShop custom 0,1,50,10 0,2,100,5 1,5,500,3
// Script Call:
SceneManager.openRandomShopWithItems([
{type: 0, id: 1, price: 50, stock: 10},
{type: 0, id: 2, price: 100, stock: 5},
{type: 1, id: 5, price: 500, stock: 3}
], 3);
Example 5: Item Range Shop
// MZ Plugin Command:
Open Item Range Shop
Item Range: 1-10
Item Type: Items
Stock: 5-15
// MV Plugin Command:
RandomShop range 0 1-10 0 5-15 10
// Script Call:
SceneManager.openRandomShopWithItems([
{type: 0, id: '1-10', price: 0, stock: '5-15'}
], 10);
Example 6: Daily Rotating Shop
// Check if new day
if ($gameVariables.value(1) !== $gameSystem.day()) {
// Restock and force new items
SceneManager.openAutoGeneratedShop({
itemCount: 10,
stockRange: '10-30',
forceRegenerate: true
});
$gameVariables.setValue(1, $gameSystem.day());
} else {
// Same items within the day
SceneManager.openAutoGeneratedShop({
itemCount: 10,
stockRange: '10-30'
});
}
Example 7: Stock-Based NPC Dialogue
// Check stock
SceneManager.getShopStock(0, 0, 0, 1); // Returns stock amount
// Or use plugin command: RandomShop checkStock 0 1 10 0 0
// Then in event:
Conditional Branch: Variable [10] = 0
Text: Sorry, we're sold out!
Else
Conditional Branch: Variable [10] <= 5
Text: We're running low, only \V[10] left!
Else
Text: We have \V[10] in stock!
โ๏ธ Plugin Parameters
| Parameter | Default | Description |
|---|---|---|
| Default Max Items | 5 |
Default number of items in auto-generated shops |
| Enable Stock System | true |
Enable stock tracking system |
| Default Stock | 0 |
Default stock amount (0 = unlimited) |
| Show Stock Count | true |
Display stock counts in shop window |
| Stock Text | %1 (Stock: %2) |
Stock display format (%1=item, %2=stock) |
| Sold Out Text | SOLD OUT |
Text shown when item out of stock |
| Restock On Map Change | false |
Auto-restock when player changes maps |
| Debug Mode | false |
Show console logs (F8) for debugging |
๐พ Shop Persistence
Shops remember their items and stock across visits:
- First Visit: Shop generates random items and stock
- Subsequent Visits: Shows THE SAME items (not new random items!)
- After Purchases: Stock depletes normally
- After Save/Load: Shop state is preserved
- After Restocking: Stock restored, same items
Players won't see different items every time they enter the shop.
To Get NEW Items:
- Use
restockShop()to restore stock (keeps same items) - Use
forceRegenerate: trueto force new item selection
// Force new items
SceneManager.openAutoGeneratedShop({
itemCount: 10,
forceRegenerate: true
});
๐ท๏ธ Database Tags
Add these tags to item/weapon/armor notes to control auto-generation:
Prevents item from appearing in auto-generated shops
Same as NoDrop - prevents item from appearing in shops
Example in Item Notes:
This is a rare quest item. <NoDrop> <NoShop>
๐ฌ Common Use Cases
1. General Store with Mixed Items
โPlugin Command: Open Auto-Generated Shop โโ Item Count: 15 โโ Item Types: All Types โโ Stock: 10-20 โText: Welcome to our general store!
2. Potion Shop
โPlugin Command: Open Auto-Generated Shop โโ Item Count: 8 โโ Item Types: Items Only โโ Max Price: 500 โโ Stock: Unlimited โText: Fresh potions and supplies!
3. Rare Weapon Dealer
โPlugin Command: Open Auto-Generated Shop โโ Item Count: 5 โโ Item Types: Weapons Only โโ Min Price: 1000 โโ Stock: 1-3 โโ Price Multiplier: 1.5 โText: Only the finest weapons here.
4. Daily Special Shop
โConditional Branch: Variable [DayNumber] != Current Day
โโ Script: SceneManager.openAutoGeneratedShop({
itemCount: 10,
forceRegenerate: true
});
โโ Control Variables: [DayNumber] = Current Day
โElse
โโ Plugin Command: Reopen Last Shop
5. Check Stock Before Selling
โPlugin Command: Check Item Stock โโ Item: Potion (Item 1) โโ Variable: 10 โConditional Branch: Variable [10] > 0 โโ Text: Yes, we have \V[10] in stock! โElse โโ Text: Sorry, we're all out!
๐ Changelog
v2.1(October 11, 2025)
- โ FIXED: Auto-generated shops now persist items on revisit
- โ Shops no longer regenerate items every time player enters
- โ Added forceRegenerate option for daily/weekly shops
- โ Consistent behavior with manual shops
- โ Added "Open Custom Shop" plugin command
- โ Added "Open Item Range Shop" plugin command
- โ Added "Check Item Stock" plugin command
- โ Complete plugin command coverage
- โ Added full plugin commands for MZ and MV
- โ MZ visual interface support
- โ MV text-based commands
- โ Added auto-generation from database
- โ Price range filtering
- โ Item type filtering
- โ <NoDrop> tag support
- โ Added RPG Maker MV compatibility
- โ Automatic version detection
- โ Added random stock quantities ("5-15")
- โ Stock ranges for dynamic inventory
v2.0 (October 11, 2025)
- โ Initial major release
- โ Stock system
- โ Save/load persistence
- โ Restocking system
๐ License
Free to use in commercial and non-commercial projects.
โ Allowed:
- Use in free games
- Use in commercial games
- Modify for personal use
- Include in game compilations
โ Not Allowed:
- Redistribute as your own
- Sell the plugin separately
- Remove author credits
๐ Quick Start Guide
Get Started in 3 Steps:
โข Copy to js/plugins/
โข Enable in Plugin Manager
โข Add plugin command or script call
โข Choose auto-generate or custom items
โข Set stock amounts
โข Talk to NPC
โข See random shop in action
โข Buy items and watch stock decrease!
That's it! You're ready to create dynamic shops! ๐โจ
๐ฏ Perfect For:
Dynamic shops that change over time
Limited stock creates urgency
Random items for each run
Regional shop variation
Realistic stock management
Scarce resources
Shop inventory reflects story
Adds depth to shopping
โก Feature Highlights
๐ Thank You!
Thank you for using ED5 Random Shop Items!
I hope it adds depth and variety to your game's economy! ๐๐
Happy Game Making! โจ
ED5 Random Shop Items v2.1
Professional dynamic shop system for RPG Maker MV & MZ
RPG Maker MV | MZ
Need Help? Enable Debug Mode parameter and check console (F8) for detailed logs!
| Updated | 10 days ago |
| Status | Released |
| Category | Tool |
| Author | ChigooX |
| Tags | RPG Maker MZ, sourcecode |
Purchase
In order to download this tool you must purchase it at or above the minimum price of $1 USD. You will get access to the following files:

Comments
Log in with itch.io to leave a comment.
Use and like this one, though it would be nice to be able to limit quantities of each item players are able to purchase.
Iโll add that in the next update
Cool, let me know and i'll be glad to test it out.
not a problem
it's added!