Crafting Script v3.8 - Updated 2/26/2015

Take a look at the Shop Craft/Decompile Add on.


Decompile means dismantle.
Hello everyone. I've been away because of the university, but I believe that now is possible to continue the game. =)

Sixth, I will torment you again = D
I'm about to give up... I keep getting the Line: 781 error, and I have zero idea what is causing it. It suddenly was working fine, however as soon I began to remove some recipies it began. 

For some reason, the script REQUIRES I have the default recipies. If I remove any of them, it causes it to crash... I have no idea why this is the case.

Edit: For some reason I need to have a minimum of 10 recipies... or the game crashes for what ever reason. 
When do you get the error?


What is the error exactly?


What is line 781?


Can't really help if you don't give any info.


If the game crashes even before the title screen, than it is caused by a wrong script setup.
When do you get the error?

What is the error exactly?

What is line 781?

Can't really help if you don't give any info.

If the game crashes even before the title screen, than it is caused by a wrong script setup.
It occurs when I try to open the crafting menu when I have less than 10 recipes in the script.

Error: 

"Script 'Crafting Script v3.7' line 781: NoMethodError occured."

This is the line:

def get_recipes

    @items = []

    @recipes.each do |recipe_id|

      next unless $recipe[recipe_id].recipe_type == @craft_id

      item = $recipe[recipe_id]

      @items << item

    end

  end
Is it a fresh file as in not a loaded save file that may have had the recipes already there?
I don't suppose it would be possible to have certain recipes tied into a characters stats? for instance, I would need x strength and/or x intelligence as well as the items needed to craft this recipe or to learn the recipe.
Hello Venka!

I've noticed that if you change a crafting menu's music to 'nil', it stops the current map's BGM.

Upon exiting the crafting menu the map BGM starts over.

Is there a way to make the map BGM play continuously throughout?

Thanks! - By the way this script is incredible. I'm having loads of fun with it.
Oops, I think that was pointed out not to long ago. It won't be hard to fix, I've just been so busy with other things. I'll try to post an update by tonight.

edit: Ok so I'm a major bone head. I fixed the issue a few months ago and forgot to upload the update. The main page has the new links 🙂
Nice one! Thanks for responding so quickly.
So Dropbox glitched on me and reverted some of my files to older versions, and I had to re-update my scripts, including this one. Blah. While I was doing so, reconfiguring everything, I thought of another small request. Would it be possible to toggle auto-learn on and off? Essentially, I'm using the difficulty add-on, and wanted to generally have recipes learned automatically, however when I first start the game, the player will be flooded with recipes they can't do, so I wanted to minimize the clutter. No biggie if it's not doable, I may actually just implement learned recipe items instead for after the tutorial section.
so like a script call or a switch to toggle auto learning on/off? I can look into it 🙂 and sorry about the dropbox =(
Yep!

Yeah, it was bloody weird. I wouldn't have expected it to do something like that. I fire up RM and suddenly I see maps reverted to how they were a month ago, and my script changes are gone. Thankfully it was just reverting files to older versions, not removing new files, so my parallax maps I made weren't lost. It's only happened once, but now I'm kind of paranoid about it, as you might imagine.
Hello 🙂 I have a question involving EXP gain; would it be possible to have diminishing results as level increases, thereby forcing players to seek out tougher recipes to improve their status?
Like. If crafting an Iron Helmet yields 5 EXP at Level 1, it would yield no EXP at all once players hit the next Milestone (Level 10), and players would have to craft things within the "Apprentice" level rather than the "Novice" level to improve their ability.
Hi Venka, this script looks great. However, every time I try to enter the crafting menu I get this error

[IMG]http://puu.sh/gFf8t/46ef579e08.jpg[/IMG]

It points to this snippet of code
 

#---------------------------------------------------------------------------- # ○ new method: determine_required_ingredients #---------------------------------------------------------------------------- def determine_required_ingredients(ingredient, i) if @ingredients.is_a?(Craft_Gold) owned = $game_party.gold needed = @required * @number elsif ingredient.tool owned = $game_party.item_number(ingredient) needed = @required else owned = $game_party.item_number(ingredient) needed = @required * @number end max_stacks = 99 if !ingredient.is_a?(Craft_Gold) && ingredient.tool enabled = (owned >= needed) ? @ingredient_count += 1 : false max_stacks = (owned >= needed) ? 99 : owned / @required if @required > 0 else enabled = (owned < needed ? false : @ingredient_count += 1) max_stacks = owned / @required if @required > 0 end [owned, needed, enabled, max_stacks] endI get it using a fresh save, too. So I know that isn't the problem.
I don't have nearly the free time that I use to have so adding new features aren't likely right now. I am still trying to maintain all of my scripts when bugs are found. I'm not sure why you are getting that error. I don't have my laptop with me and since its a fresh game, my next question would be a list of scripts your using. I think my crafting script doesn't touch very many base scripts so it should be compatible with most scripts.

edit:

I had a chance to look at it and look for any custom scripts that have this in it: "module DataManager" You can search all the scripts at once for that line by pressing ctrl + shift + f to search all scripts.
None of the scripts have "module DataManager" in them, save for yours. Further, making a copy of the game files and removing all other scripts, still produces this error.
I don't have nearly the free time that I use to have so adding new features aren't likely right now. I am still trying to maintain all of my scripts when bugs are found. 
It's okay. I think I have a way of doing it myself; how would I make a variable follow the level of a particular craft? Say, at the start of the game, make Variable 1 always equal to the player's level in Alchemy, for instance.
I have an error and am kinda new to the script so I'm not sure if this has been solved yet.

def get_display_name if @recipe[:display_name] @display_name = @recipe[:display_name] else @display_name = crafted_item.name end endendNoMethodError occured on line 546

undefined method 'name' for nil:NilClass
I am curious can you set craft types to be only accessible by certain characters? EDIT:I noticed the Actor specific recipes but I wonder if there is to way to make certain craft types only able to be done by certain actors.  For example if I were to add a chef character I would only want to be able to make things in the fine cusine craft menu when he is in the party. Things like that.

Original thread: https://forums.rpgmakerweb.com/threads/crafting-script-v3-8-updated-2-26-2015.17560/