设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 89|回复: 0

[转载发布] Burning Orca Shops

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7523

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29053
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    37470

    灌水之王

    发表于 3 小时前 | 显示全部楼层 |阅读模式
    First of all I know Tsukihime has written a Shop Manager and propably other authors have done similar things
    and I didn't think I would be able to do the same, but it actually didn't take that long.

    Terms of Use:
    As always totally free for commercial and non-commercial use and it doesn't need credits.

    Features:
    - Define entire shops in the plugin parameters (Yes that is the difference between my plugin and Tsukihimes ShopManager)
      This may be more work, but I like it that way.
    - Limit the available items via javascript code within the plugin parameters.
    - Limit the amount of items in the shops stock, either by fix amount or variable.
    - Limit shops to only accept items from you, that they also offer to you.
    - Handle discounts via javascript code.
    - Possibility to define switch shops.



    You can open a shop with the plugin parameter OpenShop <Name>.
    You do not need to use the Shop Processing Command afterwards.
    You can still open normal shops via the Shop Processing Command.

    The Shop Number Window will display the number of items in stock:

    If it is not infinite it will display the stock quantity minus the number you've selected to buy:


    You can specify if and how the shops do refill their stock.

    You can also trigger refilling the stock via the plugin command:
    RefillShopStock <Name>

    You can also close the shop, via the plugin command:
    CloseShop <Name>
    If it is reopened later it's stock will be refilled.

    I would really appreciate any feedback.

    Compatibility:
    Please place this under any shop related plugins.
    It is not compatible to Tsukihimes ShopManager.
    The port to MZ is from XL, it is not fully compatible to VisuStella, but seems to cause at least no errors.

    Edit:
    - Found a bug and fixed it. Please download the new version.
    - Forgot to mention it requires MV Version 1.6.1 or higher
    - Forgot to mention if you define two or more items of same kind in the shop, they will be combined into a single one with the combined stock quantity and if you use custom prices, it will have the highest custom price.

    Edit 2:
    - Fixed some other issues.
    - The help window will now display the shops name instead whenever it would have displayed an empty text.

    Edit 3:
    - Shop names are now allowed to have white space.
    - Two new plugin parameters:
    Sold out text: Will be displayed in the help window alongside the shops name, when it is completely sold out.
    Display sold out items in shop: Determines when the shop is opened via the plugin command whether sold out items should be visible in the buy window. If items get sold out while the shop is already open they are just greyed out.

    Edit 4:
    - Compatibility with mjshi NPCDialogueShop: My plugin removed the common event command. Now it will also add the common event command when mjshi's plugin is installed aswell.
    Please place this plugin under mjshi's plugin.

    Edit 5:
    Added functionality for granting discounts under certain conditions.
    Shops keep track on #Total items sold, #Individual items sold, #Times visited.

    Edit 6:
    Fixed very big bug. This plugin didn't pass the plugin command and it's arguments to other plugins.

    Examples for discount conditions:
    this.getNumberBoughtOf(kind, id) >= 3 Means #individual items sold >= 3
    this._nrOfVisits == 3
    this._totalItemsBought == 100

    Discount percentages stack by multiplying them, e.g. if the conditions for 10% and another 20% are fulfilled, this does not mean a discount of 30%, but rather only 28% as
    e.g. if the original price = 100:
    100 * (1 - 10 / 100) = 90​
    90 * (1 - 20 / 100) = 72​

    Edit 7:
    - Fixed a bug, that make normal shops being opened endlessly.
    - Added custom selling prices. If not given half of the custom buying price is taken as selling price. If this is not given either half of the price from the database is taken as selling price just like the default behaviour.

    The resulting price is rounded down, in case it is a floating point number.
    The plugin now has version 1.5.

    Edit 8:
    Sold out text was not displayed when using different currencies via YEP_X_MoreCurrencies.
    The plugin has now version 1.6. The Sold Out Text will overrule the more currencies.

    Edit 9:
    Some fixes around custom selling prices.
    Plugin is now version 1.9.

    Edit 10:
    Today I had the idea of creating a switch shop without the need to buy an item first. Luckily it was possible.
    So introducing the new plugin parameters:

    Switch on text: Text to be displayed instead of the price for a switch that has already been bought and is set to on.
    Switch off text: Text to be displayed instead of the price for a switch that has already been bought and is set to off.
    Switches: The switches sold by the shop.

    [/url]

    A shop good of type switch cannot be sold, so it has no selling price and as the buying price cannot be defined
    elsewhere the UseCustomPrice flag is not needed. I hope I decribed the rest of the plugin parameters good enough
    within the plugin itself:
    [url=https://forums.rpgmakerweb.com/attachments/switch-shop-good-png.121253/]


    The final result looks like this when the switch has not been bought yet:



    Once bought it is set to on and in case it is toggable you can set it to on/off just by pressing on the item:


    With this it is now v2.0.
    I saw, that this could open up so much new potential (like e.g. Variable Shops, BGM Shops, etc.) in the future.
    If I find the time I may implement further kinds of shop goods like the discounts did.

    I hope this doesn't break existing projects.

    Edit 11:
    v2.1: Extension to YEP_ItemCore. Allows to buy independent items.

    Edit 12:
    v2.1.1 Small fixes around empty shops and the default shop.

    Edit 13:
    v2.1.2
    - Updated help section. Plugin command is actually names "RefillShopStock <name>" instead of "RefillStock <name>"
    - Fixed a bug around independ shop goods and the stock refill. I deleted the independ items from the memory even the party already bought them. Now I don't do this anymore.

    Edit 14:
    v2.2.0
    -New plugin command Refill<Kind>Stock "<Name>" Id Quantity:
    Refills a single shop good of the given kind in the shop with the given name by the given quantity. It will not exceed the maximum quantity. It currently does only work if the plugin parameter GroupItemsWithLimitedStock is set to true (Yes). The shop name must be placed into quotes as it allowes single white spaces between parts of it's name.

    Edit 15:
    Should now be compatible with MV 1.5.1

    Edit 16:
    Had to rework this plugin in order to find other workarounds for compatibility issues with Yanfly plugins rather than copying the code that still needs to be called and leaving out the rest as it is prohibited by the terms of use of Yanfly plugins and I guess also by copyright. I just want to avoid making me to have to take this plugin down. Yet I still hope this is just a minor issue as my plugin is given away for free.

    While doing this and veryfying in a test project that everything is still working as intended by me I found out that the following parameter of YEP_ShopMenuCore is not working if NPCDialogueShop is installed aswell:



    Off course I cannot solve this issue. As NPCDialogueShop seems to only work in conjuction with YEP_ShopMenuCore if placed under it and it overwrites a bunch of functions without aliasing them, there would be no way to workaround this without copying the YEP code around this parameter, which I clearly do not want to do.
    So I added a plugin parameter to my plugin to allow adding the equip command again to the shop menu (Default Value = On).
    Also if YEP_ShopMenuCore + NPCDialogueShop + BO_Shops are all used within your project the custom commands will also be added and the commands are placed exactly in the order of this screenshot.

    Edit 17:
    Renamed downloadable plugin BO_Shops => BO_CustomShops. If you have it already in use, you can rename it back to BO_Shops after downloading in order to not loose all your plugin parameters.
    BO_CustomShopsXL is an extended version, because I've got ideas. Some of the ideas are not compatible to the old BO_CustomShops. That is why I've created it as a seperate plugin. The XL version is also not compatible with YEP_X_MoreCurrencies and YEP_X_CondShopPrices anymore. It is still compatible with any other plugin BO_Shops was also compatible with.
    I've also updated my shop category customization plugin found at https://forums.rpgmakerweb.com/index.php?threads/shop-category-customization.121309/#post-1065982 to be compatible with the XL version of BO_CustomShops.

    If you rename BO_CustomShops to BO_Shops after the download you need to replace the following line in the code
    BurningOrca.Shops.Parameters = PluginManager.parameters('BO_CustomShops'); with BurningOrca.Shops.Parameters = PluginManager.parameters('BO_Shops');

    Edit 18:
    Compatibility fix of switch shops with MKR_ShopItemMessage.
    Found bug in XL version: Item descriptions have not been displayed anymore.

    Edit 19:
    Fixed a bug in XL to make it work without YEP_CoreEngine being used.

    Edit 20:
    Updated XL, as it had some math errors. Obviously calling Math.log10 and passing a value of 0 is not a good idea.

    Edit 21:
    Fixed a typo: $dataArmors instead of $dataArmor.

    Edit 22:
    - Small performance upgrade in BO_CustomShops. Call this.price() only once in Window_ShopBuy.prototype.drawBuyPrice extension.
    - Compatibility fix in BO_CustomShopsXL with ShadowDragon_EC (Easy Currency).

    Edit 23:
    Found bug in Plugin Command RefillItemStock.

    Edit 24:
    Changed my mind form yesterday and ported XL to MZ. However I cannot support this plugin as it my trial license will run out tomorrow. The upload is just experimental.
    Found a lot of bugs in XL. Severe ones. Shops weren't even working after loading a safe file.

    Edit 25:
    Yet again introduced a small little bug with the fixes in XL yesterday.

    Edit 26:
    I've taken the MZ version down, after I've read through Tsukihimes Shop Inventory plugin thread. Not only can I not support BO_CustomShopMZ, because my trial run out, but also just from what I've read Tsukihimes plugin will become amazing. I normally don't like to compete with others on the same topic. Her Shop Manager for MV was already good, just not what I wanted and that is why the original BO_Shops was born. That is the only time I've started a competition.

    Edit 27:
    I've found two bugs in XL both only in Shops that have the stock refill type set to "Add additional Stock".
    1) Discounts where applied each time the shop has been opened unless a "Stock Refil"l happend.
    2) If a shop has been opened and no "Stock Refill" happened, then the previous stock got lost.
    I actually didn't really test if the bugs really exist, but assumed it by looking into my code.
    I've also reworked the code of XL slighly to be a little simpler, but still have the same functionality.
    It is now Version 2.0.

    Because of the rework it will remove a variable from the saved shops, when loading a save file which has been saved with the previous version from XL and cause a "Stock Refill" on all saved shops in order to be inline with the changes. Therefore I recommend you to not get the new version unless absolutely needed.

    Edit 28:
    - Enhanced limit for stock quantity from 99 to 5000. Maximum variables seems to be 5000.
    - XL didn't display the stats for equip items.

    Edit 29:
    Fixed bugs around selling in BO_CustomShopsXL. It is now Version 2.1

    Edit 30:
    Found a bug in XL, that caused the game to crash when selling the last item in the specific category in the selling menu and afterwards pressing the ok button (e.g. Return-Key) on the now empty slot which is still highlighted by the game.
    Fix this bug. However no new version number.

    Edit 31:
    Bug fix in XL. The plugin parameter to not use the YEP Equip Command did not work as I intended. Also added plugin parameter to not use NPC Dialogue Shops Event command in custom shops if people wish to do so to XL. I will stop adding new features to XL. Only bug fixes anymore as it got confusing and too much work to have two versions of the same plugin.
    v2.4 for the non XL version:
    1. Selling prices have been moved from the shop good definition to it's own plugin parameters.
    2. Fixed the same bug and added the same plugin parameter as described above for the XL version.
    3. Added sellable- and non-sellable items/weapons/armors and removed plugin parameter SellOnlyGoodsThatCanBeBought.
    Everyone who will redownload this has to check all the plugin parameters and even double click through them or you might receive some "cannot read of undefined" error messages. You also need to start a new safe file or temporarely include the CloseShop Plugin command in your event configuration.

    Edit 32:
    Fixed a bug, that only one additional currency is displayed, when my plugin is used together with YEP_X_MoreCurrencies.

    Edit 33:
    Made it possible for icons to be drawn on the buy window for shop goods of type switch, if \i[iconIndex], e.g. \i[24], is included in switch name in the database or in switch display text within my plugin parameters.


    本贴来自国际rpgmaker官方论坛作者:BurningOrca处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/burning-orca-shops.108895/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-30 19:34 , Processed in 0.102801 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表