Jump to content

Recommended Posts

Shop Stock

-Tsukihime

 

This script adds a "stock" count to each shop good.

Once a shop good's stock reaches 0, it will no longer be available in the shop.

 

The stock is set up for individual shops. One shop's stock does not affect another shop's stock.

The stock is only setup once: if you leave and come back, the stock remains the same

 

Get it at Hime Works

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Not right now. You can use script calls to increase/decrease stock if you want but it's not very user-friendly

# get the shop located at map 1, event 4
shop = ShopManager.get_shop(1, 4)

# increase the stock of shopGood at index 0 by 2
shop.shop_goods[0].increase_stock(2)

Index 0 would be the first shopItem, index 1 would be the second, etc.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Sorry I updated the Shop Manager but then forgot about this script.

I have updated the script so that it doesn't crash. Get a new copy of the script and try again.

 

Thanks.

Well, it works, but... There's another problem...

 

046I8cY.jpg

 

Is there any way to change the location of the list of available items? >_>

Share this post


Link to post
Share on other sites

At line 137, you can say


def draw_item(index)

th_shop_stock_draw_item(index)

rect = item_rect(index)

item = @data[index]

shopGood = @goods[item]

draw_text(rect.x + 52, rect.y, rect.width, line_height, shopGood.stock, 1) unless shopGood.unlimited?

end

Which allows you to change the x position of the stock count.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×