Original Source
- Original title: Shg Recipe Book/Cooking Mini Game
- Original author: Shugo
- Original date: April 20, 2017
- Source thread: https://forums.rpgmakerweb.com/threads/shg-recipe-book-cooking-mini-game.77571/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)
Summary
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.
Archived First Post
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:
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:
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:
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:
- 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--
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
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
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...