Szyu's Crafting System
About
This script allows you to define crafting books and recipes, that let your player create all sorts of things. You can also seperate your crafting items into different categories such as "Alchemy" or "Blacksmith". But it is difficult to describe, so here you got some screenshots:
Screenshots
Crafting menu with a list of all ingredients (colored by availability of items)

Here are the stats of the item you want to craft

This is how you define a recipe book (All Key-Items [They have to be KEY-ITEMS] with this note field will be handled as recipe books)

And this is how you define the ingredients you will need to craft an item

How to use
Database:
- "<ingredients> content </ingredients>" marks the area used to define the item's/ weapon's/ armor's ingredients
Example:
<ingredients>i: 3x 5 => 3 items of item_id 5w: 2x 7 => 2 weapons of weapon_id 7a: 1x 2 => 1 armor of armor_id 2</ingredients>- "<recipe book>" marks an item as recipe book (Please only use on items while they are tagged as key item!)
- "<category: x>" marks a recipe book to have a category from the list inside the script (0 based)
- "<recipes> content </recipes>" marks the area used to define the recipes held by the book
Example:
<recipes>i: 5 => ability to craft the item with id 5w: 7 => ability to craft the weapon with id 7a: 2 => ability to craft the armor with id 2</recipes>Script calls:
- "SceneManager.call(Scene_Crafting)" opens the crafting menu
- "SceneManager.call(Scene_Crafting, x) opens the categorized crafting menu with category x (x = -1 for all categories)
- "$data_items[book_id].add_recipe("i/w/a: id")" adds a new recipe to the recipe book
Example:
$data_items[5].add_recipe("w: 33")
- "$data_items[book_id].remove_recipe("i/w/a: id")"removes a recipe from the recipe book
Example:
$data_items[5].remove_recipe("w: 33")
Keep in mind that wherever you can tell the script, that an item has ingredients or recipes like in recipes
<recipes>a: 3</recipes>you can also apply multiple items to this list:
<recipes>a: 3 - 7 # This would make the recipes book hold the recipes for creating armors with id 3, 4, 5, 6 and 7</recipes>However this does not work with ingredients
Links
Pastebin direct
Credits
Credits to Szyu if you plan to use this script.