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

[转载发布] Shg Recipe Book/Cooking Mini Game

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

    连续签到: 2 天

    [LV.7]常住居民III

    8100

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    Shg Recipe Book ver 0.02

    Author: Shugo

    Introduction


    This plugin creates an scene for a cooking/crafting mini game, with it's own music and it's own images.

    This was inspired by Bonbon Cakery's sweet creation mini game and "Al Dente" Cooking Contest (which I recommend everyone checking out if possible).

    It uses up to 4 items as ingredients to generate 3 different items as result depending of how much it was used of each ingredient.

    It always generate an item, no failure independent of how much it was used.


    Example:
    Spoiler: Example
    We have X booklet that can give us a Ravioli(ID 0) or a Pasta(ID 1) or a Lasagna(ID 2).





       We use Meat, Tomato Sauce and Flour as ingredients, but can only do it if we have 3 of each.





       Then we set default values of quantities for each, from 1 to 3:

       Use 2 Meats, then 1 Tomato Sauce and then 2 Flours.





       The quantities that were set define the ID of the returned item if the user got everything 'right'.


       In this case, since most ingredients use 2 as a default, our ID will be 1.

       If it was 3, our ID would be 2. And if it was 1, our ID would be 0.

       Given this, we could get:

       - If the player used 2 Meats, 1 Tomato Sauce and 2 Flours they would get a Pasta;


       - If the player used 3 Meats, 1 Tomato Sauce and 2 Flours they would get a Lasagna;


       - If the player used 3 Meats, 2 Tomato Sauces and 3 Flours they would get a Ravioli.
    How the results work:


    SpoilerAs said before, the quantities that were set define the ID of the returned item if the user got everything 'right'.

    For quantity 3 of X item as predominant or all values or 2 or more values being equal, we have:

       - ID 2 if the player results got all of the quantities right;

       - ID 0 if the player got half or more of the quantities right;

       - ID 1 if the player got less than half of the quantities right;


    For quantity 2 of X item as predominant, we have:


       - ID 1 if the player results got all of the quantities right;


       - ID 2 if the player got half or more of the quantities right;


       - ID 0 if the player got less than half of the quantities right;


    For quantity 1 of X item as predominant, we have:


       - ID 0 if the player results got all of the quantities right;


       - ID 1 if the player got half or more of the quantities right;


       - ID 2 if the player got less than half of the quantities right;

    Unless you specify how you can make the recipes to the user or they check the plugin parameters, they will not know which quantities will generate each item.





    How to Use:
    Spoiler: how to
    On the plugin manager you can set up to 15 booklets that will make your recipe books.



    The recommended ammount of ingredients used are 2-4 to keep it slightly balanced.





    You can set an specific BGM to play during the mini game and 3 images for your scene.
    Put the pictures you want to use on the picture folder and done.
    The ones I've used as test were the default size/same size as title screens.

    =================================================================

    To call your mini game on your game, inside an event you call the command 'setRecipes' then you give the IDs of the booklets you want to be able to make now.





    With this we have our Recipe Book for this call done. It is required to have 'setRecipes' called before calling the actual mini game, even if you don't have multiple recipe books with different booklets on each call.

    After that, call the command 'startCookingGame' and done!





    Now you have your mini game ready.

    But the player will only be able to select something if they have 3 of each ingredients that are required.



    Updates:

    Spoiler: 28/04/2017

    • Fixed a small bug I found by accident when using for booklets
    • Added a few more parameters to change text:


    Download links:

    JS with ENG comments; ver 0.02

    JS with PTBR comments; ver 0.01 (will translate it later)

    Terms of Use:

    - Free for use in non-commercial and commercial projects with credits

    - You can edit it as much as you want for your own use, but I would like to see the alterations you made o/

    - Would be nice to get a link to the project just to see it's use there

    Notes:

    If you don't use the default size of screen for your game, you'll probably need to make some changes on the code, just to set things the way you want, sorry.

    The example I made was using food and cooking as set, but you can use this to generate other items, as long as they are regular items.

    I hope I managed to explain how this works properly, so thanks to anyone who read this. The code is a bit of a mess, but I commented some important lines there just in case.

    Thanks to Hashibei, André NK and Chorva for kind of 'proofreading' the first draft for this post to see if it was understandable.

    And now Shugout--


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 12:54 , Processed in 0.146719 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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