Shg Recipe Book/Cooking Mini Game

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).

Vena8lq.png


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

jNvK8gH.png


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

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

JjRVink.png


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:


Spoiler
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.


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

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

IMo0R8b.png


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.

jCAFfXn.png


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!

N3SX6w8.png


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.

jJ4QS9Q.png

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:
OrF03e0.png

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--
Wow that a cool plugins that I should definately try sometimes, I hope you will continue to improve and develop it with more cooking abilities 🙂
Uh, interesting! A cooking system is a cool concept to insert in a game. Well done 😤
I absolutely love minigame plugins, and this one is great. Definitely offers developers the opportunity to put something unique in their games. Keep tweaking and updating this! Can't wait to see how it progresses.
Very well done. I will definitely consider using your plugin if I'll ever make a sequel with the same concept one day, it'll certainly be less painful than the massive eventing I did.

Thanks a lot for mentioning my game too.
@Gamefall Team @Val @∊η∊ηra Thank you!! There are some small stuff that I plan on adding that I didn't do on the first version to keep it a simple base, I'll also try to implement a different way to do the recipes too at some point.
@Dalph I can kind of imagine the eventioning on your game, it came out really great anyway, it was short, but quite enjoyable! And also thank you for mentioning this plugin on your post!
this is great. pretty much a remake of the Suikoden system but with food I can understand the names off lol
is it possible for this to go for more than 15 booklets?
I'm having a problem, I did everything as it should be but when I put the ingredients and I select start cooking continue disable to select something.
you can help me?
Sorry my english.

Original thread: https://forums.rpgmakerweb.com/threads/shg-recipe-book-cooking-mini-game.77571/