Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,041
Reaction score
4,654
First Language
English
Primarily Uses
RMMZ
Limited Stock Shop v1.02
Trilobytes by Trihan

Introduction
This plugin allows you to set up shops which sell finite quantities of various game items, useful for if you want a unique item that will only be sold once, limits on purchases of powerful items, or an NPC that shows up in different places with new stock each time.

Features
  • Set up a shop with limited inventory of any combination of items, weapons and armours, with the option of using the database price or specifying your own
  • Add or remove stock to an existing limited shop
  • Change prices without affecting inventory
  • Set up automatic restocking, either on a per-item basis or with a default frame delay*
  • Choose a random selection of items from the available pool, either once or every time you visit*
* premium version only

Screenshots
shop1.png
shop2.png
shop3.png

How to Use
Download the .js file for the plugin, add it to an empty slot in the plugin manager, set up parameters to your liking, and read the help file for usage instructions and an example setup.

Plugin Commands / Script Calls
  • Set Shop Stock - allows initial setup of a limited shop. There are arguments for map ID and event ID, allowing for remote setups. If you use this command in the event that acts as a shop prior to the Shop Processing command, only the first visit will perform shop setup; subsequent interactions will ignore it.
  • Add to Stock - Adds items to an existing shop.
  • Add to Stock (with price setting) - Adds items to an existing shop, with the option to modify prices.
  • Remove from Stock - Subtracts stock from the shop. An argument is provided to either remove the item from the shop entirely when sold out, or to display "SOLD OUT" text while keeping the item visible (this text can be modified via plugin parameters)
  • Change Prices - Allows price changes without affecting the inventory or stock levels.

Demo

Download
You can obtain the free or premium version of the plugin from itch.io

Terms and Credits
The free version of the plugin can be used in non-profit games; the premium version can be used in both non-profit and commercial projects. In either case, please credit Trilobytes or Trihan. Full terms of use are listed in the help section of the plugin file.
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
Perfect, was actually looking for something like this yesterday o_O

Not much point having Unique equipment if you can buy several xD
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,041
Reaction score
4,654
First Language
English
Primarily Uses
RMMZ
Perfect, was actually looking for something like this yesterday o_O

Not much point having Unique equipment if you can buy several xD
Is the feature set sufficient for your needs or is there anything it doesn't do that you'd like to have?
 

Willibab

The Lord of Whackery
Veteran
Joined
Jun 22, 2017
Messages
540
Reaction score
1,369
First Language
Norwegian
Primarily Uses
RMMZ
Is the feature set sufficient for your needs or is there anything it doesn't do that you'd like to have?

Seems fine to me, I was basically just interested in limited stock tbh :p

Might have use for the random stock later though, that seems interesting.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,041
Reaction score
4,654
First Language
English
Primarily Uses
RMMZ
Seems fine to me, I was basically just interested in limited stock tbh :p

Might have use for the random stock later though, that seems interesting.
Yeah, it wasn't originally planned but one of the testers suggested it.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,865
Reaction score
12,410
First Language
English
Primarily Uses
RMMZ
My hero!
Best £5 I've spent in a long time.

EDIT
I've had a thought.
Restocking is after a certain time. Is there a way to get it to restock after an event/story point using a switch? I have no way of knowing how long it will take the player to get to that point, so a switch would be easier.
Thanks.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,041
Reaction score
4,654
First Language
English
Primarily Uses
RMMZ
My hero!
Best £5 I've spent in a long time.

EDIT
I've had a thought.
Restocking is after a certain time. Is there a way to get it to restock after an event/story point using a switch? I have no way of knowing how long it will take the player to get to that point, so a switch would be easier.
Thanks.
Thanks Kes! Your custom is appreciated.

I can certainly add that as a feature in the next version. How would you want that to work?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,865
Reaction score
12,410
First Language
English
Primarily Uses
RMMZ
All I would want is to be able to specify a switch to restock, rather than just a timer. I would like to be able to have some which restock and some which don't.

But I'm having problems with the restock thing even in the current version. In plugin parameters it says (default restock time) that if I don't want it to restock, then I should specify -1. The problem comes from the fact that the click thing on the side of the box will increase the number above zero but will not decrease it below zero. Nor can -1 be typed in as the box does not seem to recognise the minus sign.

But more basic still, when I put in a create shop event I get this error message

EDIT No I don't, I just had to start a new game, not pick up from a save file.
 

Attachments

  • 1656947722428.png
    1656947722428.png
    21.5 KB · Views: 4
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,041
Reaction score
4,654
First Language
English
Primarily Uses
RMMZ
All I would want is to be able to specify a switch to restock, rather than just a timer. I would like to be able to have some which restock and some which don't.

But I'm having problems with the restock thing even in the current version. In plugin parameters it says (default restock time) that if I don't want it to restock, then I should specify -1. The problem comes from the fact that the click thing on the side of the box will increase the number above zero but will not decrease it below zero. Nor can -1 be typed in as the box does not seem to recognise the minus sign.

But more basic still, when I put in a create shop event I get this error message

EDIT No I don't, I just had to start a new game, not pick up from a save file.
Ah yeah, sorry. I had to change it because it used to be 0 but then you can't turn automatic restocking off at all, it was somewhat of a compromise. In order to put -1 in the box, you have to switch the input type in the parameter from "number" to "text" and it will let you. There are little tabs above the input box.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,865
Reaction score
12,410
First Language
English
Primarily Uses
RMMZ
And done.
Thank you.
Maybe put that in the help file?
 

Latest Threads

Latest Posts

Latest Profile Posts

ScreenShot_8_19_2022_8_51_4.png
Both Mike and Ray here are in a "HYPE!" state after Mike uses "Wild Party", which also heals everyone. they'll do more damage and counter more often, but defense is lower along with hit rate.
WHEEL3.gif
Ooker spookers and fun attack mechanics! What a Friday!
Not today... Not today...
I guess I should send my CV to Hasbro. I've made Monopoly cheaters edition more fun and challenging. I've developed custom cheats and chest/chance cards for it. And I've cleared many nightmares through my cards and rules.
I'm only missing 2 more bgms for my game but maaaaan, searching for these tracks is killing me. Can't find anything good to replace MZ's Theme 2 and Scene 5 I have as placeholders. Everything is too epic or too evil or too alarming. That 'scene 5' track in particular would fit nicely with my scene. Well, at least I finally figured what my last click-fest of a gameplay element will be like, so something positive :D

Forum statistics

Threads
124,707
Messages
1,165,417
Members
163,520
Latest member
Foxx042
Top