Crafting a crafting system.

so, @Mac15001900 suggested I make this post, and sorry if this is in the wrong spot.
So the scenario is this: One of the party members in my current long-term project is a cook learning about the food of his people and eventually combining them with the food of the people who initially taught him to cook.

The way I'm making this work currently is with a rather bloated-looking common event that a skill calls, and the event essentially makes a menu for a player to select the food from and then runs a bunch of checks to see if the player has all of the required ingredients. I used this system for "Diced-up Biomes", which is something I made for a game jam, which has me wondering if there's a more efficient way to handle this in a larger project with more ingredients and learning new recipes?
(Currently I have the idea of learning recipes as being added event pages linked to a variable of cookbooks read around the world)
Could you share screenshots of your current setup? Even if you don't wanna make drastic changes, there's probably a fair bit of optimization you can do with it. And what plugins are you using/do you plan on using?
What's interesting to me is that you didn't really specify much in the way of scope or limitations outside of what you are currently using. My experience has typically been that the best way to determine how to go about something is to determine your scope or your limitations.

Speaking very generally, if you want to implement a crafting system, your options from most to least efficient are probably going to be:
  1. A custom plugin designed specifically around your crafting system
  2. A generalized crafting plugin which you adapt your crafting system to
  3. An event-based system
I'd suggest that the question isn't really "what is the most (or a more) efficient way," but rather, what is the most efficient option that is available to you personally. And, from there, how do you engineer a crafting system that fits within the scope of your project. By "scope," that is to say, something you can realistically achieve.
Could you share screenshots of your current setup? Even if you don't wanna make drastic changes, there's probably a fair bit of optimization you can do with it. And what plugins are you using/do you plan on using?
I don't want to forget to respond to this, but unfortunately I checked at a time when I can't get a screenshot.
However the general flow works like this:

>Show choices
>Hamburger
>Conditional Branch: If have: Beef
>Conditional Branch: If have: Bread
> subtract: 1 beef
> subtract: 1 Bread
>if else:
>Show text: Missing ingredient: Bread
>if else:
>Show text: Missing ingredient: Beef

and repeat that for every item. It works, but it's hell to parse after having just a handful of recipes.
Currently I am not using any plugins that relate to this, though I was considering using a plugin to show an information box for the list of recipes/
I don't want to forget to respond to this, but unfortunately I checked at a time when I can't get a screenshot.
However the general flow works like this:

>Show choices
>Hamburger
>Conditional Branch: If have: Beef
>Conditional Branch: If have: Bread
> subtract: 1 beef
> subtract: 1 Bread
>if else:
>Show text: Missing ingredient: Bread
>if else:
>Show text: Missing ingredient: Beef

and repeat that for every item. It works, but it's hell to parse after having just a handful of recipes.
Currently I am not using any plugins that relate to this, though I was considering using a plugin to show an information box for the list of recipes/
You really should just use a plugin, there's plenty that are very flexible with licenses that allow for use in commercial or non-commercial games. If you wanna stick to a more vanilla system though, you'll likely wanna learn how to recreate things as scripts, as what's like 10 lines using the RM commands can be done in like 5 lines in a single script that can be saved as a common event and called when needed
well for me, the drag and drop the ingredients into the pot is the best now. if you have like only 20 ingredients, and maybe 10 different recipes to unlock. divide the screen into 3 parts. Theres a plugin for dragging pictures into a region to make something happen. so here we add ingredients, then control the flame like in genshin impact -- so its a sliding reaction time.
1697601700297.png


another alternate fun style was the cooking reaction time game from alchemy stars. just adding ingredients in certain quantity and unlocking a recipe


or this one where you click the ingredients in order
If you wanna stick to a more vanilla system though, you'll likely wanna learn how to recreate things as scripts, as what's like 10 lines using the RM commands can be done in like 5 lines in a single script that can be saved as a common event and called when needed
two questions about that:
1. any idea where I might be able to find resources to learn that
2. calling a common event from another common event shouldn't cause any issues, would it?
CT_Bolt made a no plugin recipe system. It uses a lot of scripts though
two questions about that:
1. any idea where I might be able to find resources to learn that
2. calling a common event from another common event shouldn't cause any issues, would it?
scripting is just using javascript via the maker's ui. If you have basic javascript knowledge(or any object oriented language tbh) you can poke your head around the rpg_objects.js file, which has most of the important stuff for how the engine actually handles your actors, items and so on to get a good idea of how they interact.
CT_Bolt made a no plugin recipe system. It uses a lot of scripts though
[RMMV] Combine Items (No Plugins) by CT_Bolt
It's incredibly impressive and I also managed to crash it immediately doing something super common(attempting to cancel the use of an item on an actor), which really just shows the pitfalls of sticking to vanilla for such a complicated thing over finding a plugin imo
Doing this purely with events like this could get annoying very quickly once you have a lot of recipes. I'd very much recommend just using a crafting plugin - this will also be easier for the player, as they'll have a dedicated UI showing them all the recipies. I got 7 results by searching JS Plugin Releases (RMMV) for threads with "crafting" in the title - try browsing through them and pick whichever would work best for your project.
two questions about that:
1. any idea where I might be able to find resources to learn that
2. calling a common event from another common event shouldn't cause any issues, would it?

If you can actually understand coding -- common events are functions. so technically you can have a function call another function within itself.. and thats how common event works, but not all command events work as they are in map scenes.

Original thread: https://forums.rpgmakerweb.com/threads/crafting-a-crafting-system.162111/