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

ah yeah 😉 try using it without that script. I'll take a look at the script tomorrow. It's about time for me to crash for the night.

The version I had was different 😉
Ah, well ty for your help 😛 .

Broke this one too:

Spoiler
class Crafting_Details_Window  def success_rewards    RPG::SE.new(*Success_Sound).play##############################################################################    if $imported["Equip-Randomizer"]      if @recipe.crafted_item.is_a?(RPG::Weapon) || @recipe.crafted_item.is_a?(RPG::Armor)        item = $game_party.add_weapon(@recipe.crafted_item.id, 1) if @recipe.crafted_item.is_a?(RPG::Weapon)        item = $game_party.add_armor(@recipe.crafted_item.id, 1) if @recipe.crafted_item.is_a?(RPG::Armor)        @result_exp     = @recipe.earned_exp * @number        @result_message = Result_Msg        @result_item    = item        @result_amount  = @recipe.crafted_amount * @number      else      @result_exp     = @recipe.earned_exp * @number      @result_message = Result_Msg      @result_item    = @recipe.crafted_item      @result_amount  = @recipe.crafted_amount * @number      $game_party.gain_item(@result_item, @result_amount)      end    else##############################################################################      @result_exp     = @recipe.earned_exp * @number      @result_message = Result_Msg      @result_item    = @recipe.crafted_item      @result_amount  = @recipe.crafted_amount * @number      $game_party.gain_item(@result_item, @result_amount)    end    return unless SceneManager.scene_is?(Scene_Crafting)    $craft[@craft_type].gain_exp(@result_exp)  endend
Specifically Line 29:

Code:
$craft[@craft_type].gain_exp(@result_exp)
Ohh, my! 😀

I will start with the fixes once I managed to download the updates.

The craft_type error should be easy enough to fix at the XP gain.

For the results window, that will need a bit of looking around. 

I will post when (if) I finished the fixings.

Ok, so for the above error with the craft XP gain...

Change the line which gives the error to this:

$craft[@craft_id].gain_exp(@result_exp)This should fix that issue.

Well, the results window has been changed a lot.

That will need more time.

But Venka did the same method like me, scaling the window size to the text size.

The only difference in Venka's window is the visuals, I put some arrows in, made it wider to look a bit less crowded, which anyone can do with Venka's just by putting some spaces in the text options of the results window.

I learned to use the '.max' thingy properly from Venka's window, which I honestly, never even thought about using. 😀

It needs some rework for my tastes, but overall, Venka now did what I did a few days ago, with a few minor visual differences, so I suggest not using my popup window at all anymore. I don't want to slow down Venka in working on the main Crafting script just because of trying to maintain my version of it too.

However, if anyone wants to show the colored item name in that popup window, do the followings in Venka's original Results window:

Find this line in the main script:

  draw_text(x, @y, contents.width - x, height, @item.name)Just before that, insert this little line:

  change_color(@item.color)And just after that same line we found before, put this line:

set_font🙂other_text)There, that should display the correct color for any randomized item.

Everything else is working fine even with my edits for Vlue's Randomizer. 

Well, with experience already earned in this, I actually made my version again, and it looks even better than before, thanks to Venka's update.

The snippet is available to grab where you got the last one.

Link to it, if someone is lazy enough to not search for it:

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30a-updated-72114/?p=288954

Ok, off to test! 😛
Hm, the Decompiler doesn't work, though I suspect that's because I'm using Vlue's Random script. Did you ever make a fix for that Sixth or is the fix broken now?

I can't remember all the edits you made, lol

EDIT: Nevermind, I'm stupid. Lol

EDIT:

Actually... I have ran into a problem I have :g1 inside the recipe, but something is over riding it to make it 20.
The Craft Shop/Decompiler Addon needed my second edit to work with Vlue's Randomizer.

But that edit was an edit in Vlue's script, not in this one.

If it doesn't work with that edit now, than I need to have a look at it again, to see what makes the error.

I haven't tested that addon yet.

I'm off to work now, will test it when I'm back home!
Again, never mind. My stupid newbie self knows no bounds. Just my mistakes no one elses. I have everything working... for now. Thank you all.
Thanks to working with sixth.. found another bug for those using the crafting shop npcs. In the main script look for this def around line 1184. and replace the last line to the last line in the def below. Crafting at a shop was granting crafting exp.. oopsie!

#---------------------------------------------------------------------------- # ○ new method: success_rewards #---------------------------------------------------------------------------- def success_rewards RPG::SE.new(*Success_Sound).play @result_exp = @recipe.earned_exp * @number @result_message = Result_Msg @result_item = @recipe.crafted_item @result_amount = @recipe.crafted_amount * @number $game_party.gain_item(@result_item, @result_amount) $craft[@craft_id].gain_exp(@result_exp) if SceneManager.scene_is?(Scene_Crafting) endand now that I've spent some time looking at Sixth's edits I think I can patch my script without messing with his edits too much 🙂
Okay I have another question:

I have an issue running a shiop just to use the decompiling thing. I have to put something in there in order to do this. I just want to be able to bring up the decompiling screen, is this possible without shop processing? 
You can try this:

noshopedit.txt

Remove/disable your current craft shop/decompile add-on and use this instead.

But be aware that this is an edited version of what Venka made for me before the latest update of the Crafting Script!

I tried to update it with everything what Venka updated in the "shop version" of this add-on.

Tested it a little, nothing seems broken, aside from the 'enabled' color of gold requirements for some reason, but you can craft the item if you have the gold for it regardless of the color shown.

Also I modified it heavily in visuals for my game. I tried to revert back everything I changed to the initial version for you, but if I left out anything which seems weird in your project, just report back and I will fix it.

With that, you can call the craft shop/decompile scene with this script call, for example:

recipes = [3, 4, 5]shop_recipes("text", recipes)Just like you did till now.This would call the regular craft/decompile scene with both options enabled.

The text (name of the button) for the crafting part must be set to something other than nothing, or it will only show up the Deconstruct option!

shop_recipesBut this calls a Deconstruct scene only, no crafting option is shown in the scene.
Note that you don't have to call a 'Shop Processing' from the event window after any script calls in this version, you won't enter the regular shop at all.

This should do what you want just fine. If you find a bug/error/anything out of place, well, you know what to do already. 😛
Oh good! Well, I just found out I may actually need the shop after all anywho, lol. But that is good to know.
Sorry haven't had much access to my PC the last few days. thanks sixth for the assist. I'm on my phone right now. Has the problem been fixed?
Quick noob question: I was looking at the demo and noticed some stuff had been added to the Main script.  Is it necessary to merge that code as well?  I have another script I am using which overwrites Main so I'd need to figure out how to merge the code without it breaking something.
You can skip the main script. It's mainly for debugging.
I'm having issues actually setting up an item that brings up a menu for crafting. I know you have instructions in the script itself, but I'm not a coder...I don't know how exactly I go through the process of making an item that I can use (not expend) to bring up a crafting menu. I can't find anything online about it either. 🙁  I don't think I'm using the most up to date version either, but my computer says it's malware and has a virus in it.
The easiest way to set it up is to have an item that stays in one location, such as a crafting table or stove. Then you put an event on it that runs the crafting scene. This way it can be accessed every time you come back to it.  All you need to put in that event is the appropriate script call.

If you are wanting something that travels - a crafting book or something - create the item and set it to "consume: no".

I hope that helps answer what you were asking.
If you downloaded from this topic, than it is the most up to date version.

And I just saw that Venka updated to 3.1. Silent update! 😳

I forgot to post the "updated" Randomizer snippet, kinda busy now, but will try to post it later.

Anyway, to make an item to use for crafting scenes, you need to make a common event first in your database.

The common event shouldn't be too hard to do, because it will be just one single line.

It should contain a single script call. Script call command is the last command in the event command menu, it is on page 3.

The script call should look like this:

craft(craft_id)The craft_id is your craft type ID from the script.

The common event is finished.

Now make an item, name it anything you like. 

At the "Effects" box, make a common event call. The command for it is on the last page at the bottom. 

Select your previously created common event here.

Make the item's "Occasion" to "Only from the Menu". Optionally make the item not consumable, so that it won't disappear from your inventory after one usage.

And this is all. Now you have an item which will bring up a crafting scene upon usage.

And there is no way that it contains any virus or malware, it is a false alarm, so don't worry about that.

Most anti-virus programs and certain browsers (like Chrome) will warn you that it is an executable file, which could contain virus/malware, but that doesn't mean that it does contain any harmful things for your PC.

Ultra quick "bug" report or a suggestion:

As it is now, when we open up the actor stats window and press the confirm key, it shows a little popup window asking us whether we would like to create the item or not.

It will popup even if we don't have the necessary ingredients for the item. This should not happen, or should it? 😳

Wouldn't it be better to just make a buzzer sound when we don't have the ingredients for it, or a different text, like "You don't have the required ingredients for making this item.", or something similar?
Thanks for the support help guys 🙂

Ah, I had thought I'd put the buzzer sound in if the ingredients were missing. I'll go take a look at it 🙂   Also I started to post that add-on for your stuff sixth, but I figured mine was out of date a little bit because I know you were still working on the box frames.

and here's the fixed add on

https://www.dropbox.com/s/4m7xkhajz842li5/Crafting%20Actor%20Stats.txt
Sixth, you do not need to make a common event to call the crafting scenes. You certainly can, but it is not neccessary.
Yeah, I was busy nowadays, lotsa work. >.>
 
The "box upgrade" popup is already ready visually, as in, all sizes are correct for the boxes, all of them appear only if they need to also at the correct positions.
But the code itself... Well, I have yet to see a more messy code in my life, lol.
It needs a lot of cleanings, I don't even remember what is needed and what is not anymore. 😀
 
Also I am planning to redefine your win_width definition so that the popup window will scale in accordance to the boxes' sizes, rather than the text size to avoid cutting down the edges of the boxes.
And the win_height... The most messy part of the entire edit I did. Same goes with this like with win_width.
 
Done the above crossed things, yay!
Now, I only need to clean the code a bit, my delete button will work a lot tomorrow!
But now, it's time to hit the bed! 😀
 
Needless to say, I am a bit embarrassed to post such a code on a public forum.

The addon is finished and can be found here (with some screenshots):
http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v31-updated-80214/?p=298963
 
@mlogan
You need a common event to access the craft scene with items from your inventory.
Like getting an "Anvil and Hammer" for Blacksmithing, so every time the player uses that item, it will bring up the "Smithing" craft scene, for example.
looks good 😉 and yeah.. I've written some pretty sloppy code on occasion.. almost every thing I script has some messy code in it at one point or another while I'm trying to get stuff working. After it's all working then I review the code a few times (or more) trying to clean up the code so it's more efficient or easier to read

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