EIS Shop System

● ARCHIVED · READ-ONLY
Started by Kino 20 posts View original ↗
  1. Intro:


    This plugin handles managing shops in the game giving you more shop features.


    Version: 1.00


    Features:

    • Randomized Shops
    • Adjusting Shop sell prices
    • Shops with item stock
    • restocking item shops
    • Adjusting randomized item prices

    Instructions:

    1. Install the script with the same name: EISShopSystem.js
    2. Add the buttons via script call either through common event or by an event on the map.
    3. Have fun!



    /* Helpers
    * Manager Helpers
    * KR.ShopManager.createSellShop()
    * -Creates a shop you can only sell items to.
    *
    * KR.ShopManager.adjustSellPrice(sellPoint);
    * - This adjusts the sellprice for the shop by a percentage amount.
    * Example: KR.ShopManager.adjustSellPrice(2.0)
    * The above doubles the amount items sell for in game based off their original buy price.
    * Note: setting it to 0.0 will default to the game's original setting of half the buy price.
    *
    * KR.ShopManager.createRandomizedPriceShop(buyMin, buyMax, sellMin, sellMax)
    * -This shop sets a shop with randomized item prices. Everytime you enter the shop
    * the price changes for both buy and sell based on the above parameters.
    * Example: KR.ShopManager.createRandomizedPriceShop(0, 999, 200, 300);
    *
    * KR.ShopManager.customizeItemBuyPrice(itemInformation)
    * -This changes the item buy price based on it's position in the list. This also overrides
    * the regular shops buying prices for that item.
    * Example: KR.ShopManager.customizeItemBuyPrice([2,'random', 50, 100],[1, 'random', 35, 75]);
    *
    * KR.ShopManager.createStockableShop(shopId, itemInformation,);
    * This creates a shop with stock for a specific item with that id.
    * Example: KR.ShopManager.createStockableShop(1, ['item', 1, 3])
    * This would set the stock for an 'item' type item with the id 1 to 3.
    * Note: You can have items with no stock alongside items with stock.
    *
    * KR.ShopManager.restockShop(shopId, itemInformation)
    * This restocks an item at the shop with that specified ID.
    * Example: KR.ShopManager.restockShop(1, ['item',1, 20], ['item', 6, 20]);
    * The above would add 20 to the current stock of shop 1 with the item id of 1.
    * Note: Items sold to a stock shop, update the shops current stock for that item
    * if it is in the buy window.
    *
    * Extra Notes: You can combine some of these directives together when creating your shop.
    */


    Setup Example Windows:

    Spoiler
    Screenshot_2.png


    Screenshot_1.png





    In-game Examples:


    Spoiler
    Screenshot_3.png
     


    Please download the attached file to use the plugin.


    View attachment EISShopSystem.js


    Updated 6/17/2016



    Credits:


    Free for both commercial and non-commercial use.Credit with the name Kino or EIS.


    Thanks:Thank you to anyone who decides to use this script; I appreciate it!


    If there are any bugs/issue, please contact me via message on the forums. I want to try and make the script as extensible/flexible as possible, so if you have an ideas also


    please message me.


    Enjoy ~
  2. I can use this section very well as it suits me nicely.


    * KR.ShopManager.customizeItemBuyPrice(itemInformation)
    * -This changes the item buy price based on it's position in the list. This also overrides
    * the regular shops buying prices for that item.
    * Example: KR.ShopManager.customizeItemBuyPrice([2,'random', 50, 100],[1, 'random', 35, 75]);



    However i'd love to do the same thing when selling an item and have that type of control.


    Would it be to difficult to add?


    Also within the shop as well, I don't want the prices to reset everything time the shop event is triggered. It'd like to use another trigger before the prices change (say time of day, or lock for 10 minutes with a timer), so you can still repeatedly use the shop but the prices change when other conditions are met. Is this possible with your script or is it an event i'd need to setup? Without it you could spam the shop until you get the price you wanted!
  3. Right now there's no way to control that eternally in the system; there are a few people who can offer time based events  though I think.


    That way you can have more control of when the shop is open; I will see what I  can do though for randomizing sell prices.


    @Soulnet


    There have been updates. I added clamping for buying items with stock.
    You can also control item selling prices with the random tag using, similar to the above.


    Looks like this: 

    Code:
    /*
    * KR.ShopManager.customizeItemSellPrice(['item',1,'random', 333, 444]);
    * item refers to the type.
    * 1 refers to the ID in the database.
    * random is the tag, to do min max randomization of price.
    /

    Code:
    /*
    * KR.ShopManager.customizeItemSellPrice(['item',1,'random', 333, 444]);
    * item refers to the type.
    * 1 refers to the ID in the database.
    * random is the tag, to do min max randomization of price.
    /
  4. BD
  5. Glad this plugin was helpful to you!
  6. Do you think you could do a patch for Yanfly's Shop Menu plugin?


    If so I could definitely use this plugin in my game! :3
  7. There is a conflict with ShopMenuCore yanfly.
  8. Hey!


    Thanks for this script!


    I'm getting an error though, could you tell me what I'm doing wrong, please?


    TIA

    error.png

    f8console.png

    plugin.png
  9. Remove the ) after the first bracketed item. [item, 7,3] instead of [item, 7, 3]).
  10. Kino said:
    Remove the ) after the first bracketed item. [item, 7,3] instead of [item, 7, 3]).

    Thanks!


    I figured it would be stupidly simple, but I was turning plugins off and on like there was no tomorrow, lol.


    Great script, it's just what I needed!
  11. Glad I could help!  I'll be working on an updated version  soon. 
  12. KR.ShopManager.customizeItemSellPrice(['item',1,'random', 333, 444]);


    Nothing worked


    The selling price is not a random set of values, but the buying price

    123.png
  13. @Rice_Master I'll take a look at this for you.
  14. Hey, I just noticed that creating a  stockable shop it won't matter if I have money or not, I will be able to buy the items anyway.


    In my case I had one roasted duck(100G) and three fried rice(10G).


    I only had 27G, but I paid for the roasted duck and was able to buy it, it just took the 27G from me.


    Then without any G left, I was still able to buy the 3 fried rice.


    So I created a new project, created a stockable shop with 3 potions (50G) and one magic water(100G).


    Gave the hero 25G and playtested.


    Same result, with only 25G I was able to buy 250G worth of stuff.
  15. Hey, I'm trying to use this plugin, but it seems to not quite be working anymore.
    I've set up shops to have limited stock of items, but when I go to the shop the player can still buy 99x the item.
    No error logs, since it's not throwing any errors. It just seems to be ignoring the script call entirely. I even tried turning off Yanfly's Shop plugin, in case there was an incompatibility - no luck, still happened.
  16. Kino said:
    Intro:


    This plugin handles managing shops in the game giving you more shop features.


    Version: 1.00


    Features:

    • Randomized Shops

    • Adjusting Shop sell prices

    • Shops with item stock

    • restocking item shops

    • Adjusting randomized item prices

    Instructions:

    1. Install the script with the same name: EISShopSystem.js

    2. Add the buttons via script call either through common event or by an event on the map.

    3. Have fun!



    /* Helpers
    * Manager Helpers
    * KR.ShopManager.createSellShop()
    * -Creates a shop you can only sell items to.
    *
    * KR.ShopManager.adjustSellPrice(sellPoint);
    * - This adjusts the sellprice for the shop by a percentage amount.
    * Example: KR.ShopManager.adjustSellPrice(2.0)
    * The above doubles the amount items sell for in game based off their original buy price.
    * Note: setting it to 0.0 will default to the game's original setting of half the buy price.
    *
    * KR.ShopManager.createRandomizedPriceShop(buyMin, buyMax, sellMin, sellMax)
    * -This shop sets a shop with randomized item prices. Everytime you enter the shop
    * the price changes for both buy and sell based on the above parameters.
    * Example: KR.ShopManager.createRandomizedPriceShop(0, 999, 200, 300);
    *
    * KR.ShopManager.customizeItemBuyPrice(itemInformation)
    * -This changes the item buy price based on it's position in the list. This also overrides
    * the regular shops buying prices for that item.
    * Example: KR.ShopManager.customizeItemBuyPrice([2,'random', 50, 100],[1, 'random', 35, 75]);
    *
    * KR.ShopManager.createStockableShop(shopId, itemInformation,);
    * This creates a shop with stock for a specific item with that id.
    * Example: KR.ShopManager.createStockableShop(1, ['item', 1, 3])
    * This would set the stock for an 'item' type item with the id 1 to 3.
    * Note: You can have items with no stock alongside items with stock.
    *
    * KR.ShopManager.restockShop(shopId, itemInformation)
    * This restocks an item at the shop with that specified ID.
    * Example: KR.ShopManager.restockShop(1, ['item',1, 20], ['item', 6, 20]);
    * The above would add 20 to the current stock of shop 1 with the item id of 1.
    * Note: Items sold to a stock shop, update the shops current stock for that item
    * if it is in the buy window.
    *
    * Extra Notes: You can combine some of these directives together when creating your shop.
    */


    Setup Example Windows:

    Spoiler
    View attachment 40341


    View attachment 40342





    In-game Examples:


    Spoiler
    View attachment 40343


    Please download the attached file to use the plugin.


    View attachment 40521


    Updated 6/17/2016



    Credits:



    Free for both commercial and non-commercial use.Credit with the name Kino or EIS.


    Thanks:Thank you to anyone who decides to use this script; I appreciate it!


    If there are any bugs/issue, please contact me via message on the forums. I want to try and make the script as extensible/flexible as possible, so if you have an ideas also


    please message me.


    Enjoy ~
    How to make Stock for Key Item like recipe book?
  17. ricohartadinata said:
    How to make Stock for Key Item like recipe book?
    Did you ever find a solution?? This plugin has worked perfectly for me, except it doesn't work for Key Items :/
  18. I'll be reworking this system under a new name for MV/MZ so stay tuned.
  19. I can't get the customize price commands for buy or sell to work. Not sure what the item information is, and the examples given are inconsistent with each other. Still, copied the examples (with my own information) and nothing is working.
    Here is the code I'm using:


    KR.ShopManager.customizeItemBuyPrice([16,'random', 190, 300],[17, 'random', 25, 75],[18, 'random', 40, 150])

    Also, why on earth is this causing my game to open a developer tools chrome extension whenever I start a new game? See image for what I mean.

    1.png
  20. markp80nj said:
    Hey, I just noticed that creating a stockable shop it won't matter if I have money or not, I will be able to buy the items anyway.
    SOLUTION:

    Find this string in script:

    Scene_Shop.prototype.doBuy = function(number)etc...

    Add this before it:
    switch (this._commandWindow.currentSymbol()){ case 'buy': if($gameParty.gold() > (this._numberWindow.number() * this.buyingPrice())){ SoundManager.playShop(); this.doBuy(this._numberWindow.number()); } else{ SoundManager.playBuzzer(); } break; case 'sell': SoundManager.playShop(); this.doSell(this._numberWindow.number()); break; } this.endNumberInput(); this._goldWindow.refresh(); this._statusWindow.refresh(); };

    Not testing mutch but it works. Hope it help someone.