MZ - Crafting System
This plugin is a port of my Crafting System plugin for RPGMaker MV, as such it has many of the same features as the original, updated to work in the new engine.
The demo you see above has the plugin enabled in it, so you can talk to the info dump NPC, or open the system and have a look at how it works.
- Ingredient based recipe system. Players build items from individual ingredient items, rather than select a recipe from a list
- Developer defined crafting categories split the system into multiple modes, no more cooking at the blacksmith anvil.
- Variable recipes can contain items that belong to specified categories, not just specific items.
- Manage recipes right in the plugin manager, no messing with JSON formatted recipe lists, or node.js apps.
- Partial recipe support. Player put in too many of one item? Added an extra ingredient? System will still craft something!
- Unlock recipes via plugin command, or by crafting them.
- Bind the scene to the main menu, VS_MainMenuCore, or call it via plugin command
- Support for multiple individual recipes to craft the same result item. Want four different ways to bake a potato? We can do that.
- Configure plugin options to your liking. Variable success rate? Failure case item creation? Removing ingredients from the inventory after failing a craft? Got you covered.
- Robust experience and leveling system, on a per category basis.
- Vast and flexible additive traits system extends independent items to allow them to pass on certain traits when they are used to craft an item.
- Includes a patch to allow independent items to work in RMMZ.
What sets this plugin apart from it's contemporary counterparts is that this plugin is entirely ingredient driven on the player's end. Other crafting systems are rigid, requiring players to select a known recipe from a list, and have the required ingredients to craft it. This system allows a lot more freedom on the player's side, allowing them to randomly jam ingredients into the UI and (hopefully) make something. If they succeed, the recipe is unlocked, so they'll always know how to make the thing they just made.
This plugin also has support for individual item categories. Let's talk about an example here. You could have an item, Stew, which requires a carrot, a potato and some meat. In traditional systems, you'd make one recipe, with those three items, and call it a day. But what if you have four kinds of meat? Pork, Beef, Chicken and Venison? You'd need to make four different recipes for stew, with each type of meat in it. That'd also clutter up the recipe list with multiple stews, too. With this plugin, tag all the meats as meat, and the recipe will accept any of them. One Stew recipe, four different kinds of meat.
Please note that I am always updating the plugin and finding issues with it, as it's such a massive undertaking, it's next to impossible for me to find everything wrong with it by myself. This plugin itself is based on version 1.14 of the RMMV crafting system, so it contains all of the fixes included in that. Even still, feel free to report anything out of the ordinary you find to me directly on this plugin page, or on the RPGMakerweb forums, where I have a support topic dedicated entirely to my plugin suite.
How it Works:
First I'll talk a little bit about how the plugin works, and then I'll share some screenshots to help drive home the point I'm trying to make.
First things first, though. The additive traits system mentioned above, which allows ingredients to pass traits on to the result item requires Yanfly's ItemCore plugin to work. That feature will be entirely disabled if you are not using it. It requires independent items to work, and at present, there are no other plugins available for RMMZ that contain a comparable feature. In order to get this working, you need to import YEP_ItemCore into your RMMZ plugin manager, and then import my compatibility patch below it in the load order. My demo does not contain this file, as I do not have the rights to redistribute Yanfly's plugins.
As mentioned in the little blurb at the top, this crafting plugin is ingredient focused rather than recipe focused. Other plugins that tackle a crafting system rely on a menu in which you pick a recipe from a list, while this one allows the player to input random ingredients into the interface to experiment in finding working combinations of items.
The main crafting UI
As you can see above, this is the main crafting Scene. You have four slots, and can select items to put into each of them. You can also lock the third and fourth slots via plugin parameters, and toggle them via plugin commands. The various text strings on screen can all be customized as well, for each crafting category that exists. As we're looking at the cooking category right now, the Craft button is labeled 'Cook'. You can also see the crafting experience system on display here on the right side of the screen, which is also configurable, and can be turned off entirely if that's not what you're looking for.
On these shot, we see the same scene again, but there are some ingredients put in already. On the right side, you can see our expected result item, the Salad, as well as the craft success rate of it. Both of these things can be hidden in the plugin parameters as well.
Crafting in progress
So we've chosen to cook this salad, with the ingredients we have in there. When the bar fills up, we'll be shown the result.
When crafting was completed, we see that we did not get the expected Salad, but a wilted one instead. This is what we call a soft failure, and it happened because the random number check for the success rate did not pass. In this case it was only a 15% chance to fail, so that's pretty unlucky. The result window is showing us our failed salad as if it were successful, though, which is a configurable parameter in the plugin. We also have a helpful window that lets the player know what items were lost in the creation attempt.
Another soft failure
Here's another failed attempt. This one was from blacksmithing. The amount of materials removed on a failed attempt is also configurable, and the window that shows the lost items can be disabled as well, if you don't want the player to get that information.
Let's make a Short Sword
With the short sword recipe unlocked, we can tell that these ingredients are going to make us a short sword. Keep in mind this information will only show when the recipe has been unlocked, though.
When the craft is complete, you can see that we gained some craft experience, and are given our Short Sword. Job well done.
With enough successful crafts, we go up a level. Increasing in level increases the success chance of crafting recipes. Recipes can be set as higher level to cause them to be harder to craft at lower levels, too. Once again, these features can all be turned off as well, if you don't want them. Also note that all of the strings on screen can be customized as well, on a per category basis.
Now, with the basics out of the way, lets talk about a couple of things that can't easily be seen via screenshots. First up, lets talk about partial matches. When a player puts a bunch of items into the crafting interface, unless they already know the recipe, the odds of them exactly matching the exact items and quantities needed are pretty low. As such, the system can make what is called a partial recipe match. If the ingredients or quantities provided don't exactly match a recipe, the system tries to find any recipe that the ingredients provided can match. If the player provides and extra ingredient, it is ignored, or if they provide too many of one item, it is also ignored. You can also configure what happens to those extra items when the partial recipe is crafted.
A total failure
If a partial match cannot be found with the ingredients provided, a total failure happens instead. When the ingredients provided cannot make any recipe, a different message is shown than when a valid recipe fails. You can also configure what happens to the ingredients when a total failure occurs, which is separate from what happens during a partial failure.
There are many different settings you can use to determine what happens to the ingredients used during both a partial and total failure case. The demo project has it set to take one of each ingredient on a partial failure, but not take any ingredients on total failure. Settings exist for taking all, some, or none of all, some, or none of the ingredients provided, and also a random variance chance as well.
If a partial match or full match is found, a crafting attempt is made. As you can see above, there is a success chance, and if it fails, we get a soft failure, which removes used ingredients, and can optionally provide a failure item to the player. It can also be configured to present the failure item to the player as if it were a successful craft.
If the random success roll passes, the craft is successful, and consumable items are removed from the inventory, and replaced with the result item. Once a recipe has been crafted once, it becomes 'unlocked' and can be seen in the preview window if the player provides the correct ingredients to craft it.
Not all recipes have every single one of their ingredients defined by the developer. Recipes can have ingredients be set to a 'Category' item instead of a specific item. A recipe with one of these ingredient categories set, will accept any ingredient that is tagged to belong to that category in that slot. Using this feature, you can make one recipe that can use several different kinds of that category item.
Our example sword above is one such recipe. The Short Sword doesn't specify it needs an Iron Ingot, and in fact, works with anything tagged as an ingot.
A Short Sword made from Silver!?
You can combine this with additive ingredients to make it even more flexible, a category ingredient such as silver could provide different bonuses to the sword than a plain old iron ingot.
There are several note tags to use on ingredients in the database.
Ingredients can only belong to one CraftCat. This tag denotes an ingredient as belonging to an ingredient category. In the example above, the iron ingot and the silver ingot both belong to the ingot category, so they can be used interchangeably in recipes that are looking for any ingot, such as the Short Sword recipe.
<ValidCats: x, y, z>
This tag is required for an ingredient to show up in the item list inside the crafting scene. Tag an item with the crafting categories you want it to be available in, such as cooking, or alchemy. An individual ingredient can belong to as many crafting categories as you want, so you can use items like herbs as both a spice in cooking, and a reagent in alchemy, if you want.
<UNCONSUMABLE: fail, success>
Ingredients with this tag will not be removed from the inventory when a craft is complete. If they have the <fail> tag, a failure will not remove them, and likewise, the <success> tag will mean they will not be removed if the craft is successful. Items tagged with both, like the third example will never be removed from the inventory. You can use these tags to make special tools that are not consumed on use, but are required in recipes, or you can prevent rare materials from being wasted in a failed crafting attempt.
Adding Your Own Crafting Categories:
This plugin comes with three built in categories; blacksmithing, cooking and alchemy. The recipe list in the demo contains recipes for cooking and blacksmithing, but no alchemy. You can add your own crafting categories as well, and they function the same way as the default ones, with craft exp, levels, and their own custom strings too.
To add a crafting category, simply create a new result item in the plugin parameters, and type the name of the category you want it to belong to into the box, rather than selecting blacksmithing, cooking, or alchemy.
Here I have typed in Goldsmithing
Once one or more result items exist for a crafting category, it will show up in the category select window, just like blacksmithing and cooking do already. Categories that don't have any recipes will never show up on this window, which is why you never see Alchemy, even though it exists. once a category exists in this way, items can be tagged with <ValidCats: goldsmithing> to enable them to show up in that category, just like the default ones.
Default menu with the crafting scene bound to it.
The default crafting scene can be added to the default menu via the plugin parameters of this plugin. The name can also be customized. You can have it hidden by default, and show it later via plugin command, or have it disabled and re-enable it later via plugin command as well, like you can with most menu commands.
You can also bind individual crafting categories to the menu as well, via plugin parameter. If you do this, that category will no longer show up on the category selection window when you go into the main crafting scene.
If there is only one category to choose from on the category selection window, the crafting scene will skip selecting it and go straight into the main craft scene, as shown in the first image on this page.
This plugin can also be bound to the VisuStella MainMenuCore plugin as well. The instructions for doing so are in the help documentation.
You can choose not to bind the crafting scene to a menu, and can instead call it via plugin command. You can call a specific category via command, or the default system, so you can use this to make crafting stations that only allow a specific type of crafting at them. If you call a crafting category directly, either via command or from the menu, backing out of the ingredient slot window will close the scene, rather than bring you back to the category selection window.
You can use plugin commands to cause a variety of effects on the system.
Call Crafting CATEGORYNAME
Calls the crafting scene. if a category name isn't specified, the default category selection window will come up and ask the player which category to craft from.
Unlocks a recipe in the interface, as if you had crafted it. Keep in mind that even if a recipe is locked, it can still be crafted, it just does not show up in the preview window.
Toggle Locked Slot
You can lock or unlock ingredient slots 3 and 4 using this command. If the slot is locked it will be unlocked, and vice versa. If you unlock slot 4 while slot 3 remains locked, the player will still be unable to put anything into slot 4, because there needs to be an item in slot 3 in order to put something in slot 4.
Locked slots in the Cooking scene
Change Craft Enable
This command enables or disables the main craft command bound to the menu. If it is disabled, the command still appears but is greyed out and cannot be selected.
Change Craft Show
Hides or unhides the main craft command bound to the main menu.
Change Category Enable
Enables or disables a specific crafting category. If it is bound to the main menu, it will still appear on that menu, but will be greyed out. If it isn't bound to the main menu, it will appear in the category selection list from the main craft scene, but will be greyed out and unselectable.
Change Category Show
Hides or unhides a specific craft category. As above, if it is disabled, it will disappear from whatever menu it is bound to, whether it be the main menu or the category selection window in the craft scene.
The demo project:
The demo at the top of the page here is an interactive tutorial, our friend Corby will explain everything there is to know about how the system works, with a bunch of visual aids too. The demo project included in the downloads here contains the plugin, as well as plugin settings for YEP_ItemCore, and my compatibility patch for ItemCore. To use the downloadable plugin demo, copy your own copy of the ItemCore into the js folder of the demo, and enable ItemCore and my Independent Items patch from the plugin manager.
The plugin parameters in the demo project match those in the screenshots above, you can use it as a good starting point for creating your own recipes and ingredient items.
Additive ingredients are special ingredients which have bonus traits on them. When an item is crafted with one of these ingredients, the valid traits for that result item are passed to it. You can use this system to make crafted items more powerful than store-bought counterparts, by adding additive traits to the ingredients used to make them.
There are two different methods of having the traits applied, selected by plugin parameter; All traits, or Skyrim style. In all traits mode, any valid additive trait is added to the result item, in skyrim mode, only traits that exist on at least two of the ingredient items are passed along, like how alchemy works in skyrim.
In order for traits to passed to an item, it needs to be an independent item. This was a feature in RMMV provided by Yanfly's ItemCore plugin. I won't get into too much detail here as to why this is needed, but since a similar feature has not been brought to RMMZ yet, I had to make a compatibility patch to get ItemCore to work properly in RMMZ in order to bring this feature over. Without independent items, a trait added to one sword, would cause all swords in the game to gain that trait, ones you have, ones equipped, ones in shops, and ones that haven't even dropped yet. With that being said, if you don't use the YEP_ItemCore plugin, and my compatibility patch, this feature will not work for you.
Additive ingredients are tagged in the plugin parameters for this plugin. If they aren't tagged, the additive trait note tags on them are ignored.
Additive traits can also be chained together. An ingredient with a trait will also pass that trait on to the result item. If that result item is also an additive ingredient, and is used in a recipe, the trait from the previous ingredient will carry forward onto the new result item. This can allow the player to make stronger items by crafting the individual ingredient items first. It gives them the option to simply buy the ingredients, or have stronger end results by investing the time needed to craft those ingredients.
The traits themselves are added to ingredients via note tags. There are a lot of them. Far too many to post on here, for sure. But here are some examples of things you can do with them:
- Add a prefix or suffix to the item name
- Add an hp/mp recovery effect to an item
- Add an inflict state to an item
- Add an attack state to a weapon
- Add state immunity to equipment
- Add a skilltype to equipment
- Lock/seal skills on equipment
- Learn/unlearn skills from an item
- Change the parameters of equipment
- Add buffs/debuffs to items
- Add passive parameter buffs to equipment
- Cure a state from an item
- Change an attack animation
- Change the animation of an item
- And so many more
These traits are dormant on the ingredient item and only apply to the result item when they are used to craft it. Some traits require the result item to be equipment, others require it to be an item. All traits given can also be reset, allowing for ingredients to have both positive and negative traits, and the ability for ingredients to counteract such effects on each other when applying additive traits to the result item.
This plugin is compatible with the VisuStella Plugin Suite, but does not require it to run.
The Additive ingredients feature of this plugin requires YEP_ItemCore to function, and as such also requires my compatibility patch to get that working correctly in RMMZ. This plugin should be loaded after those two. For maximum compatibility, load the ItemCore plugin near the top of your load order, after the VS_CoreEngine plugin if you are using it, and then load my compatibility patch directly after it in the load order. Load the crafting system after any tier 1 VS plugins you might be using, like the below image.
- This plugin may be used in commercial or non-commercial projects. With credit to me, Ramza.
- Purchase of this plugin allows you to use it in as many projects as you want.
- You may modify this plugin directly, for personal use only.
- Sharing this plugin, direct edits to it, or any demo projects that come with it is prohibited.
- You may share edits to this plugin as extensions to this one. Extensions require the base plugin to function.
- You can choose to sell extensions to this plugin for profit, crowdfunding, donations, etc, as long as the extension requires this base plugin to function.
- Do not modify the header of the plugin file, and do not claim ownership of the plugin in your own projects.
In order to download this MZ Plugin you must purchase it at or above the minimum price of $18.99 USD. You will get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.