Additions
1. Price formulas. More info at
http://forums.rpgmakerweb.com/index.php?/topic/19317-shop-option-price-formulas/
2. I have noticed that some people want "easier" ways to add items to the shop list. I have provided the following script call:
add_shop_good(good_id, item_type, item_id)add_shop_good(good_id, item_type, item_id, price)Where the good_id is the ID you want to assign to the shop good, the item_type is one of the following
And the price is the price you want it to be available at.If you don't specify a price, then the default is used (based on what you set in the database)
You call it like this
add_shop_good(4, :weapon, 10)This will add weapon 10 at the default price, assigned as good #4.Since this is a script call, you can use any ruby scripting that you want to add goods to the shop.
You can then apply shop options as usual using that "good ID".
Note that the good ID is something that you need to manage yourself because if I randomly generate one for you, then you don't really have a way to specify the shop options.
In development
Currently designing and developing the following features
Shop Callback Functions
"Shop Callbacks" allow you to assign custom logic to a variety of "triggers" that occur in the shop scene. You can assign methods to each trigger and the method will be called when a trigger is fired. A list of triggers include
- buy an item
- sell an item
- leave store without buying or selling anything
Shop HistoryKeeps track of your "shopping activity", which basically allows each shop to keep a history of everything you've bought and sold, how many times you've visited the shop, what you bought or sold in your most recent session, and so on.
My current design has it so that "what you bought or sold in your most recent session" will be cleared out when the shop scene is loaded. This means that you can do the following
-buy something, and then when you exit the shop, have conditional branches check what you bought
-the next time you re-visit the shop, you can have conditional branches check things BEFORE the shop scene loads (since what you bought last session is still saved)
Shop history can be combined with the callback functions to do something like conditional checks depending on what you bought or sold, or preventing a player from selling more than 10 of an item at the same store or something.