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

Hahaha, it seems doing add-ons is even more exhausting and tedious than doing a script, thank you very much for the bug fix, Venka, truly appreciated!

I'll try and report anything else that i find. 🙂
Demo Erro:

Script 'Craft Actor Stats Changes' line 825: NoMethodErro ocurred.

Error ocurred, check the the debug console for more information.

imagem.JPG
After updates listed ago...

"Script 'Craft Actor Stat Changes' line 827: NoMethodErro ocurred.

Erro ocurred, check the debug console for more information."

 

How the problem occurs:

1 start item creation "ax".
2 First error -> It is placed to create one ax, but it loads the bar two times.
3 the error appears.

 

 

 

Demo with:

- Multiple Crafting Script Customize Settings - v3.0            updated: 07/21/2014

- Multiple Crafting Script - v3.1                                           updated: 08/01/2014

- Multiple Crafting Script - Menu Access Add on                 updated: 07/24/2014

- Crafting: Actor Specific Recipes Add-on                           updated: 07/21/2014

- Multiple Crafting Script - Shop Recipes Add on                updated: 07/07/2014

- Multiple Crafting Script - Shop Craft/Decompile Add on    updated: 08/15/2014

- Multiple Crafting Script - Actor Stat Changes Add on        updated: 08/15/2014

imagem.JPG
Yeah, I noticed that bug too.

When starting the craft, the bar goes like normally it would, then when pressing the button, it starts over again, and after pressing the button a second time, it will pop the results window.

In the inventory, there will be 2 items created, one from each button press.

But last time I checked, it did not throw an error for me. o.o

Anyway, it is caused by the actor stats changes addon, and it started doing it after this version:

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v31-updated-80214/?p=301705

It still won't work with the Randomizer addon. I suggest you not to bother with it, it seems to cause too much trouble.

I will just remove the "equip item" part of it and use it like that. It is still very useful even without that part.
Ok I think I've got it this time.

Stats Add on

https://www.dropbox.com/s/4m7xkhajz842li5/Crafting%20Actor%20Stats.txt

Shop Decomp Add on (exp fix, it was giving double exp in the normal crafting).

https://www.dropbox.com/s/5vic3mihvb4i06h/Crafting%20Shop%20Craft%20%26%20Decompile.txt

@Sixth: What is it doing/not doing for you with the Randomizer? It works for me, it crafts the item and equips it. My randomizer add on is below everything else and so is Vlue's script.

edit: ok I didn't have your most up to date add on. You'll need to trash this line in your add on

Code:
$craft.clear_results
1) Cooking does not work.
Have you items, levels, materials but can not produce.

2) craft NPC: Update of gold does not work.
situation:
First: Stay with 0 gold.
Second: Go to the npc (which features craft) and selling any item to generate gold.
Third: Try to buy anything. You can not.

Buy / build, even though gold and items on hand, but it is necessary to leave the npc and enter again to make it work.

3) Alchemy has "lag".
During the selection of item that you want to do, there is a clear lag one to move from one item to another.
Alright, it works in your demo flawlessly!

Damn, now I need to search for the script which causes the incompatibility in my project! >.>

It is either incompatible with your actor stat addon, or with my randomizer addon.

How I hate to search for compatibility issues between scripts! >.>

And got a little question:

Can I check which crafting scene is active?

For example, can I check for 'SceneManager.scene_is?($craft(ID))'? Or will that throw an error?

I want to use that in a script, not in a script call in eventing.

@tiagoms

Edit, dunno about your other issues, can't test them now, but there is no lag anywhere in the demo.

I know what are you talking about, I got that lag on every single crafting scene in my project, if the actor stat changes addon is enabled.

It comes from another script or from the database itself (I got quite a big one set up already), not from Venka's scripts, I think. If it would have come from the crafting script itself, it would lag in the demo for me as well, but all is well in there.

I was wondering where it comes too, but never managed to track it down.

Ok, cooking works for me, just tested.

The crafting shop/decomp... Well, that one got some issues. 

I can buy and sell just fine. But I can craft regardless if I got the materials for the items or not. I can craft a Battle Axe endlessly without worrying about the ingredients, because once it reaches zero from everything, I can still craft as long as I don't press the cancel button to return to the item list selection. That one will become disabled if there are not enough materials, but the craft button itself remains active.

And a new one: I can buy more than one "Alchemy 101" book from the recipe shop. 😳

Addons are a pain to manage, lol. 😀

Alright, back to clean my randomizer. Messed it up quite a lot with those random items gained thingy, lol. 
Besides the demo scripts in the first page there is a script (add on) called "Tools add on". If added will give the error:

"SystemStackError Ocurred
Error ocurred. Check the debug console for more information "

In console:
"Crafting Script v3.1: 127: stack level too deep, SyystemStackError.
 

Demo With All scripts updated

http://www.4shared.com/file/--R2LU4Ece/Crafting_Demo.html

Demo With All scripts updated + Tools Script

http://www.4shared.com/file/A1zWgkhxba/Crafting_Demo_-_With_Tools.html
The tools addon is not needed anymore, it is included in the main script already.

You can just remove it.
1. Ok I'll fix the problem with the cooking thing, I was messaging around with something and forgot to fix it all the way.

2. Another great catch on a bug (I forgot about checking gold amounts and refreshing/updating the craft windows when items are bought/sold).

3. I can't get this one to lag for me. The only difference with alchemy and other craft types is that it uses actor specific recipes.. so I'll check into my code there.

I can't seem to figure out how to download without getting a downloader or using a social media site.

I'm so sorry about all these bugs popping up. I'm try to get something released tomorrow. I think I'm either going to scrap the whole stats add on or take out the craft and equip part of it (cause that's where all the issues are stemming from). It's got me to the point where I want to start the whole script from scratch to try to fix all the issues.. but I just don't have the time to do that.

And sixth is correct, the tools add on was incorporated into the main script so you can remove that add on.

@sixth: I'm not sure on the SceneManager question, I'd have to play around with it.. but honestly I'm burnt for the day. I'll pm you tomorrow with some stuff.

sorry guys =( will really try to get this fixed tomorrow
I'll be waiting with great expectation.

Your script will be very useful for me.
Ok hopefully everything runs smoothly now. I rewrote a lot of the shop script. You can now use the crafting script and drop the exp portion of it so you no longer need levels if you don't want them. I think all the bugs are fixed, I tested a ton of different ways and I couldn't find any of the previous bugs.

For sixth's add on you'll need to change the success_rewards method to the following:

Code:
      #----------------------------------------------------------------------------      # ● overwrite method: success_rewards      #----------------------------------------------------------------------------      def success_rewards        RPG::SE.new(*Success_Sound).play        unless SceneManager.scene_is?(Scene_Shop)          @result_exp     = @recipe.earned_exp * @number          @result_message = Result_Msg          $craft[@craft_id].gain_exp(@result_exp) if SceneManager.scene_is?(Scene_Crafting)        end        @result_amount  = @recipe.crafted_amount * @number        @result_item    = get_random_item      end
Bugs found at the decompile addon:

- Shop Fee is not displayed for the crafting, but it is displayed for the decompile.

- The craft shop will not update the gold the player currently has until the player leaves the craft shop and re-enters it again.

Sell anything on a craft shop scene, get enough gold for crafting/decompiling something which you could not before because of the lack of gold, and you will see that you can not craft/decompile it, no matter if you got enough gold for it after selling something in the shop.

Bugs still present in the Recipe Menu Addon:

- The 'nil' cursor placement.

Open the Recipe Menu, get into a craft type which got 2 or more recipes. Move your cursor indicator to the last recipe. Press the 'Cancel' button. Now press either the 'Left' or the 'Right' button, and if the craft type besides the previously selected craft type got less recipes than the previously selected craft type, the error occurs.

No other bugs found by me.

I will update my Randomization Addon, to account for the changes in the main script.

Edit: Finished the update.
menu access fix:

https://www.dropbox.com/s/bdz0lexj9buxp7k/Crafting%20Menu%20Access%20Add-on.txt

shop craft/decon fixes:

https://www.dropbox.com/s/5vic3mihvb4i06h/Crafting%20Shop%20Craft%20%26%20Decompile.txt

I wasn't getting the gold window not updating bug. It was updating all the time for me, so not sure if it's a conflict somewhere or I didn't do the same sequence of events.
I tested these in the demo, with only your scripts to make sure no other script makes it.


I simply picked up everything to get enough items for testing, then went straight to the shop keeper, selected the second option.


As the Battle Axe requires 400 gold, and by picking up all stuffs I got only 100, I sold some potions and full potions to get the gold for it. Exited the selling window, and entered the craft window without leaving the shop at all. And I could not craft the Battle Axe, even if I got 1000+ gold. When I left the shop and re-entered it, it refreshed my gold amount.


Edit: Managed to track down this one!


It happens only if you enter the craft shop first without enough gold to craft something, then selling the stuffs and re-enter the craft shop.


And just now, I encountered a pretty weird bug.


Not sure if it got anything to do with where I did it, but it happened on the recipe shop, when selecting the first option at the shopkeeper after I already selected the second option there.


So, I managed to get exactly 600 gold, no more, no less. But I managed to craft 2 Battle Axes from that gold! 😳


I just crafted one, then my gold went down to 200. After that, I noticed that I could still craft the item, it was still showing it as an enabled item. So, I tried to craft another one, and to my surprise, I could craft another one. Weird one for sure.
I understand about the not having the gold when you enter the shop, you sell stuff. Now you should have the gold, but it wasn't allowing you to craft. I had to fix the refresh/update methods to check for the gold changes and that should be fixed now.. So it's still doing it? I just test my demo again and it's working like it should for me. I did exactly as you said and I can can craft the items just fine. I also can't craft an item if the required ingredients aren't owned (including gold).

I did notice it was charging the shop fee twice (I forgot about the rewards method taking out the shop fee and I changed how the ingredient list works so it took the shop fee out there.. hence it charging twice). This is fixed and this is the new add on script:

https://www.dropbox.com/s/5vic3mihvb4i06h/Crafting%20Shop%20Craft%20%26%20Decompile.txt

I can post the code to the forums incase maybe the dropbox isn't updating to the newer code for some reason. I haven't updated the demo on the main page yet. Was  waiting to update that till the bug issues are settled.
So Venka, I still use v2.9, should I update or will you soon push v3.3? I'm kinda lazy lately .

And ( I know I have already said this before ), but since I added recipes and translated all terms

(Which if you want I can PM you with the portuguese translation by the way), so if you are about to push it,

I will be glad to know   😀  .

Amazing work girl, you and sixth.
Well, I'm probably NOT going to be doing another add on any time soon as they're starting to be a big headache. So I don't think the settings part will be changing again and the main script shouldn't change much any more either.. it's mostly the newest add on and the shop one that has the bugs in it. And very cool on the translation 🙂 I can post a link to it on the main thread if you'd like
Ah ok, I will update it then, later I will send you the translations =) On the first post you have a demo

of the v3.1 and the alternate link has the v3.2? 
Ohh, I haven't tried the fixes you posted yet then (still haven't, my free days just got blasted, so that will have to wait until the evening >.>), so it might be possible that the issue is fixed already.


I will test it tonight and will report back.


But if you say it is fixed, I believe it is fixed indeed. 😛


Btw, I started to meddle with the random button inputs thing...


I started it by doing the same as with all my other custom settings.


Added 2 new setup variable to the recipe settings, one is the number of times it should ask for a button input, the other is a randomizer kind of thing, which adds a random number to a new constant I made in the script (which is initially set to 0).


Then I set up different 'when' commands depending on the new constant's value and hardcoded the new button presses in each 'when' part. The hardcode can be changed to be another possible setup in the script, of course, which I plan to change like that anyway in the end.


So, this is how I changed the original button press needed method.


Now the only thing I need to edit is the time when these buttons should be pressed somehow.


And an indicator for the player should help too, but that I will do later, when it functions as it should.


So far, it works with a single button input, it randomizes the input needed to make a success item.


When I figure out the time for the other inputs, I guess, it will be fully functional and ready for testing. And I guess this will be the hardest part to do...


But it may take some time, as I got very little free time nowadays on my hands, unfortunately. >.>

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