Item Crafting



This plugin implements a recipe based item crafting system.
In a recipe based crafting system, if you have the recipe and the ingredients, you can craft the item.
This is different from an experimental crafting system where the player chooses the ingredients and gets some kind of result.

This is a re-implementation of my Item Crafting script for VX Ace.
For users of that script, the database setup is very similar. However configuration of the plugin is done through the new plugin parameters screen and plugin commands, rather than needing to edit the script.

Recipes are configured through note tags in the database.
For download, detailed instructions and a sample project, visit here
Great! I love It so much.

A idea just if you can do It.... Could you make the system separate ??

I mean, plugin for a npc that just make weapons, other that just make armor, other that just make ítems, It would be nice if we can make npcs that have the skill to make some specific ítems, like a furnace were we can make just weapons of mithrill and other furnace were we can make gold weapons only.

Is just a idea, just how you share this plugin for us Is so great and help a lot of us.

Thank you so much.
Very cool! Thanks for sharing!
FYI, I was looking for a disassembling plugin and did not know that was a feature of this one.
You should let people know this.

Thank you!
Great! I love It so much.

A idea just if you can do It.... Could you make the system separate ??

I mean, plugin for a npc that just make weapons, other that just make armor, other that just make ítems, It would be nice if we can make npcs that have the skill to make some specific ítems, like a furnace were we can make just weapons of mithrill and other furnace were we can make gold weapons only.

Is just a idea, just how you share this plugin for us Is so great and help a lot of us.

Thank you so much.
You can do this I think using a switch or tool as part of the recipe.

Example, for your mithril furnace:
Each of the mithril recipes includes <craft switch: 45> in its notes
At the mithril furnace crafting station, make it a map event:
Switch 45 ON
Plugin Command: OpenCraftingScene
Switch 45 OFF

This would show those recipes only at the mithril furnace and not elsewhere.

Alternative using a tool:
Each of the mithril recipes includes <craft tool: 60>
Item 60 in the database is a key item (or hidden item A/😎 named "Mithril Furnace"
On the map event
Add Items: Mithril Furnace, 1
Plugin Command: OpenCraftingScene
Remove Items: Mithril Furnace, 1

With this, the crafting menu will always show the recipe, but it will be disabled and show "mithril furnace" as a missing tool.

You can be fancier and add / remove the item when you enter / leave the map; so you can craft from the main menu anywhere but when you're inside a forge you can make more things than when you're on the world map.
You can do this I think using a switch or tool as part of the recipe.

Example, for your mithril furnace:
Each of the mithril recipes includes <craft switch: 45> in its notes
At the mithril furnace crafting station, make it a map event:
Switch 45 ON
Plugin Command: OpenCraftingScene
Switch 45 OFF

This would show those recipes only at the mithril furnace and not elsewhere.

Alternative using a tool:
Each of the mithril recipes includes <craft tool: 60>
Item 60 in the database is a key item (or hidden item A/😎 named "Mithril Furnace"
On the map event
Add Items: Mithril Furnace, 1
Plugin Command: OpenCraftingScene
Remove Items: Mithril Furnace, 1

With this, the crafting menu will always show the recipe, but it will be disabled and show "mithril furnace" as a missing tool.

You can be fancier and add / remove the item when you enter / leave the map; so you can craft from the main menu anywhere but when you're inside a forge you can make more things than when you're on the world map.


Damn! i love you, i gonna try it!!!

Thank you so much.
Hello, I made a mistake when using <craft switch: 45>. Please take a look at what happened.
Oh! I hope to be able to make use of this at some point. I'm still working on a plugin of my own, but I will try this out when I get that worked on. 🙂
Thank you so much, crafting is always my "long awaited" plugin/script for every Maker! 😀 LOVE IT.
Released version 1.1 with following updates:

Bug fixed: crash when using craft switch
Features:
- <craft yield:amount> can be used for recipes that produce multiple of an item, and this now shows in the ingredients window.
- <craft text>Your flavour text</craft text> can be used to add a notes section at the end of a recipe. Text codes and multiple lines are allowed here.

When upgrading from a previous version, always open the plugin settings and save to apply defaults to any newly added options.


Hello, I made a mistake when using <craft switch: 45>. Please take a look at what happened.
I fixed this in version 1.1, sorry for trouble.
This crafting system is very well done. Good job @Coelocanth !
Released version 1.1 with following updates:

Bug fixed: crash when using craft switch
Features:
- <craft yield:amount> can be used for recipes that produce multiple of an item, and this now shows in the ingredients window.
- <craft text>Your flavour text</craft text> can be used to add a notes section at the end of a recipe. Text codes and multiple lines are allowed here.

When upgrading from a previous version, always open the plugin settings and save to apply defaults to any newly added options.



I fixed this in version 1.1, sorry for trouble.
Thanks for your reply! But I have a new problem when I use <craft text>Your flavour text</craft text>.
It's a great plugin, but items that are not compatible with yep plugins maximum Numbers. More than the maximum quantity can be made, but quantity does not increase only consume material.
Adaptation will be difficult because it's encrypted. However, the maximum number of tags can be added to the item to handle this problem.

And, if can add something like success rate setting of item, so much the better !
@suoma can you show your database notes for the item causing the problem?
I can see from the stack trace how a variable can be undefined, but can't reproduce the crash myself - so your database notes would help.

For comparison, here's a test item:
Spoiler: database notes: iron bars
Code:
<craft item:5>
<craft item:2:2>
<craft yield:2>
<craft text>
The \c[3]Bessemer\c[0] process.
But with more coal.
\n[2] approves.
Have an icon \i[4] perhaps?
</craft text>
<craft break item:2>
<craft break yield:2>
<craft break text>
Unsmelt some ore?
maybe: rust.
</craft break text>

I'll look into max items - I assume you're using the VisuMZ item/equip core script.
Assuming they have overrriden Game_Party.maxItems I can just call the core script function and it'll do the right thing with or without their plugin.


Updated with version 1.1.1 which prevents crafting if it would put you over the max items allowed.
For vanilla MZ, that's always 99; if you're using another plugin that overrides Game_Party.maxItems, its result will be respected.
Tested with VisuMZ, but should work with any - the core scripts put this function there to be overridden.

Why 1.1.1?
I'm trying to follow "semantic versioning"
The first number updates for breaking changes (so 2.0 would be an unsafe upgrade)
The second number updates for new features (like adding flavour text in 1.1)
The third number updates when there are only bug fixes (checking max items was overlooked, so it's a bug)
@suoma can you show your database notes for the item causing the problem?
I can see from the stack trace how a variable can be undefined, but can't reproduce the crash myself - so your database notes would help.

For comparison, here's a test item:
Spoiler: database notes: iron bars
Code:
<craft item:5>
<craft item:2:2>
<craft yield:2>
<craft text>
The \c[3]Bessemer\c[0] process.
But with more coal.
\n[2] approves.
Have an icon \i[4] perhaps?
</craft text>
<craft break item:2>
<craft break yield:2>
<craft break text>
Unsmelt some ore?
maybe: rust.
</craft break text>

I'll look into max items - I assume you're using the VisuMZ item/equip core script.
Assuming they have overrriden Game_Party.maxItems I can just call the core script function and it'll do the right thing with or without their plugin.
Thanks very much for your reply. I see what the problem is, have to write <craft yield:>,<craft text> to come into force. Only write <craft text> causing the problem.
But it would be better if the <craft text> could work directly...
OK - <craft text> on its own with no recipe causes that problem (but it's fixed in 1.1.1).
If there's no recipe, the item isn't craftable, so won't show up in any of the crafting menus.
What were you trying to do with flavour text but no recipe?
Do you want to be able to create items out of nothing? (This wasn't a use I'd considered for a crafting system)
OK - <craft text> on its own with no recipe causes that problem (but it's fixed in 1.1.1).
If there's no recipe, the item isn't craftable, so won't show up in any of the crafting menus.
What were you trying to do with flavour text but no recipe?
Do you want to be able to create items out of nothing? (This wasn't a use I'd considered for a crafting system)
Thanks very much for your reply. I checked it again, I've written the <craft text> on recipe, not on the items. If do this, it will lead to the problem.
Very sorry! I made a mistake, thinking have to write <craft yield:2> to keep it normal.

I tested the maximum number of items made, Version 1.1.1 has no problems! I only used VisuMZ, Well done!
Is there any way to hide certain craftables category in the category window?

I mean, like, when you go into a pharmacist, you don't always see the option to create weapon or armor, right? That will be pretty neat if you can. But well, I'm not forcing you to implement this idea, since I already got what I need through your plugin.

Oh, and I'd like you to know that the plugin in sample project haven't been updated yet, so it will still return error when you try to craft an item with switch.
Is there any way to hide certain craftables category in the category window?

I mean, like, when you go into a pharmacist, you don't always see the option to create weapon or armor, right? That will be pretty neat if you can. But well, I'm not forcing you to implement this idea, since I already got what I need through your plugin.

Oh, and I'd like you to know that the plugin in sample project haven't been updated yet, so it will still return error when you try to craft an item with switch.

In your shop event, set a switch or give a recipe item; and take it away again after the scene.
This sounds like something to add to the sample project when updated.
can this utilize crafting style combining base item with 2 or more other items to generate random item?
can this utilize crafting style combining base item with 2 or more other items to generate random item?
No - that's what I call a "experiment" type crafting system where you choose the ingredients and find out the result.
I hope somebody else will create a plugin for that type of crafting system so people can choose the style that best fits their game.

Original thread: https://forums.rpgmakerweb.com/threads/item-crafting.126539/