Create your crafting system with no plugins

A crafting system is always appreciated. But it often needs plugins, which mean compatibility issues and less personalization. But what if you could create your crafting system from scratch, only with events?

Requirements:
This is optional, but to create a "recipes" system you will need the plugin HIME_HiddenChoicesConditions. All the script calls used in the part 3) can be used without any plugin. It is also useful to have a good comprehension of events.

First, why create a new crafting system?
Well, it will allow you to personalize it as you want, and also to change recipes in-game (for example, you could use a variable as amount needed for a specific ingredient, add specializations linked to experience…)
To create your crafting system, you will need to create ingredients. Just create new items and define their use on "never". Next, let's start this tutorial and create a common event. If you have many crafting categories, you will create a common event for each one.
1)- Choose an item to craft, then craft it
In this common event, you will show choices to make the player choose what he wants to craft. In each branch, you will show a message that shows a short description of the item and the necessary ingredients. You will also put in variables the amount of ingredients needed to craft the item. Don't make too much variables! If your recipes have three ingredients at maximum, create only three variables!
Spoiler: message example
1749201975586.png
You can use this variables with text codes to show to the player how many ingredients he owns.
Next, you can add a Yes/No choice to avoid crafting an unused item. In the "Yes" branch, you can add conditionnal branches to make sure the player really has the ingredients. If he has, remove them and add the crafted item to the player's inventory. If he has not, you can add an "else" branch and play a buzzer sound or show a message to inform the player that he has not the necessary stuff.
Spoiler: event (only one potion)
1749201774400.png
Now, you can create an event that will call this common event or use it with a menu plugin!
2)- Create recipes
With Hime's Hidden Choices, we can add a recipes system to our game. Just create a "Recipe" item and use this script call before your recipe choice:
Code:
hide_choice(CHOICE_NUMBER,!$gameParty.hasItem($dataItems[RECIPE_ID]))
You won't be able to see the craft option until you have the necessary recipe.

3)- Item Synthesis : Choose two ingredients to make a new item
This first craft system is very cool, but what if I prefer the player to try different combinations?
To create this synthesis system, you can be more efficient by using variables.
BE CAREFUL: YOUR ITEMS MUST KEEP AT SPECIFIC ORDER.
Example of my database:
Spoiler: items and weapons
1749204193723.png
1749204241610.png
Create your choices. In our example, it will be blacksmithing: the player will choose the base weapon, next the metal ore that they will use.
Spoiler: common event (only one metal)
1749205188670.png
1749205216537.png
Ok... But why so much variables? To find more easily the weapon crafted! Look at the end of my common event...
Spoiler: craft item
1749205239350.png
The ID of the crafted weapon is the sum of the IDs of the ingredients! (Now you understand why I told you to keep your items in specific order).
Use this script calls to remove or gain items :
Code:
$gameParty.gainItem($dataWeapons[$gameVariables.value(VARIABLE_ID)], AMOUNT);
// You can replace $dataWeapons with $dataItems or $dataArmors
Code:
$gameParty.loseItem($dataItems[$gameVariables.value(VARIABLE_ID)], AMOUNT);
//Same. If you want to remove armors or weapons, write:
$gameParty.loseItem($dataWeapons[$gameVariables.value(VARIABLE_ID)], AMOUNT, true/false);
//Set true if you want to include equipped weapons/armors. You can also use $dataArmors.

The Self Switch is used to create a new branch if the player have cancelled to avoid crafting an item if the player cancelled.
Here the metal is the only losable ingredient, but you can add more conditionnal branches or just copy/paste your second part.

Thanks for looking at my tutorial! How will you personalize your game's crafting system?
Tags: crafting, events, common events, script calls, choices, create, no plugins
Create a crafting system with NO PLUGINS > Needs plugin. Deceptive. To me looks like you're trying to make a crafting system based on the show choice command, which is very cumbersome to use for the player for anything more a few items.

The setup takes a whole lot of time, and if you gotta use a plugin anyway, might as well just use yanfly's item synthesis, which does the same thing but with a much less cumbersome menu.
I am sorry if I have been misunderstood. The plugin I gave is only needed for a small optional part of my tutorial, so I thought it wouldn't be a problem.
I made this tutorial because I had many compatibility issues due to the large number of plugin that I used, and I thought that it would be useful for someone else.
Even if it is optional, not using that would make the system even more cumbersome to use.

A crafting plugin usually has zero compatibility issues since the crafting is its own scene in every single one I've ever tried. I'd be interested in knowing what kind of incompatibilities you were facing. The only incompatibility I could see would be another crafting plugin.
The plugin I was using was making the game crash when using with some plugins like Yanfly's items. Moreover, this is the only way I found to create for example a skill that can divide the amount of ingredients needed or increase the number of items crafted.
In my game, blacksmithing and alchemy don't work identically, so I needed two plugins to make this work and... well, it didn't work.
blacksmithing and alchemy don't work identically, so I needed two plugins to make this work and... well, it didn't work.
YEP Item Synthesis with Ramza categories can do it seperately,
MrTs_Crafting can have many categories and recipes (which I fixed).
PKD_SimpleCrafting is another crafting.

you can use each one together without any crashes.

the only thing about YEP if it does crash is that you don't have it in
the correct order or even categorize it.

if plugins aren't categorized, it can crash faster, like crafting plugin
at the top instead of around the middle.

I categorize my library of plugin into 12 tiers and no issues at all.

Evented crafting if they want no plugin or as lowest as possible.

so how would you make a crafting system easier?

use tables and select item window.
from there, you can make conditions to check what is true or false.
so if true (succeed), get item, if false (failed), give nothing, or 1 random
item that was used.

there are around 6 different "easier" methods that can make it clear and easy.
or strict them by recipe cooking only, and your checks are far shorter.

to avoid nesting, conditionalBranch++ is the way to go.
but this can be a nice learning curve to improve the system in many, many ways.

Original thread: https://forums.rpgmakerweb.com/threads/create-your-crafting-system-with-no-plugins.178139/