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

good deal 🙂 glad folks are liking the changes.

I've never played Tales of the Abyss, but we just got a Wii system and playing through a lot of old games, the hubby is playing Chocobo Dungeon and I'm trying to get through Harvest Moon (which has gotten to the point of boredom but my OCD says I must finish it before trying something else). Trying to decide what to do next, we've got Skies of Arcadia (loved that one) and thinking of replaying it or trying out one of the other games.. can't decide =P
good deal 🙂 glad folks are liking the changes.

I've never played Tales of the Abyss, but we just got a Wii system and playing through a lot of old games, the hubby is playing Chocobo Dungeon and I'm trying to get through Harvest Moon (which has gotten to the point of boredom but my OCD says I must finish it before trying something else). Trying to decide what to do next, we've got Skies of Arcadia (loved that one) and thinking of replaying it or trying out one of the other games.. can't decide =P
Definitely liked Skies of Arcadia. Harvest Moon 64 was another one I loved.

However, I've encountered an error which is preventing me from using Actor Specific Recipes. It doesn't seem to be recognizing the main script on the check you wrote in, and is giving me an error of line 66.
I'll look into why it's doing it, but honestly you can delete the line, it's suppose to tell you if you're missing the main script. That script didn't change at all other then adding in that check.

edit: going to look into a few things that I thought I tested but seem to be less then 100%

edit2: updated the menu add on (it wasn't showing the craft types in the menu).

I couldn't get the actor specific one to crash. Did you copy over the main script to your project?

basically that error code is trying to find these lines from the main script

$imported = {} unless $imported$imported[:Venka_Crafting] = true
if it doesn't find it, then it shows the error message that it couldn't find the script. Only the newest version has those lines in it, but like I said, you can just delete/comment out that line and if you an older version of the craft script that you're happy with, then it should work.
I'll look into why it's doing it, but honestly you can delete the line, it's suppose to tell you if you're missing the main script. That script didn't change at all other then adding in that check.

edit: going to look into a few things that I thought I tested but seem to be less then 100%

edit2: updated the menu add on (it wasn't showing the craft types in the menu).

I couldn't get the actor specific one to crash. Did you copy over the main script to your project?

basically that error code is trying to find these lines from the main script

Spoiler
$imported = {} unless $imported$imported[:Venka_Crafting] = true
Spoiler
if it doesn't find it, then it shows the error message that it couldn't find the script. Only the newest version has those lines in it, but like I said, you can just delete/comment out that line and if you an older version of the craft script that you're happy with, then it should work.
I can see why it would be doing it in that case, but the weird thing is that I was using the newest version of the main script when it crashed.

For now, I'll just edit out the check segment, although this is proving rather perplexing.
Hey


I absolutely love your script, I've been screwing around with it all day and it's definitely something I want in my game.

But in my game I want it to be "spammable" so I've designed that the normal item you get from crafting if failed and prefailed, and if you hit the green bar (I've put it to 15 frames so it's hard to hit) you get

an improved item. The problem now is when I go into the crafting window it says the recipe is "Improved potion" instead of just "Potion". I want the improved to be a surprise bonus if you hit the green bar.

So is it possible to easily change name for the recipe to be failed_item instead of crafted_item. I've tried to change the crafted_item to failed_item at some point of the script, but

I'm no scripter and it made all the outcomes to become the normal potion. And some other places I tried to change just made errors appear.

Thank you for this awesome script and I hope this is doable!
you were on the right track 🙂 change the def make_command_list to this one.

  def make_command_list    return unless @recipes    @items = []    @recipes.each do |recipe_id|      next unless $recipe[recipe_id].recipe_type == @craft_type      item = $recipe[recipe_id].failed_item      @items << item      add_command(item.name, recipe_id.to_s.to_sym, enabled?(recipe_id))    end  end
The add ons should work without needing any changes
Thank you for the help!

It did not work completely though, the "potion" (instead of "improved potion") is titled in the list but as you open the recipe it says "Improved potion"

[IMG]http://i.imgur.com/TCTkoDB.png[/IMG]

EDIT: I got it on my own! Thank you for this wonderful script :3

I'll post the codes to change if someone wants a system like mine where you get the normal reward if you don't hit

the green bar, and if you do you get a better item. (Make it so the craft_time is really low to make it a challenge)

change draw_recipe_header to:

Code:
  def draw_recipe_header(x, y, w, h)    set_font(:recipe_name)    if $imported[:MAIcon_Hue]      draw_icon_with_hue(@recipe.crafted_item.icon_index, @recipe.crafted_item.icon_hue,         x, y)    else      draw_icon(@recipe.crafted_item.icon_index, x, y)    end    draw_text(x + 25, y, width - 25, line_height, @recipe.failed_item.name)    text = sprintf("×%2d", $game_party.item_number(@recipe.failed_item))    set_font(:header_text)    draw_text(w-60, y, 60, h, "Lv:")    draw_text(w-30, y + 24, 30, h, "Exp")    draw_text(x, y + line_height, 120, h, "In Possession:")    set_font(:other_text)    draw_text(w-60, y, 60, h, @recipe.req_level.to_s, 2)    draw_text(w-135, y + 24, 100, h, @recipe.earned_exp.to_s, 2)    draw_text(x + 120, y + line_height, 50, h, text, 2)  end
good job =) but you'll want to change the draw_icons to the failed_item as well (just incase they have different icons/hues).
Hi is there anyway to change the occupancy of the window skin for the main craft screen to 0 but still keep the occupancy on the reward pop up at 255???. Im trying to get it so that there is no slight hue covering the background but the reward pop up is still visible. As the way I have it at the moment to get the reward pop up is also clear because the window skin is and it wakes the writing completely unclear as it looks combined with the writing from the main screen??

Ps : Great script 😀  
thanks 🙂

sure if you look around line 1200 in the demo script you'll find this info:

Spoiler
class Crafting_Results_Window < Window_Message  #----------------------------------------------------------------------------  # ♦ Public Instance Variables  #----------------------------------------------------------------------------  attr_reader   :detail_window  #----------------------------------------------------------------------------  # ● upgraded method: initialize  #----------------------------------------------------------------------------  def initialize    super    self.x = (Graphics.width - window_width) * 0.5    self.y = (Graphics.height - window_height) * 0.5    @item = nil    @amount = @exp = 0    @message = ""    @leveled = false    self.back_opacity = 220    self.openness = 0  end
change the "self.back_opacity = 220" to 255 to make it a more solid back ground

around 1370ish you'll find these defs, these ones are edited, you'll want to add in the lines with the back_opacity to your side 🙂

Spoiler
  #----------------------------------------------------------------------------  # ○ new method: create_title_window  #----------------------------------------------------------------------------  def create_title_window    @title_window = Crafting_Title_Window.new    @title_window.back_opacity = 0    @title_window.viewport = @viewport    @title_window.craft = @craft_type  end  #----------------------------------------------------------------------------  # ○ new method: create_list_window  #----------------------------------------------------------------------------  def create_list_window    @list_window = Recipe_List_Window.new(0, @title_window.height)    @list_window.back_opacity = 0    @list_window.viewport = @viewport    @list_window.craft = @craft_type    @list_window.set_handler🙂ok,      method🙂to_detail_window))    @list_window.set_handler🙂cancel,  method🙂return_scene))  end  #----------------------------------------------------------------------------  # ○ new method: to_detail_window  #----------------------------------------------------------------------------  def to_detail_window    @detail_window.activate.select(0)  end  #----------------------------------------------------------------------------  # ○ new method: create_detail_window  #----------------------------------------------------------------------------  def create_detail_window    @detail_window = Crafting_Details_Window.new    @detail_window.back_opacity = 0    @detail_window.viewport = @viewport    @detail_window.craft = @craft_type    @detail_window.set_handler🙂craft,      method🙂craft_start))    @detail_window.set_handler🙂cancel,  method🙂return_to_list))    @list_window.detail_window = @detail_window  end
feel free to adjust the back_opacity numbers to your liking 🙂 0 is completely invisible
Cheers you have been a great help 😀
Would this be compatible with Yanfly and\or Kread-Ex?
should be compatible with all other scripts as it doesn't touch very many orginal scripts. I know it's compatible with Yanfly's scripts, I can't say with certainty on Kread-Ex as I don't think I've ever used any of his scripts, but it should work 🙂
cool thanks 🙂
Sorry to bother you Venka... For some reason the Scene_Recipes doesnt shows the commands,the problem appeared in the version 2.6.

Excuse me for my bad English and greetings from Argentina.

3ff.png
Not sure why it'd be doing that for you. And you're English is fine, tons better then my Spanish 🙂

I downloaded the demo and play tested it and it's working on my end. Did you make any edits to the script? I thought maybe the craft's didn't have a name assigned to them, but then "Cook" wouldn't show in the top window either. Can either try downloading the demo again and copy and past your current recipes into it or upload a demo project and I can see why it'd doing it for you.
Good afternoon Venka,thanks you very much. The problem was in the demo,i-redownloaded the script it again and works... I dont know why.
It was gremlins! Glad it's working again 🙂
Updated the script. The auto learn feature wasn't working and never realized it wasn't. Thanks to Redneck for finding it 😉

The updated version is posted in the main post. None of the settings or add on scripts have changed. So for anyone that's upgrading from v2.6, you should be able to copy your settings to the v2.7 one and be good to go 🙂 It should still work with older save files, but the craft will need to have a level change for the recipes to update.
Great script!

I have some requests:

- When the user does not press [Enter] when cooking then the music effect still plays and the cooking doesn't fail but instead still waits for the [Enter] press. Would it be possible to change that so that it automatically fails when the bar is full?

- The cooking scene resets the map BGM instead of saving it.

And Book.png, CrossedSwords.png and Hexagram.png are also available for commercial use? I couldn't find a source for these images (sorry if I missed it).

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