Jump to content

Recommended Posts

A new script of mine for you

Szyu's Crafting System

Introduction
This script allows you to define recipe books and craft items, weapons and armors, to give the player new aims in the world of 2D RPGs.


How to Use

- "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 lists)
- "<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 5
w: 2x 7   => 2 weapons of weapon_id 7
a: 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 5
w: 7   => ability to craft the weapon with id 7
a: 2   => ability to craft the armor with id 2
</recipes>

- "$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")

 

Screenshots
The crafting menu with the ingredients list
vyx2.png

The particular recipes can be found by using the recipe books from the item menu
vlfs.png


Links
Pastebin via Adf.ly if you want to support me
Pastebin direkt

 

Credits
Credits to Szyu if you plan to use this script.


Changelog
- Fixed issues with multiple recipe books
- Recipe Books can now be categorized. So you can call different Crafting Lists for Blacksmithing, Alchemy or whatever you want.
- An issue with the ingredients list has been fixed -> The ingredients list has shown the ingredients of the last item selected after returning to the category list

- Fixed error with duplicates after adding recipes to a rb

- Added function to remove recipes from a rb

- Fixed error occuring whith SceneManager when running with other scripts manipulating this module

- Recipe books now correctly store their recipes when saving the game

- Added function to call crafting scene from menu

- Fixed problem with currency as ingredient not to be displayed correctly

- Added item count of recipe items in inventory

- Fixed error when having currency for ingredients

- Added customizable sound effects for crafting success

- Modified status screen of recipes.

- Fixed bug with savestates, where added recipes disappear after reloading

- Added function to add multiple recipes at one (more information in the scripts description)

- Fixed error when loading the items status information from the crafting menu

Edited by Szyu

Share this post


Link to post
Share on other sites

I've looked at a few crafting systems and they all looked cluttered and messy. This looks absolutely beautiful!! Thank you so much for the post! I will definitely be using this in my game! :D 

Share this post


Link to post
Share on other sites

The demo helped but I noticed if you have more than one recipe book then it will only do one recipe book but not both.

 

Thanks, I am blind to scripting but whatever you did fixed the issue.

Edited by sean2099

Share this post


Link to post
Share on other sites

Great script! Would it be possible to make it so you can only craft certain things if a certain state in inflicted on the leader of the party? Or, certain states will be added automatically if the leader has a certain state. For example:

If the leader is poisoned and you try to craft a dagger, a poison effect will be added to the dagger. Or it could go the other way, if the leader is poisoned than parameters will be negatively effected by that.

Or, certain things can only be crafted if, say, the state 'Blacksmith' is inflicted on the leader.

Just a thought :) Again, GREAT SCRIPT!!

Share this post


Link to post
Share on other sites

Hey, just checked out the demo for this, and it looks pretty awesome. However, I was curious about a couple things before I put it in my own game:

 

- Is it possible to split it up into multiple crafting lists (such as, say, having on list for smithing, another for cooking food, and a third for alchemy) through the script itself?

- Can this work in reverse, where you can break an item down into its components?

- Is it possible to randomize what's been crafted with a certain recipe, such as having a certain amount of Gold crafted into a randomized component item?

- Is this compatible with Yanfly's Ace Item Menu script?

 

Thanks in advance~

Edited by OnyxTanuki

Share this post


Link to post
Share on other sites

I updated the new version on pastebin.
Changes:

- Recipe Books can now be categorized. So you can call different Crafting Lists for Blacksmithing, Alchemy or whatever you want.

- An issue with the ingredients list has been fixed -> The ingredients list has shown the ingredients of the last item selected after returning to the category list

 

@OnyxTanuki: The script is compatible to Yanfly's Ace Item Menu script. But you have to place the crafting script below the menu script.

Share this post


Link to post
Share on other sites

Ahmmm excuse me..but im having a hard time using these script..could someone help me?

i need crafting for the game im making...and im confused on this script...thank you to those who will help.. :)

Share this post


Link to post
Share on other sites

Awesome, thanks Szyu, that answers two of my questions. As for randomized components, since that one only works off of Gold, I could pretty easily do that with a common event, and I think I saw another script somewhere that could break items into components if this one doesn't. Thanks!

Share this post


Link to post
Share on other sites

I am getting this error when I try and use categories.

 

Script Game_interpreter line 1411  Name Error occured

uninitiazied constant game_interpreter::Blacksmithing

 

I made a recipe to test your new version of your crafting script.

 

In the event, I posted this script eval

SceneManager.call(Scene_Crafting,
Blacksmithing)

 

In the recipe book, I put this in the item note

<recipe book>
<category: Blacksmithing>
<recipes>
w: 1
w: 7
w: 13
w: 19
w: 31
w: 37
w: 38
w: 49
w: 53
w: 54
</recipes>

 

Edit:  Realized I had to use numbers instead of the category name.

Share this post


Link to post
Share on other sites

Crafting System updated to v1.2

 

You can now add recipes to a recipe book ingame with script command '$data_items[x].add_recipe("w: 2")'. An error has been fixed, so there will be no duplicates after adding recipes.

Share this post


Link to post
Share on other sites

Crafting System updated to v1.2

 

You can now add recipes to a recipe book ingame with script command '$data_items[x].add_recipe("w: 2")'. An error has been fixed, so there will be no duplicates after adding recipes.

 

Hey! I have a question because I am really liking this script!

 

Currently I am using:

 

http://symphonyan.org/rgss3/equipments-learning/

 

An Equipment learning script, so essentially from using a weapon enough you learn a skill. My question is simple, is it possible to make the two scripts work together? So that when you craft a weapon you can see what skills it has on it beforehand? If not that's fine, I can simply add to the weapon description to what skills you can learn. I was just hoping for a more visually appealing way.

Edited by Korten

Share this post


Link to post
Share on other sites

This is a great script, but REALLY confusing! Help?

Where is the confusion?  I am using this now without any problems...not saying anything bad but what kind of help do you need?  Where are you stuck? 

Share this post


Link to post
Share on other sites

I couldn't see which parts you are supposed to add to.

 

What do you mean with this? You have to add the script below Materials and add the tags to the notes of  items, weapons and armors. What each tag does is explained in "How to Use" with examples, or you can just download the demo (But the version is outdated, you have to copy and paste the script from pastebin)

Share this post


Link to post
Share on other sites

I don't know where in the script you add things. I can't see where I add to. For example, I don't know if I add things between lines 23 - 478 or 205 - 307. I cannot clearly see where anything goes.

Share this post


Link to post
Share on other sites

Ok i will explain in the littlest detail:

All you have to do in the script itself is to customize the terms you want to use for certain words.

All the rest goes in the database (!!). For example you add

<ingredients>
i: 3x 5   => 3 items of item_id 5
w: 2x 7   => 2 weapons of weapon_id 7
a: 1x 2   => 1 armor of armor_id 2
</ingredients>

to the notes of an item (in database!), this items requires the specified items, weapons and armors to craft.

Same goes for all other tags.

 

You don't have to add this to the script.

Share this post


Link to post
Share on other sites

I have a few scripts I'm trying to use and get the hang of. I've done other types of scripting before so I'm trying to learn a bit for Ace. I didn't notice, but did you have an easy way of using the money in crafting like G? or do you just create an "item" called G and do some sort of common event where it comes up to a variable equal to the amount of 'actual' G you have? That's all I was thinking, anyway. I'm not entirely sure I could do said common event, I'm a bit lazy right now. And I'm sure if anything I could set up the event to ask you for money before you did the crafting scripted event. Was just curious.

Edited by BrassKnucklehead

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×