- Joined
- Feb 21, 2017
- Messages
- 27
- Reaction score
- 41
- First Language
- Portuguese
- Primarily Uses
- RMMV
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:
How the results work:
How to Use:
Updates:
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--
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 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.

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:
As 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.
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:
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.

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--
Last edited: