- Joined
- Apr 14, 2019
- Messages
- 214
- Reaction score
- 187
- First Language
- German
- Primarily Uses
- RMMV
First of all I know Tsukihime has written a Shop Manager and propably other authors have done similar things
and I didn't think I would be able to do the same, but it actually didn't take that long.
Terms of Use:
As always totally free for commercial and non-commercial use and it doesn't need credits.
Features:
- Define entire shops in the plugin parameters (Yes that is the difference between my plugin and Tsukihimes ShopManager)
This may be more work, but I like it that way.
- Limit the available items via javascript code within the plugin parameters.
- Limit the amount of items in the shops stock, either by fix amount or variable.
- Limit shops to only accept items from you, that they also offer to you.
- Handle discounts via javascript code.
- Possibility to define switch shops.

You can open a shop with the plugin parameter OpenShop <Name>.
You do not need to use the Shop Processing Command afterwards.
You can still open normal shops via the Shop Processing Command.
The Shop Number Window will display the number of items in stock:

If it is not infinite it will display the stock quantity minus the number you've selected to buy:

You can specify if and how the shops do refill their stock.
You can also trigger refilling the stock via the plugin command:
RefillShopStock <Name>
You can also close the shop, via the plugin command:
CloseShop <Name>
If it is reopened later it's stock will be refilled.
I would really appreciate any feedback.
Compatibility:
Please place this under any shop related plugins.
It is not compatible to Tsukihimes ShopManager.
The port to MZ is from XL, it is not fully compatible to VisuStella, but seems to cause at least no errors.
Edit:
- Found a bug and fixed it. Please download the new version.
- Forgot to mention it requires MV Version 1.6.1 or higher
- Forgot to mention if you define two or more items of same kind in the shop, they will be combined into a single one with the combined stock quantity and if you use custom prices, it will have the highest custom price.
Edit 2:
- Fixed some other issues.
- The help window will now display the shops name instead whenever it would have displayed an empty text.
Edit 3:
- Shop names are now allowed to have white space.
- Two new plugin parameters:
Sold out text: Will be displayed in the help window alongside the shops name, when it is completely sold out.
Display sold out items in shop: Determines when the shop is opened via the plugin command whether sold out items should be visible in the buy window. If items get sold out while the shop is already open they are just greyed out.
Edit 4:
- Compatibility with mjshi NPCDialogueShop: My plugin removed the common event command. Now it will also add the common event command when mjshi's plugin is installed aswell.
Please place this plugin under mjshi's plugin.
Edit 5:
Added functionality for granting discounts under certain conditions.
Shops keep track on #Total items sold, #Individual items sold, #Times visited.
Edit 6:
Fixed very big bug. This plugin didn't pass the plugin command and it's arguments to other plugins.
Examples for discount conditions:
this.getNumberBoughtOf(kind, id) >= 3 Means #individual items sold >= 3
this._nrOfVisits == 3
this._totalItemsBought == 100
Discount percentages stack by multiplying them, e.g. if the conditions for 10% and another 20% are fulfilled, this does not mean a discount of 30%, but rather only 28% as
e.g. if the original price = 100:
- Fixed a bug, that make normal shops being opened endlessly.
- Added custom selling prices. If not given half of the custom buying price is taken as selling price. If this is not given either half of the price from the database is taken as selling price just like the default behaviour.
The resulting price is rounded down, in case it is a floating point number.
The plugin now has version 1.5.
Edit 8:
Sold out text was not displayed when using different currencies via YEP_X_MoreCurrencies.
The plugin has now version 1.6. The Sold Out Text will overrule the more currencies.
Edit 9:
Some fixes around custom selling prices.
Plugin is now version 1.9.
Edit 10:
Today I had the idea of creating a switch shop without the need to buy an item first. Luckily it was possible.
So introducing the new plugin parameters:
Switch on text: Text to be displayed instead of the price for a switch that has already been bought and is set to on.
Switch off text: Text to be displayed instead of the price for a switch that has already been bought and is set to off.
Switches: The switches sold by the shop.

A shop good of type switch cannot be sold, so it has no selling price and as the buying price cannot be defined
elsewhere the UseCustomPrice flag is not needed. I hope I decribed the rest of the plugin parameters good enough
within the plugin itself:

The final result looks like this when the switch has not been bought yet:

Once bought it is set to on and in case it is toggable you can set it to on/off just by pressing on the item:

With this it is now v2.0.
I saw, that this could open up so much new potential (like e.g. Variable Shops, BGM Shops, etc.) in the future.
If I find the time I may implement further kinds of shop goods like the discounts did.
I hope this doesn't break existing projects.
Edit 11:
v2.1: Extension to YEP_ItemCore. Allows to buy independent items.
Edit 12:
v2.1.1 Small fixes around empty shops and the default shop.
Edit 13:
v2.1.2
- Updated help section. Plugin command is actually names "RefillShopStock <name>" instead of "RefillStock <name>"
- Fixed a bug around independ shop goods and the stock refill. I deleted the independ items from the memory even the party already bought them. Now I don't do this anymore.
Edit 14:
v2.2.0
-New plugin command Refill<Kind>Stock "<Name>" Id Quantity:
Refills a single shop good of the given kind in the shop with the given name by the given quantity. It will not exceed the maximum quantity. It currently does only work if the plugin parameter GroupItemsWithLimitedStock is set to true (Yes). The shop name must be placed into quotes as it allowes single white spaces between parts of it's name.
Edit 15:
Should now be compatible with MV 1.5.1
Edit 16:
Had to rework this plugin in order to find other workarounds for compatibility issues with Yanfly plugins rather than copying the code that still needs to be called and leaving out the rest as it is prohibited by the terms of use of Yanfly plugins and I guess also by copyright. I just want to avoid making me to have to take this plugin down. Yet I still hope this is just a minor issue as my plugin is given away for free.
While doing this and veryfying in a test project that everything is still working as intended by me I found out that the following parameter of YEP_ShopMenuCore is not working if NPCDialogueShop is installed aswell:

Off course I cannot solve this issue. As NPCDialogueShop seems to only work in conjuction with YEP_ShopMenuCore if placed under it and it overwrites a bunch of functions without aliasing them, there would be no way to workaround this without copying the YEP code around this parameter, which I clearly do not want to do.
So I added a plugin parameter to my plugin to allow adding the equip command again to the shop menu (Default Value = On).
Also if YEP_ShopMenuCore + NPCDialogueShop + BO_Shops are all used within your project the custom commands will also be added and the commands are placed exactly in the order of this screenshot.
Edit 17:
Renamed downloadable plugin BO_Shops => BO_CustomShops. If you have it already in use, you can rename it back to BO_Shops after downloading in order to not loose all your plugin parameters.
BO_CustomShopsXL is an extended version, because I've got ideas. Some of the ideas are not compatible to the old BO_CustomShops. That is why I've created it as a seperate plugin. The XL version is also not compatible with YEP_X_MoreCurrencies and YEP_X_CondShopPrices anymore. It is still compatible with any other plugin BO_Shops was also compatible with.
I've also updated my shop category customization plugin found at https://forums.rpgmakerweb.com/index.php?threads/shop-category-customization.121309/#post-1065982 to be compatible with the XL version of BO_CustomShops.
If you rename BO_CustomShops to BO_Shops after the download you need to replace the following line in the code
BurningOrca.Shops.Parameters = PluginManager.parameters('BO_CustomShops'); with BurningOrca.Shops.Parameters = PluginManager.parameters('BO_Shops');
Edit 18:
Compatibility fix of switch shops with MKR_ShopItemMessage.
Found bug in XL version: Item descriptions have not been displayed anymore.
Edit 19:
Fixed a bug in XL to make it work without YEP_CoreEngine being used.
Edit 20:
Updated XL, as it had some math errors. Obviously calling Math.log10 and passing a value of 0 is not a good idea.
Edit 21:
Fixed a typo: $dataArmors instead of $dataArmor.
Edit 22:
- Small performance upgrade in BO_CustomShops. Call this.price() only once in Window_ShopBuy.prototype.drawBuyPrice extension.
- Compatibility fix in BO_CustomShopsXL with ShadowDragon_EC (Easy Currency).
Edit 23:
Found bug in Plugin Command RefillItemStock.
Edit 24:
Changed my mind form yesterday and ported XL to MZ. However I cannot support this plugin as it my trial license will run out tomorrow. The upload is just experimental.
Found a lot of bugs in XL. Severe ones. Shops weren't even working after loading a safe file.
Edit 25:
Yet again introduced a small little bug with the fixes in XL yesterday.
Edit 26:
I've taken the MZ version down, after I've read through Tsukihimes Shop Inventory plugin thread. Not only can I not support BO_CustomShopMZ, because my trial run out, but also just from what I've read Tsukihimes plugin will become amazing. I normally don't like to compete with others on the same topic. Her Shop Manager for MV was already good, just not what I wanted and that is why the original BO_Shops was born. That is the only time I've started a competition.
Edit 27:
I've found two bugs in XL both only in Shops that have the stock refill type set to "Add additional Stock".
1) Discounts where applied each time the shop has been opened unless a "Stock Refil"l happend.
2) If a shop has been opened and no "Stock Refill" happened, then the previous stock got lost.
I actually didn't really test if the bugs really exist, but assumed it by looking into my code.
I've also reworked the code of XL slighly to be a little simpler, but still have the same functionality.
It is now Version 2.0.
Because of the rework it will remove a variable from the saved shops, when loading a save file which has been saved with the previous version from XL and cause a "Stock Refill" on all saved shops in order to be inline with the changes. Therefore I recommend you to not get the new version unless absolutely needed.
and I didn't think I would be able to do the same, but it actually didn't take that long.
Terms of Use:
As always totally free for commercial and non-commercial use and it doesn't need credits.
Features:
- Define entire shops in the plugin parameters (Yes that is the difference between my plugin and Tsukihimes ShopManager)
This may be more work, but I like it that way.
- Limit the available items via javascript code within the plugin parameters.
- Limit the amount of items in the shops stock, either by fix amount or variable.
- Limit shops to only accept items from you, that they also offer to you.
- Handle discounts via javascript code.
- Possibility to define switch shops.

You can open a shop with the plugin parameter OpenShop <Name>.
You do not need to use the Shop Processing Command afterwards.
You can still open normal shops via the Shop Processing Command.
The Shop Number Window will display the number of items in stock:

If it is not infinite it will display the stock quantity minus the number you've selected to buy:

You can specify if and how the shops do refill their stock.
You can also trigger refilling the stock via the plugin command:
RefillShopStock <Name>
You can also close the shop, via the plugin command:
CloseShop <Name>
If it is reopened later it's stock will be refilled.
I would really appreciate any feedback.
Compatibility:
Please place this under any shop related plugins.
It is not compatible to Tsukihimes ShopManager.
The port to MZ is from XL, it is not fully compatible to VisuStella, but seems to cause at least no errors.
Edit:
- Found a bug and fixed it. Please download the new version.
- Forgot to mention it requires MV Version 1.6.1 or higher
- Forgot to mention if you define two or more items of same kind in the shop, they will be combined into a single one with the combined stock quantity and if you use custom prices, it will have the highest custom price.
Edit 2:
- Fixed some other issues.
- The help window will now display the shops name instead whenever it would have displayed an empty text.
Edit 3:
- Shop names are now allowed to have white space.
- Two new plugin parameters:
Sold out text: Will be displayed in the help window alongside the shops name, when it is completely sold out.
Display sold out items in shop: Determines when the shop is opened via the plugin command whether sold out items should be visible in the buy window. If items get sold out while the shop is already open they are just greyed out.
Edit 4:
- Compatibility with mjshi NPCDialogueShop: My plugin removed the common event command. Now it will also add the common event command when mjshi's plugin is installed aswell.
Please place this plugin under mjshi's plugin.
Edit 5:
Added functionality for granting discounts under certain conditions.
Shops keep track on #Total items sold, #Individual items sold, #Times visited.
Edit 6:
Fixed very big bug. This plugin didn't pass the plugin command and it's arguments to other plugins.
Examples for discount conditions:
this.getNumberBoughtOf(kind, id) >= 3 Means #individual items sold >= 3
this._nrOfVisits == 3
this._totalItemsBought == 100
Discount percentages stack by multiplying them, e.g. if the conditions for 10% and another 20% are fulfilled, this does not mean a discount of 30%, but rather only 28% as
e.g. if the original price = 100:
100 * (1 - 10 / 100) = 90
90 * (1 - 20 / 100) = 72
Edit 7:- Fixed a bug, that make normal shops being opened endlessly.
- Added custom selling prices. If not given half of the custom buying price is taken as selling price. If this is not given either half of the price from the database is taken as selling price just like the default behaviour.
The resulting price is rounded down, in case it is a floating point number.
The plugin now has version 1.5.
Edit 8:
Sold out text was not displayed when using different currencies via YEP_X_MoreCurrencies.
The plugin has now version 1.6. The Sold Out Text will overrule the more currencies.
Edit 9:
Some fixes around custom selling prices.
Plugin is now version 1.9.
Edit 10:
Today I had the idea of creating a switch shop without the need to buy an item first. Luckily it was possible.
So introducing the new plugin parameters:
Switch on text: Text to be displayed instead of the price for a switch that has already been bought and is set to on.
Switch off text: Text to be displayed instead of the price for a switch that has already been bought and is set to off.
Switches: The switches sold by the shop.

A shop good of type switch cannot be sold, so it has no selling price and as the buying price cannot be defined
elsewhere the UseCustomPrice flag is not needed. I hope I decribed the rest of the plugin parameters good enough
within the plugin itself:

The final result looks like this when the switch has not been bought yet:

Once bought it is set to on and in case it is toggable you can set it to on/off just by pressing on the item:

With this it is now v2.0.
I saw, that this could open up so much new potential (like e.g. Variable Shops, BGM Shops, etc.) in the future.
If I find the time I may implement further kinds of shop goods like the discounts did.
I hope this doesn't break existing projects.
Edit 11:
v2.1: Extension to YEP_ItemCore. Allows to buy independent items.
Edit 12:
v2.1.1 Small fixes around empty shops and the default shop.
Edit 13:
v2.1.2
- Updated help section. Plugin command is actually names "RefillShopStock <name>" instead of "RefillStock <name>"
- Fixed a bug around independ shop goods and the stock refill. I deleted the independ items from the memory even the party already bought them. Now I don't do this anymore.
Edit 14:
v2.2.0
-New plugin command Refill<Kind>Stock "<Name>" Id Quantity:
Refills a single shop good of the given kind in the shop with the given name by the given quantity. It will not exceed the maximum quantity. It currently does only work if the plugin parameter GroupItemsWithLimitedStock is set to true (Yes). The shop name must be placed into quotes as it allowes single white spaces between parts of it's name.
Edit 15:
Should now be compatible with MV 1.5.1
Edit 16:
Had to rework this plugin in order to find other workarounds for compatibility issues with Yanfly plugins rather than copying the code that still needs to be called and leaving out the rest as it is prohibited by the terms of use of Yanfly plugins and I guess also by copyright. I just want to avoid making me to have to take this plugin down. Yet I still hope this is just a minor issue as my plugin is given away for free.
While doing this and veryfying in a test project that everything is still working as intended by me I found out that the following parameter of YEP_ShopMenuCore is not working if NPCDialogueShop is installed aswell:

Off course I cannot solve this issue. As NPCDialogueShop seems to only work in conjuction with YEP_ShopMenuCore if placed under it and it overwrites a bunch of functions without aliasing them, there would be no way to workaround this without copying the YEP code around this parameter, which I clearly do not want to do.
So I added a plugin parameter to my plugin to allow adding the equip command again to the shop menu (Default Value = On).
Also if YEP_ShopMenuCore + NPCDialogueShop + BO_Shops are all used within your project the custom commands will also be added and the commands are placed exactly in the order of this screenshot.
Edit 17:
Renamed downloadable plugin BO_Shops => BO_CustomShops. If you have it already in use, you can rename it back to BO_Shops after downloading in order to not loose all your plugin parameters.
BO_CustomShopsXL is an extended version, because I've got ideas. Some of the ideas are not compatible to the old BO_CustomShops. That is why I've created it as a seperate plugin. The XL version is also not compatible with YEP_X_MoreCurrencies and YEP_X_CondShopPrices anymore. It is still compatible with any other plugin BO_Shops was also compatible with.
I've also updated my shop category customization plugin found at https://forums.rpgmakerweb.com/index.php?threads/shop-category-customization.121309/#post-1065982 to be compatible with the XL version of BO_CustomShops.
If you rename BO_CustomShops to BO_Shops after the download you need to replace the following line in the code
BurningOrca.Shops.Parameters = PluginManager.parameters('BO_CustomShops'); with BurningOrca.Shops.Parameters = PluginManager.parameters('BO_Shops');
Edit 18:
Compatibility fix of switch shops with MKR_ShopItemMessage.
Found bug in XL version: Item descriptions have not been displayed anymore.
Edit 19:
Fixed a bug in XL to make it work without YEP_CoreEngine being used.
Edit 20:
Updated XL, as it had some math errors. Obviously calling Math.log10 and passing a value of 0 is not a good idea.
Edit 21:
Fixed a typo: $dataArmors instead of $dataArmor.
Edit 22:
- Small performance upgrade in BO_CustomShops. Call this.price() only once in Window_ShopBuy.prototype.drawBuyPrice extension.
- Compatibility fix in BO_CustomShopsXL with ShadowDragon_EC (Easy Currency).
Edit 23:
Found bug in Plugin Command RefillItemStock.
Edit 24:
Changed my mind form yesterday and ported XL to MZ. However I cannot support this plugin as it my trial license will run out tomorrow. The upload is just experimental.
Found a lot of bugs in XL. Severe ones. Shops weren't even working after loading a safe file.
Edit 25:
Yet again introduced a small little bug with the fixes in XL yesterday.
Edit 26:
I've taken the MZ version down, after I've read through Tsukihimes Shop Inventory plugin thread. Not only can I not support BO_CustomShopMZ, because my trial run out, but also just from what I've read Tsukihimes plugin will become amazing. I normally don't like to compete with others on the same topic. Her Shop Manager for MV was already good, just not what I wanted and that is why the original BO_Shops was born. That is the only time I've started a competition.
Edit 27:
I've found two bugs in XL both only in Shops that have the stock refill type set to "Add additional Stock".
1) Discounts where applied each time the shop has been opened unless a "Stock Refil"l happend.
2) If a shop has been opened and no "Stock Refill" happened, then the previous stock got lost.
I actually didn't really test if the bugs really exist, but assumed it by looking into my code.
I've also reworked the code of XL slighly to be a little simpler, but still have the same functionality.
It is now Version 2.0.
Because of the rework it will remove a variable from the saved shops, when loading a save file which has been saved with the previous version from XL and cause a "Stock Refill" on all saved shops in order to be inline with the changes. Therefore I recommend you to not get the new version unless absolutely needed.
Attachments
-
68.8 KB Views: 21
-
106 KB Views: 3
Last edited:






