Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV

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
 

drack_669

Villager
Member
Joined
Nov 20, 2013
Messages
5
Reaction score
4
First Language
Spanish
Primarily Uses
RMMZ
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.
 

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
278
Reaction score
333
First Language
English
Primarily Uses
RMMV
Very cool! Thanks for sharing!
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
890
Reaction score
414
First Language
English
Primarily Uses
N/A
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!
 

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
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/B) 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.
 

drack_669

Villager
Member
Joined
Nov 20, 2013
Messages
5
Reaction score
4
First Language
Spanish
Primarily Uses
RMMZ
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/B) 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.
 

suoma

Villager
Member
Joined
Apr 22, 2017
Messages
18
Reaction score
5
First Language
chinese
Primarily Uses
RMMV
Hello, I made a mistake when using <craft switch: 45>. Please take a look at what happened.
 

Attachments

  • QQ截图20200902174238.jpg
    QQ截图20200902174238.jpg
    38.2 KB · Views: 11

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,433
Reaction score
5,239
First Language
English
Primarily Uses
RMMZ
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. :)
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
1,208
Reaction score
822
First Language
Polish
Primarily Uses
RMMZ
Thank you so much, crafting is always my "lon awaited" plugin/script for every Maker! :D LOVE IT.
 

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,263
Reaction score
326
First Language
English
Primarily Uses
RMMZ
This crafting system is very well done. Good job @Coelocanth !
 

suoma

Villager
Member
Joined
Apr 22, 2017
Messages
18
Reaction score
5
First Language
chinese
Primarily Uses
RMMV
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 !
 

Attachments

  • QQ截图20200903144531.jpg
    QQ截图20200903144531.jpg
    31 KB · Views: 1

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
@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:
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)
 
Last edited:

suoma

Villager
Member
Joined
Apr 22, 2017
Messages
18
Reaction score
5
First Language
chinese
Primarily Uses
RMMV
@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:
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...
 

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
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)
 

suoma

Villager
Member
Joined
Apr 22, 2017
Messages
18
Reaction score
5
First Language
chinese
Primarily Uses
RMMV
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!
 
Last edited:

Raith

Squire
Veteran
Joined
Oct 28, 2019
Messages
87
Reaction score
73
First Language
Indonesian
Primarily Uses
RMMZ
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.
 

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
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.
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
403
Reaction score
119
can this utilize crafting style combining base item with 2 or more other items to generate random item?
 

Coelocanth

Veteran
Veteran
Joined
Oct 10, 2018
Messages
43
Reaction score
79
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Profile Posts

I've never felt prouder of my little game!! *o*
DamageEvil_2.png added!
index.php

Forum statistics

Threads
125,673
Messages
1,172,721
Members
164,799
Latest member
PurpleClouds
Top