Selling items in shop processing by bulk

Is it possible to setup the shop processing so a player can buy more than 1 item at a time? I want to sell "arrows" by increments of 10 for 1 gold.
You want it LISTED on the 'buy' screen as 10 arrows?


You can already buy multiples of items by using the up/down/page up/page down keys. I'm sure you know that already.


Anything else would require a script, and you would have to provide more detail about how to determine which items can be sold in bulk, how many make up one "unit" and the price. Also whether it should affect the selling screen as well.


Actually, I just noticed your thread title talks about SELLING items and your post talks about BUYING them. So if I've used strange wording in relation to buy/sell above, that's what confused me 🙂
I think actually it's possible to make "bulk" buy by simply changing the price buy formulla in the scene_shop and for make different item we can use that

def somethingcase item_idwhen 1, 3,4,5,6,10price_formula /bulk #ectendendand the section who handle buy  formula is here

#-------------------------------------------------------------------------- # * Execute Purchase #-------------------------------------------------------------------------- def do_buy(number) $game_party.lose_gold(number * buying_price) $game_party.gain_item(@item, number) endbut it's can be a little hard to do for my opinion it would not be really pro efficient in your shop :/
A bit awkward, but doable using a variable switch.

item in the database simply described as e.g. "A bundle of 10 arrows".

Do whatever an arrow does, but in addition, have it call a common event.

In the common event each use decreases a variable by one.

When it hits zero, it removes a bundle from the inventory and resets the variable to 10 for the next bundle.
A bit awkward, but doable using a variable switch.

item in the database simply described as e.g. "A bundle of 10 arrows".

Do whatever an arrow does, but in addition, have it call a common event.

In the common event each use decreases a variable by one.

When it hits zero, it removes a bundle from the inventory and resets the variable to 10 for the next bundle.

I already had done this, but as you pointed out, it was too awkward. @Shaz, The issue with buying in bulk is that the lowest value an item can have in the game (1 gold by default) is just too much in my game for a single arrow, and I was hoping to not have to redo the whole pricing and reward system to account for this.

@Nio, that's interesting, I will look into that!

Can't believe this issue hasn't arisen before!
All you need is this:

arrows.png

Set it to parallel process in your stores, shouldn't cause any frame rate problems in stores, but add waits as necessary.

You will also likely need a script that raises the item cap (past 99), Hime has one if you don't already: http://himeworks.com/2013/10/item-stack-sizes/

Edit: Or you could do it like this so it doesn't need to process as many times making it (most likely) impossible for the player to see the stacks in their inventory or to have so many they move away from the parallel process(leave the store):Arrow2.png
Thanks, I already have a script to set arrows not to count towards inventory. I'll test soon, looks very nice; creative solution!

I won't need a parallel process, right, I can just have it check after the shop processing is over with a loop and conditional branch?
Thanks, I already have a script to set arrows not to count towards inventory. I'll test soon, looks very nice; creative solution!

I won't need a parallel process, right, I can just have it check after the shop processing is over with a loop and conditional branch?
Most likely, I didn't test it like that though.
Common events don't run in shop scenes anyway.

Original thread: https://forums.rpgmakerweb.com/threads/selling-items-in-shop-processing-by-bulk.41211/