Does this plugin fullfill some of your needs?


  • Total voters
    15
  • Poll closed .

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
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.

Plugin Parameters.PNG

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:
Shop Infinite.PNG
If it is not infinite it will display the stock quantity minus the number you've selected to buy:
Shop Limited.PNG

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.

Switch Shop.PNG

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:
Switch Shop Good.PNG

The final result looks like this when the switch has not been bought yet:
Not yet bought switch.PNG
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:
Bought Switch Toggable Off.PNG

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:
1585991733564.png
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.
 

Attachments

Last edited:

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,182
Reaction score
1,439
First Language
English
Primarily Uses
Other
@BurningOrca You, good sir, have done the work of the gods- a limited stock plugin AND a non-mobile use for those button graphics?! Bless you!
 

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,182
Reaction score
1,439
First Language
English
Primarily Uses
Other
@BurningOrca I know they are RTP- I am just glad someone created a use for them outside of launched RM mobile games.
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
@JtheDuelist But my plugin does not change anything in the ShopNumber Windows layout except adding the "Available Items" text.
I deactivated every plugin except mine and buttons are still shown in this window, so they must be the default even in non mobile environments.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
@BurningOrca This shop Idea might work nicely, but i got 2 questions.
1) if the stock is out of order, will it say "Out of Stock" or "Sold Out"? (or costumize it)
2) is it possible to make only the buy option that only sells "key items" (not weapons, Armor, Items)
if the possibility is there?

remove the buttons can easely be done by editing the system window if not giving an error.
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
@ShowDragon
1) Currently not, it just disables the command slots for the sold out items.
2) Just add only the key items you want to buy from the shop in the plugin parameters. Then change it to a buy only shop.

Definition of Key Item Shop (Buy Only):
Key Item.PNG

Plugin Command:
Plugin Command.PNG

Actual shop layout with no other plugin installed:
Key Item Shop.PNG

Question back:
Where should I put the "Sold out" if I would implement it?

Also while I was testing this I realized, that my shop names cannot have white space in them, because that doesn't work with the plugin command. I need to change this somehow.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
@BurningOrca is it possible to implement out of stock instead grey out or remove from stock when item = 0?

The stock out can be on the spot where the price is normally displayed
so for example:
Key Item 1 - 500
Key Item 2 - Sold Out

or a other way like "Sold" or other name, not more than 8 characters.

EDIT: the shop plugin of mjshi "found here" and this one, can give it a bust image as
well. and this is exacly very nice. specially because that one dont have a stock amount
included, so combined is 1 heck of a shop setup.

Now I dont know if this is even possible for multiple layouts. but the good thing
is, I only need 1 ^^ and its working smoothly.

Keep up the good work ^^ Probably the best shop plugin out there atm.
 
Last edited:

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
@ShowDragon:
I could implement the following compromise solution with 2 new plugin parameters:
As long as the shop is kept open the fields are only grayed out. The text (Sold Out: customizable via plugin parameter) will be added to the help window text when the whole stock is empty:
Key Item Shop.PNG
Then if the other new plugin parameter is set, the next time the shop is opened, it is completely empty:
Key Item Shop Sold Out.PNG

I hope this compromise will be enough.

Edit: Instead of the price is good idea. I will add this.
Edit 2: I now implemented your suggestion to replace the price with sold out.
I do not know if can limit this to only 8 characters, so I'll let it as it is for the time being.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
@BurningOrca 1, its not ShowDragon but ShadowDragon =)
I tested it, but there is probably 1 error somewhere, in your parameter, you can showsold out text
to true or false, but either one is the same and keep showing "Sold Out" even when false, but other
than that, Test (Sold Out) is only visible if no description is given. but sold out where the 0 is, works perfectly.

Thank you for this nice quick edit. Im very Happy of the outcome. Keep it up.

(dont forget to change version number) its 1.0 and its still 1.0 (so make it 1.0.1 or whatever you like, so the
peoples knows that its been edited (bug fixed, addings etc)
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
@ShadowDragon Sorry for the typing errors, I really didn't mean to call you ShowDragon.
The text will always be shown. The Parameter set to 'No' will remove the items completely from the list, the next time you visit the shop.
I will change the version number and add the history before I request to move this to the released plugins forum.

Edit:
I am not good with user interface layout. So I decided to use the help window for the shop name instead of creating an own window. The drawback is as you mentioned, that the item descriptions will overrule the shop name.
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
Sorry for posting under myself, but everyone who already downloaded this, please get the new version!!!
I had a very serious bug, that I just found today.
This plugin didn't pass the plugin command and it's parameters to other plugins, so all other plugin commands didn't work.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
I didn't notice that one, good job finding it, also, you can only post under yourself if its longer than 72 hours :)
but im going to download the new version. ^^.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
i got a weird syntax error of unexpected token u in JSON at position 0

SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Data_Shop.initialize (BO_Shops.js:486)
at new Data_Shop (BO_Shops.js:438)
at Data_Shops.initialize (BO_Shops.js:428)
at new Data_Shops (BO_Shops.js:412)
at Function.DataManager.isDatabaseLoaded (BO_Shops.js:375)
at Function.DataManager.isDatabaseLoaded (SRD_MapSlipDamage.js:260)
at Scene_Boot.isReady (rpg_scenes.js:374)
at Function.SceneManager.updateScene (rpg_managers.js:2018)
at Function.SceneManager.updateMain (rpg_managers.js:1983)

I have no clue why its happening though
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
Sorry for the late answer:
Could you make screenshots of the plugin parameters, or post the text form of one shop, please?
Maybe this is due the discounts I added to the plugin parameters in a later version.
If so please try to click once at each shops discount option and press okay afterwards.
If this doesn't help and you do not have many shops, maybe redefining all the shops may help.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
it happend when i aded a new plugin and when it has 1 item on it, when I added 2 more items, it seems to
solved, but when i go down to 1 item, it get the error again, idk why though, when i turn off the new plugin and retest it,
it gives the same error with only 1 item in stock, But i can make a screenshot later the day.
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
143
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
Can you define which items shop buys and it's price? for ex. can I sell quest items for a higher prices compared to other shops?
 

BurningOrca

Veteran
Veteran
Joined
Apr 14, 2019
Messages
208
Reaction score
179
First Language
German
Primarily Uses
RMMV
@ShadowDragon That is strange. I use it too, with a shop that only has 1 item and it works just fine.
Could you maybe also test if it works in a new project or if the same error will happen?
Edit:
I had a look at line 486 and that really is the discound like I tought.

Please try the following:
1. Go to the plugin parameters.
2. Open each Shop.
3. Switch to the text form
4. Check if the following text appears right infront of the last closing } bracket:
,"Discounts":""
5. If not add it.

@kako05: Sorry, not 100% like you want it to:
- You can add items which you can buy from the shop and change their price
- You can set a shop to Sell Only so you cannot buy items from it, but sell items to it
- You can set the shop to only buy items from you which it also sells to you.
So if you have a SellOnly shop with all this criteria you can basically set up a shop that only accept certain items, but the custom buying price is currently not taken over to the selling price. This is the same as with normal shops and custom buying prices. Sorry I didn't know that.
If wished I can make it that somehow half of the custom buying price is set as selling price or add a new plugin parameter selling price to each item/weapon/armor.
If wished I could also change it to using the item/weapons/armors defined in the plugin parameters to be used as the items for sell only shops.

Edit:
I uploaded a new version that supports custom selling prices, but I kept it the way, that the shop accepts every single item from you if you do not set the appropriate plugin parameter, even the shop is set to sell only.
I changed the default of the discounts plugin parameter.
Hopefully this fixes the bug with the discounts and does not introduce new problems.
 
Last edited:

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
143
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
Awesome! Great :)
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,439
Reaction score
814
First Language
Dutch
Primarily Uses
RMMV
it was there, but placing the new updated version and it was gone. but i will keep that in mind, but im not sure what
the token u of position 0 means though. otherwise, good job of the new plugin param, can be of good use. =)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

It seems to me that I'm too lazy to make new MZ plugins with my full time job, so I'm porting my easy, simple and small MV plugins instead.
I hope I can port 1-2 such plugins per day, but this will be hard for me :)
just mechin' around this morning - MZ edit, feel free to use, must own MZ
I think it is absolutely adorable how Korone says "Eekum Bokum" and the fact she seems so amused by it. :LZSproud:

Justice is "Just ice" without a space
Hi, I was only a silent reader for years, finally I decided to create an account. Greetings all. :)

Forum statistics

Threads
103,308
Messages
998,689
Members
134,818
Latest member
robwork
Top